Search Images

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

Search for images and get a list of images matching the criteria and their metadata.

RBAC Permissions Required

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

API Documentation

Request Schema

{
    "query": "<string>",
    "start": <integer>,
    "rows": <integer>,
    "sort": [
        {
            "field": "<string>",
            "order": "<string>"
        },
        {
            "field": "<string>",
            "order": "<string>"
        }
    ],
    "criteria": {
        "workloads": [
            {
                "cluster": "<string>",
                "kind": "<string>",
                "name": "<string>",
                "namespace": "<string>"
            }
        ],
        "vulnerabilities": [
            "<string>"
        ],
        "fixes": [
            "<string>"
        ],
        "scan_status": [
            "<string>"
        ],
        "clusters": [
            "<string>"
        ],
        "namespaces": [
            "<string>"
        ],
        "cves": [
            {
                "cve": "<string>",
                "package": "<string>",
                "type": "<string>"
            }
        ],
        "registries": [
            "<string>"
        ],
        "repositories": [
            "<string>"
        ],
        "is_running": <boolean>
    }
}

Response Schema

{
  "num_found": <integer>,
  "results": [
    {
      "scan_status": {},
      "error_type": {},
      "last_scan_time": {},
      "kubernetes_summary": {},
      "vulnerabilities_summary": {},
      "fixes_available": <integer>,
      "has_malware": {},
      "full_tag": "<string>",
      "manifest_digest": "<string>",
      "registry": "<string>",
      "repo": "<string>",
      "tag": "<string>",
      "repo_digests": [
        "<string>"
      ]
    }
  ]
}

Request Body

{"query"=>"", "criteria"=>{"is_running"=>true, "vulnerabilities"=>["CRITICAL"], "repositories"=>["demoartifactory/guardrails-enforcer"]}, "sort"=>[{"field"=>"vulnerabilities", "order"=>"DESC"}], "start"=>0, "rows"=>1}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;num_found&quot;:2,&quot;results&quot;:[{&quot;full_tag&quot;:&quot;docker.io/demoartifactory/guardrails-enforcer:1.2.3-rc1&quot;,&quot;registry&quot;:&quot;docker.io&quot;,&quot;repo&quot;:&quot;demoartifactory/guardrails-enforcer&quot;,&quot;tag&quot;:&quot;2.3.0-rc3&quot;,&quot;manifest_digest&quot;:&quot;sha256:a12b34c56789b674f5d011d8ddb82aa4f04434e083ac9de4b07b632c1cec594f&quot;,&quot;repo_digests&quot;:[],&quot;scan_time&quot;:&quot;2023-01-17T12:44:18Z&quot;,&quot;last_scan_time&quot;:&quot;2023-01-17T12:44:18Z&quot;,&quot;vulnerabilities_summary&quot;:{&quot;CRITICAL&quot;:{&quot;amount&quot;:1,&quot;fixes&quot;:1},&quot;HIGH&quot;:{&quot;amount&quot;:4,&quot;fixes&quot;:3},&quot;LOW&quot;:{&quot;amount&quot;:50,&quot;fixes&quot;:33},&quot;MEDIUM&quot;:{&quot;amount&quot;:26,&quot;fixes&quot;:24}},&quot;fixes_available&quot;:61,&quot;scan_status&quot;:&quot;SCANNED&quot;,&quot;kubernetes_summary&quot;:{&quot;clusters&quot;:1,&quot;deployments&quot;:1,&quot;namespaces&quot;:1,&quot;workloads&quot;:1},&quot;workloads_count&quot;:1,&quot;exceptions&quot;:0,&quot;can_rescan_image&quot;:true,&quot;error_type&quot;:&quot;&quot;,&quot;has_malware&quot;:false}]}