Search Repositories

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

Search for repositories and get a list of repositories 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>"
    }
  ]
}

Response Schema

{
  "num_found": <integer>,
  "results": [
    {
      "repo": "<string>",
      "registry": "<string>",
      "all_tags": <integer>,
      "scanned_tags": <integer>,
      "last_scan_time": "<string>"
    }
  ]
}

Request Body

{"query"=>"proxy", "sort"=>[{"field"=>"last_scanned", "order"=>"DESC"}], "start"=>0, "rows"=>50}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

&quot;{\n    \&quot;num_found\&quot;: 15,\n    \&quot;results\&quot;: [\n        {\n            \&quot;repo\&quot;: \&quot;kube-proxy-amd64\&quot;,\n            \&quot;registry\&quot;: \&quot;my.demo.repo\&quot;,\n            \&quot;all_tags\&quot;: 4,\n            \&quot;scanned_tags\&quot;: 3,\n            \&quot;last_scan_time\&quot;: \&quot;2023-05-01T11:38:17Z\&quot;\n        }\n}&quot;