Get Scan Log Facets

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

Get facets that can be used to guide other scan log searches.

RBAC Permissions Required

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

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>"
    ]
  },
  "terms": {
    "fields": [
      "<string>"
    ],
    "rows": <integer>
  }
}

Request Body

{"query"=>"kube", "terms"=>{"fields"=>["clusters", "scan_status", "repositories"], "rows"=>50}, "criteria"=>{"scan_time"=>{}}}

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;:78},{&quot;name&quot;:&quot;SCAN_FAILED&quot;,&quot;total&quot;:1},{&quot;name&quot;:&quot;NOT_SCANNED&quot;,&quot;total&quot;:8},{&quot;name&quot;:&quot;PENDING_SCAN&quot;,&quot;total&quot;:4}]},{&quot;field&quot;:&quot;clusters&quot;,&quot;values&quot;:[{&quot;name&quot;:&quot;demo:cluster-one&quot;,&quot;total&quot;:14},{&quot;name&quot;:&quot;test:testing-cluster-one&quot;,&quot;total&quot;:14}]},{&quot;field&quot;:&quot;repositories&quot;,&quot;values&quot;:[{&quot;name&quot;:&quot;demoartifactory/cluster-scanner&quot;,&quot;total&quot;:1}]}]}