Get Image Facets

POST {{cb_url}}/containers/v1beta/orgs/{{cb_org_key}}/inventory/images/_facet

Get facets that can be used to guide other image inventory queries.

RBAC Permissions Required

Permission (.notation name)Operation(s)
workloads.container.imageREAD, CREATE

API Documentation

Request Schema

{
    "query": "<string>",
    "terms": {
        "fields": [
            "<string>"
        ]
    },
    "criteria": {
        "workloads": [
            {
                "cluster": "<string>",
                "kind": "<string>",
                "name": "<string>",
                "namespace": "<string>"
            }
        ],
        "vulnerabilities": [
            "<string>"
        ],
        "fixes": [
            "<string>"
        ],
        "scan_status": [
            "<string>"
        ],
        "clusters": [
            "<string>"
        ],
        "namespaces": [
            "<string>",
            "<string>"
        ],
        "cves": [
            {
                "cve": "<string>",
                "package": "<string>",
                "type": "<string>"
            }
        ],
        "registries": [
            "<string>"
        ],
        "repositories": [
            "<string>"
        ],
        "is_running": <boolean>
    }
}

Request Body

{"query"=>"", "criteria"=>{"is_running"=>true}, "terms"=>{"fields"=>["scan_status", "reputations", "vulnerabilities", "fixes", "namespaces", "clusters", "repositories"], "rows"=>50}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;terms&quot;:[{&quot;field&quot;:&quot;scan_status&quot;,&quot;values&quot;:[{&quot;name&quot;:&quot;SCANNED&quot;,&quot;total&quot;:72},{&quot;name&quot;:&quot;SCAN_FAILED&quot;,&quot;total&quot;:1},{&quot;name&quot;:&quot;NOT_SCANNED&quot;,&quot;total&quot;:14}]},{&quot;field&quot;:&quot;fixes&quot;,&quot;values&quot;:[{&quot;name&quot;:&quot;AVAILABLE_FIXES&quot;,&quot;total&quot;:65},{&quot;name&quot;:&quot;NO_FIXES_AVAILABLE&quot;,&quot;total&quot;:6}]},{&quot;field&quot;:&quot;clusters&quot;,&quot;values&quot;:[{&quot;name&quot;:&quot;demo:cluster-one&quot;,&quot;total&quot;:60},{&quot;name&quot;:&quot;test:testing-cluster-one&quot;,&quot;total&quot;:36}]},{&quot;field&quot;:&quot;namespaces&quot;,&quot;values&quot;:[{&quot;name&quot;:&quot;demo-namespace&quot;,&quot;total&quot;:14},{&quot;name&quot;:&quot;testing-namespace&quot;,&quot;total&quot;:3}]},{&quot;field&quot;:&quot;reputations&quot;,&quot;values&quot;:[]},{&quot;field&quot;:&quot;repositories&quot;,&quot;values&quot;:[{&quot;name&quot;:&quot;demoartifactory/cluster-scanner&quot;,&quot;total&quot;:1}]},{&quot;field&quot;:&quot;vulnerabilities&quot;,&quot;values&quot;:[{&quot;name&quot;:&quot;CRITICAL&quot;,&quot;total&quot;:53},{&quot;name&quot;:&quot;HIGH&quot;,&quot;total&quot;:58},{&quot;name&quot;:&quot;MEDIUM&quot;,&quot;total&quot;:55},{&quot;name&quot;:&quot;LOW&quot;,&quot;total&quot;:52},{&quot;name&quot;:&quot;UNKNOWN&quot;,&quot;total&quot;:12},{&quot;name&quot;:&quot;NO_VULNERABILITIES&quot;,&quot;total&quot;:3}]}]}