Prisma Cloud Compute API filtering

Reply
Highlighted
L0 Member

Prisma Cloud Compute API filtering

Hello,

 

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 https://cdn.twistlock.com/docs/api/twistlock_api.html#images_get 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?

 

Thanks.

Highlighted
L1 Bithead

Re: Prisma Cloud Compute API filtering

Hi,

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

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 Live Community as a whole!

The Live Community thanks you for your participation!