Skip to main content
POST
/
api
/
v1
/
roles
/
test-rule
Test Rule
curl --request POST \
  --url https://api.example.com/api/v1/roles/test-rule \
  --header 'Content-Type: application/json' \
  --data '
{
  "rule": "<string>",
  "context": {}
}
'
{
  "allowed": true,
  "error": "<string>",
  "evaluation_details": "<string>"
}

Headers

authorization
string | null

Body

application/json

Request schema for testing a permission rule.

Attributes: rule: Rule expression to test. context: Sample context data for testing.

rule
string
required
context
Context · object
required

Response

Successful Response

Response schema for rule testing.

Attributes: allowed: Whether access would be granted. error: Error message if evaluation failed. evaluation_details: Details about the evaluation.

allowed
boolean
required
error
string | null
evaluation_details
string | null