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.
Here are the list values that you can pass in this API call:
Compact indicates that only minimum image data should be sent (vulnerabilities, compliance and extended image metadata should be skipped)
Fields is used to fetch specific image fields
FilterBaseImageVulns filters base image vulnerabilities. Requires an existing scan of the base image
Hosts is the host filter
IDs is the image id filter
IncludeImageLayers adds image CVEs to image layers
Names is a list of full image names to query by
Registries is the image registries filter
Repositories is the image repositories filter
TrustStatuses is the trust statuses filter
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!