Get Policy

GET {{cb_url}}/containers/v1/orgs/{{cb_org_key}}/guardrails/management/policies/{{cb_container_policy_id}}

Get the policy details for the specified policy id.

RBAC Permissions Required

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

API Documentation

Response Schema

{
    "scope_metadata": {
        "scope_id": "<uuid>",
        "scope_name": "<string>"
    },
    "creator": "<string>",
    "policy_id": "<uuid>",
    "name": "<string>",
    "status": "<string>",
    "rules": [
        {
            "id": "<string>",
            "action": "<string>",
            "is_enabled": <boolean>,
            "preset_id": "<string>",
            "preset_name": "<string>"
        }
    ],
    "exceptions": {
        "ruleId1": [
            {
                "name": "<string>",
                "username": "<string>",
                "labels": [
                    {
                        "key": "<string>",
                        "value": "<string>"
                    }
                ]
            }
        ]
    },
    "include_init_containers": <boolean>,
    "include_ephemeral_containers": <boolean>
}

HEADERS

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

RESPONSES

status: OK

{&quot;policy_id&quot;:&quot;12a345cde-0a9b-464a-804e-0cbb3201c68f&quot;,&quot;name&quot;:&quot;demo-policy&quot;,&quot;scope_metadata&quot;:{&quot;scope_id&quot;:&quot;123456a7-a607-4377-8ca3-d1020ad8fb85&quot;,&quot;scope_name&quot;:&quot;sample-scope&quot;},&quot;creator&quot;:&quot;demouser@demoorg.com&quot;,&quot;created_on&quot;:1631168658409,&quot;created_on_iso&quot;:&quot;2021-09-09T06:24:18.409Z&quot;,&quot;modified_by&quot;:&quot;demouser@demoorg.com&quot;,&quot;modified_on&quot;:1655988483580,&quot;modified_on_iso&quot;:&quot;2022-06-23T12:48:03.58Z&quot;,&quot;rules&quot;:[{&quot;id&quot;:&quot;demo-rule&quot;,&quot;action&quot;:&quot;alert&quot;,&quot;is_enabled&quot;:true}],&quot;exceptions&quot;:{},&quot;include_init_containers&quot;:false,&quot;include_ephemeral_containers&quot;:true,&quot;status&quot;:&quot;enabled&quot;}