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

Headers

authorization
string | null

Body

application/json

Request schema for validating a permission rule.

Attributes: rule: Rule expression to validate.

rule
string
required

Response

Successful Response

Response schema for rule validation.

Attributes: valid: Whether the rule is valid. error: Error message if invalid. position: Error position (line and column) if invalid.

valid
boolean
required
error
string | null
position
Position · object