Testing

Test a policy

Evaluate a policy against sample input without executing actions. Useful for validating policy behavior before enabling.

post/api/v1/policies/{id}/test

Request

Request body

querystring required

Sample query to test against

userobject

User context for testing

request_typestring

Type of request being simulated

contextobject

Additional context for testing

Example request

{
  "user": {
    "email": "user@company.com",
    "role": "analyst",
    "department": "sales"
  }
}

Response

Test results

matchedboolean

Whether the policy conditions matched

blockedboolean

Whether a block action would trigger

explanationstring

Human-readable explanation of the result

eval_time_msnumber float

Evaluation time in milliseconds

Changes

No recorded changes to this operation across all 1 revision of this API.