Skip to main content
GET
/
api
/
policies
List policies
curl --request GET \
  --url https://{organization_id}.platform.barndoor.ai/api/policies \
  --header 'Authorization: Bearer <token>'
{
  "policyIds": [
    "resource.server-uuid.vdefault/agent-uuid",
    "resource.server-uuid.vdefault"
  ]
}

Authorizations

Authorization
string
header
required

JWT token obtained through Auth0 OAuth 2.0 flow with PKCE.

The token should be included in the Authorization header: Authorization: Bearer <your-jwt-token>

Use the Barndoor SDK's loginInteractive() function to obtain tokens automatically.

Query Parameters

agent_id
string<uuid>

Filter policies by agent ID. Required if server_id is not provided.

server_id
string<uuid>

Filter policies by server ID. Required if agent_id is not provided.

include_disabled
boolean
default:false

Include disabled policies in the results

Response

List of policy IDs

Response containing a list of policy IDs

policyIds
string[]

List of policy IDs matching the query

Example:
[
"resource.server-uuid.vdefault/agent-uuid",
"resource.server-uuid.vdefault"
]