Skip to main content
POST
/
api
/
v2
/
policies
/
{policy_id}
/
clone
Clone Policy
curl --request POST \
  --url https://{organization_id}.platform.barndoor.ai/api/v2/policies/{policy_id}/clone \
  --header 'Authorization: Bearer <token>'
{
  "policy": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "organization_id": "<string>",
    "name": "<string>",
    "status": "<string>",
    "mcp_server_id": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "created_by_user_id": "<string>",
    "updated_by_user_id": "<string>",
    "support_contact": "<string>",
    "description": "<string>",
    "application_ids": [
      "<string>"
    ],
    "tags": [
      "<string>"
    ],
    "rules": [
      {
        "name": "",
        "authorized": false,
        "actions": [
          "<string>"
        ],
        "roles_groups": [
          "<string>"
        ],
        "condition": {
          "match": {
            "expr": "<string>"
          }
        }
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

policy_id
string
required

Response

Successful Response

Envelope for detail responses.

policy
PolicyDetail · object
required

Detailed representation of a policy including rules.