Skip to main content
GET
/
api
/
v2
/
policies
List Policies
curl --request GET \
  --url https://{organization_id}.platform.barndoor.ai/api/v2/policies \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "status": "<string>",
      "mcp_server_id": "<string>",
      "updated_at": "2023-11-07T05:31:56Z",
      "updated_by_user_id": "<string>",
      "mcp_server_name": "<string>",
      "application_ids": [
        "<string>"
      ],
      "application_names": [
        "<string>"
      ],
      "tags": [
        "<string>"
      ],
      "updated_by_user_name": "<string>",
      "description": "<string>",
      "rules_count": 0
    }
  ],
  "pagination": {
    "page": 123,
    "limit": 123,
    "total": 123,
    "pages": 123,
    "previous_page": 123,
    "next_page": 123
  }
}

Authorizations

Authorization
string
header
required

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

Query Parameters

search
string | null

Search by policy ID, name, description, or support contact

status
string[] | null

Filter by status values

mcp_server_id
string[] | null

Filter by MCP server IDs

agent_id
string[] | null

Filter by agent/application IDs

page
integer
default:1

Page number (1-based)

Required range: x >= 1
limit
integer
default:10

Number of items per page (max 100)

Required range: 1 <= x <= 100

Response

Successful Response

data
PolicySummary · object[]
required

Array of items for current page

pagination
PaginationMeta · object
required

Pagination metadata