Search Scan Logs
POST {{cb_url}}/containers/v1beta/orgs/{{cb_org_key}}/inventory/scan_logs/_search
Search for scan logs that match the specified criteria
RBAC Permissions Required
Permission (.notation name) | Operation(s) |
---|---|
workloads.container.image | READ |
Request Schema
{
"query": "<string>",
"criteria": {
"scan_time": {
"range": "<string>",
"start": "<string>",
"end": "<string>"
},
"full_tags": [
"<string>"
],
"repositories": [
"<string>"
],
"digests": [
"<string>"
],
"sources": [
"<string>"
],
"registries": [
"<string>"
],
"vulnerabilities": [
"<string>"
],
"clusters": [
"<string>"
],
"namespaces": [
"<string>"
]
}
}
Response Schema
{
"num_found": <integer>,
"results": [
{
"full_tag": "<string>",
"manifest_digest": "<string>",
"scan_time": "<string>",
"source": "<string>",
"vulnerabilities_summary": {
"CRITICAL": {
"amount": <integer>
},
"HIGH": {
"amount": <integer>
},
"MEDIUM": {
"amount": <integer>
},
"LOW": {
"amount": <integer>
},
"UNKNOWN": {
"amount": <integer>
}
},
"workloads": <integer>,
"has_malware": <boolean>
},
{
"full_tag": "<string>",
"manifest_digest": "<string>",
"scan_time": "<string>",
"source": "<string>",
"vulnerabilities_summary": {
"CRITICAL": {
"amount": <integer>
},
"HIGH": {
"amount": <integer>
},
"MEDIUM": {
"amount": <integer>
},
"LOW": {
"amount": <integer>
},
"UNKNOWN": {
"amount": <integer>
}
},
"workloads": <integer>
"has_malware": <boolean>
}
]
}
Request Body
{"query"=>"", "sort"=>[{"field"=>"scan_time", "order"=>"DESC"}], "start"=>0, "rows"=>50, "criteria"=>{"namespaces"=>["demonamespace"], "scan_time"=>{"start"=>"2023-04-01T03:34:31.972Z"}}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"num_found":1,"results":[{"full_tag":"demo.io/demo-samples/microservices-demo/myservice:v0.1.2","manifest_digest":"sha256:1abc234d56ef7dda66d924651df9ea89831cd8b04f2a02d412d2f3b0a92e1a7b","workloads":2,"scan_time":"2023-04-05T08:03:13Z","source":"CLUSTER_SCAN","vulnerabilities_summary":{"HIGH":{"amount":17},"MEDIUM":{"amount":10}},"has_malware":false}]}