EddytorDocs & API
Policies

Create a Cedar RLS/CLS policy for the organisation.

**Required scope:** `rls_policies:write`

POST
/v1/organisations/{org_id}/policies

Authorization

BearerAuth
AuthorizationBearer <token>

Security scheme for OpenAPI endpoints. Validates both JWT tokens and API keys.

In: header

Path Parameters

org_id*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request body for creating a policy.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/organisations/497f6eca-6276-4993-bfeb-53cbbbba6f08/policies" \  -H "Content-Type: application/json" \  -d '{    "kind": "rls"  }'
{  "id": "string",  "tableFqn": "string",  "tableId": "string",  "columnName": "string",  "kind": "rls",  "policyText": "string",  "definition": {    "effect": "permit",    "subject": {      "everyone": null,      "role": null,      "attribute": null,      "op": null,      "value": null    },    "condition": null  },  "enabled": true,  "version": 0,  "createdAt": "string",  "updatedAt": "string"}
Empty
Empty
{  "code": "string",  "message": "string",  "request_id": "string",  "details": [    {      "field": "string",      "message": "string"    }  ]}
{  "code": "string",  "message": "string",  "request_id": "string",  "details": [    {      "field": "string",      "message": "string"    }  ]}
{  "code": "string",  "message": "string",  "request_id": "string",  "details": [    {      "field": "string",      "message": "string"    }  ]}
{  "code": "string",  "message": "string",  "request_id": "string",  "details": [    {      "field": "string",      "message": "string"    }  ]}
{  "code": "string",  "message": "string",  "request_id": "string",  "details": [    {      "field": "string",      "message": "string"    }  ]}
{  "code": "string",  "message": "string",  "request_id": "string",  "details": [    {      "field": "string",      "message": "string"    }  ]}
{  "code": "string",  "message": "string",  "request_id": "string",  "details": [    {      "field": "string",      "message": "string"    }  ]}
{  "code": "string",  "message": "string",  "request_id": "string",  "details": [    {      "field": "string",      "message": "string"    }  ]}
{  "code": "string",  "message": "string",  "request_id": "string",  "details": [    {      "field": "string",      "message": "string"    }  ]}