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.image | READ |
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
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"num_found":2,"results":[{"full_tag":"docker.io/demoartifactory/guardrails-enforcer:1.2.3-rc1","registry":"docker.io","repo":"demoartifactory/guardrails-enforcer","tag":"2.3.0-rc3","manifest_digest":"sha256:a12b34c56789b674f5d011d8ddb82aa4f04434e083ac9de4b07b632c1cec594f","repo_digests":[],"scan_time":"2023-01-17T12:44:18Z","last_scan_time":"2023-01-17T12:44:18Z","vulnerabilities_summary":{"CRITICAL":{"amount":1,"fixes":1},"HIGH":{"amount":4,"fixes":3},"LOW":{"amount":50,"fixes":33},"MEDIUM":{"amount":26,"fixes":24}},"fixes_available":61,"scan_status":"SCANNED","kubernetes_summary":{"clusters":1,"deployments":1,"namespaces":1,"workloads":1},"workloads_count":1,"exceptions":0,"can_rescan_image":true,"error_type":"","has_malware":false}]}