Prisma Cloud Compute API filtering

Showing results for 
Show  only  | Search instead for 
Did you mean: 

Prisma Cloud Compute API filtering

L0 Member



I'm using the Compute/Twistlock API to query image statuses, but I'd like to filter the fields returned to reduce the size of the payload, which contains many things I don't care about for now. I looked at and it mentions a fields query parameter which sounds perfect for my needs, but I haven't been able to find which value has an effect. Passing ?compact=true does work, but it removes things that I need.


Any idea?




L1 Bithead


Here are the list values that you can pass in this API call:

Query Parameters

  • compact: (boolean)

    Compact indicates that only minimum image data should be sent (vulnerabilities, compliance and extended image metadata should be skipped)

  • fields: (string)

    Fields is used to fetch specific image fields

  • filterBaseImage: (boolean)

    FilterBaseImageVulns filters base image vulnerabilities. Requires an existing scan of the base image

  • hostname: (string)

    Hosts is the host filter

  • id: (string)

    IDs is the image id filter

  • layers: (boolean)

    IncludeImageLayers adds image CVEs to image layers

  • name: (string)

    Names is a list of full image names to query by

  • registry: (string)

    Registries is the image registries filter

  • repository: (string)

    Repositories is the image repositories filter

  • trustStatuses: (string)

    TrustStatuses is the trust statuses filter

L0 Member

Any idea how do you pass a list of fields to the query parameters. 

Hi please the following page for example on how you can pass a list of fields to the query parameters:


L0 Member

I'd think it would help if we could know the expected format. 

E.G. on line 5 we can see the setup for search


but what we do not have is any help for the other fields.


string <date-time>

Filters results by start datetime. Based on scan time.


string <date-time>

Filters results by end datetime. Based on scan time.



Key on which to sort.


Array of strings (string)

Scan type.



But the fields option fails to work in testing with expected values from the json payload.  

Array of strings (string)

List of fields to retrieve.

what are valid options?

L0 Member Trying to get us some more info... try the LIVE community the nice voice on hold said.....

  • 5 replies
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!