AddOrUpdatePolicy
Add or update one or more policies in the policy store.HTTP Request
Authentication
Requires BasicAuth credentials configured in the Cerbos server.Request Body
Array of policy objects to add or update. Minimum 1, maximum 100 policies.
Response
Empty object indicating successful operation
Example Request
ListPolicies
List all policy IDs stored in the Cerbos server with optional filtering.HTTP Request
Authentication
Requires BasicAuth credentials configured in the Cerbos server.Query Parameters
Include disabled policies in the results
Filter policies by name using a regular expression
Filter policies by scope using a regular expression
Filter policies by version using a regular expression
Filter by specific policy IDs. Maximum 25 IDs. For file-based stores (blob, disk, git), use filename with extension. For database stores (mysql, postgres, sqlite3), use the format
kind.name.version.Example: principal.sarah.vdefaultResponse
Array of policy ID strings
Example Request
Example Response
InspectPolicies
Inspect policies to see detailed information including which policies would be evaluated for a given request.HTTP Request
Authentication
Requires BasicAuth credentials configured in the Cerbos server.Query Parameters
Principal ID to inspect policies for
Resource kind to inspect policies for
Action to inspect policies for
Include disabled policies in the results
Response
Array of inspection results showing which policies would apply
Example Request
GetPolicy
Retrieve one or more policies by their IDs.HTTP Request
Authentication
Requires BasicAuth credentials configured in the Cerbos server.Query Parameters
One or more policy IDs to retrieve. Minimum 1 ID required. For file-based stores (blob, disk, git), use filename with extension. For database stores (mysql, postgres, sqlite3), use the format
kind.name.version.Example: principal.sarah.vdefaultResponse
Array of policy objects matching the requested IDs
Example Request
DeletePolicy
Permanently delete one or more policies from the policy store.HTTP Request
Authentication
Requires BasicAuth credentials configured in the Cerbos server.Request Body
Array of policy IDs to delete. Minimum 1, maximum 20 IDs. For file-based stores (blob, disk, git), use filename with extension. For database stores (mysql, postgres, sqlite3), use the format
kind.name.version.Example: principal.sarah.vdefaultResponse
Number of policies successfully deleted
Example Request
Example Response
DisablePolicy
Disable one or more policies without deleting them. Disabled policies are not evaluated during authorization checks.HTTP Request
Authentication
Requires BasicAuth credentials configured in the Cerbos server.Request Body
Array of policy IDs to disable. Minimum 1, maximum 20 IDs. For file-based stores (blob, disk, git), use filename with extension. For database stores (mysql, postgres, sqlite3), use the format
kind.name.version.Example: principal.sarah.vdefaultResponse
Number of policies successfully disabled
Example Request
Example Response
EnablePolicy
Re-enable one or more previously disabled policies.HTTP Request
Authentication
Requires BasicAuth credentials configured in the Cerbos server.Request Body
Array of policy IDs to enable. Minimum 1 ID required. For file-based stores (blob, disk, git), use filename with extension. For database stores (mysql, postgres, sqlite3), use the format
kind.name.version.Example: principal.sarah.vdefaultResponse
Number of policies successfully enabled