Featherlane AI
ReferenceHTTP API

Policies

GET
/v1/policies

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/policies"
{  "policies": [    {      "action": "string",      "description": "string",      "enabled": true,      "family": "content",      "id": "string",      "owner_agent_id": "string",      "severity": "low"    }  ]}
POST
/v1/policies

Request Body

application/yaml

Policy document, YAML or JSON

TypeScript Definitions

Use the request body type in TypeScript.

body*string

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/policies" \  -H "Content-Type: application/yaml" \  -d 'string'
{  "description": "string",  "enabled": true,  "family": "content",  "id": "string",  "severity": "low",  "source_yaml": "string"}
PATCH
/v1/policies/batch/enabled

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/v1/policies/batch/enabled" \  -H "Content-Type: application/json" \  -d '{    "enabled": true,    "ids": [      "string"    ]  }'
{  "policies": [    {      "action": "string",      "description": "string",      "enabled": true,      "family": "content",      "id": "string",      "owner_agent_id": "string",      "severity": "low"    }  ]}
POST
/v1/policies/draft

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Natural-language description posted to POST /v1/policies/draft.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/policies/draft" \  -H "Content-Type: application/json" \  -d '{    "prompt": "string"  }'
{  "draft": {    "action": "permit",    "description": "string",    "id": "string",    "match_type": "literal",    "match_value": "string",    "rewrite": "string",    "severity": "low"  }}
POST
/v1/policies/validate

Request Body

application/yaml

Policy document, YAML or JSON

TypeScript Definitions

Use the request body type in TypeScript.

body*string

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/policies/validate" \  -H "Content-Type: application/yaml" \  -d 'string'
{  "errors": [    {      "message": "string",      "path": "string"    }  ],  "policy_id": "string",  "valid": true}
GET
/v1/policies/{id}

Path Parameters

id*string

Policy identifier

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/v1/policies/string"
{  "description": "string",  "enabled": true,  "family": "content",  "id": "string",  "severity": "low",  "source_yaml": "string"}
DELETE
/v1/policies/{id}

Path Parameters

id*string

Policy identifier

Response Body

application/json

application/json

application/json

curl -X DELETE "https://example.com/v1/policies/string"
Empty
PATCH
/v1/policies/{id}/enabled

Path Parameters

id*string

Policy identifier

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/v1/policies/string/enabled" \  -H "Content-Type: application/json" \  -d '{    "enabled": true  }'
{  "description": "string",  "enabled": true,  "family": "content",  "id": "string",  "severity": "low",  "source_yaml": "string"}