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.imageREAD

API Documentation

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

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;num_found&quot;:1,&quot;results&quot;:[{&quot;full_tag&quot;:&quot;demo.io/demo-samples/microservices-demo/myservice:v0.1.2&quot;,&quot;manifest_digest&quot;:&quot;sha256:1abc234d56ef7dda66d924651df9ea89831cd8b04f2a02d412d2f3b0a92e1a7b&quot;,&quot;workloads&quot;:2,&quot;scan_time&quot;:&quot;2023-04-05T08:03:13Z&quot;,&quot;source&quot;:&quot;CLUSTER_SCAN&quot;,&quot;vulnerabilities_summary&quot;:{&quot;HIGH&quot;:{&quot;amount&quot;:17},&quot;MEDIUM&quot;:{&quot;amount&quot;:10}},&quot;has_malware&quot;:false}]}