Get All Scopes With Policies

GET {{cb_url}}/containers/v1/orgs/{{cb_org_key}}/guardrails/management/policies_scopes

Get the list of scopes configured in the system and the policy that is applied on each.

Can be used to determine what scope can be used when creating a new policy.

RBAC Permissions Required

Permission (.notation name)Operation(s)
kubernetes.securityREAD

API Documentation

Response Schema

[
  {
    "scope_id": "<uuid>",
    "name": "<string>",
    "policy_metadata": {
      "policy_id": "<uuid>",
      "policy_name": "<string>"
    },
    "lifecycle_phase": "<string>",
    "workload_count": <integer>
  }
]

HEADERS

KeyDatatypeRequiredDescription
X-AUTH-TOKENstring(Required) Carbon Black Access Key
Acceptstring

RESPONSES

status: OK

{&quot;items&quot;:[{&quot;scope_id&quot;:&quot;any-scope-id&quot;,&quot;name&quot;:&quot;Any&quot;,&quot;policy_metadata&quot;:{&quot;policy_id&quot;:&quot;123a4b56-520f-411a-a146-3be26dfbbdbd&quot;,&quot;policy_name&quot;:&quot;default&quot;},&quot;workload_count&quot;:117,&quot;lifecycle_phase&quot;:&quot;deployed&quot;},{&quot;scope_id&quot;:&quot;123456a7-a607-4377-8ca3-d1020ad8fb85&quot;,&quot;name&quot;:&quot;demo-scope&quot;,&quot;policy_metadata&quot;:{&quot;policy_id&quot;:&quot;a123bc56-ce51-4569-94a1-defa909e1615&quot;,&quot;policy_name&quot;:&quot;demo-policy&quot;},&quot;workload_count&quot;:33,&quot;lifecycle_phase&quot;:&quot;any&quot;}]}