APIPolicies
Evaluate CEL expression
Evaluate a CEL expression against a sample context.
POST
Evaluate a CEL expression against a sample context.
ApiKeyAuthheader
AuthorizationBearer <token>Bearer token authentication. Send an API key (a saai_api_-prefixed token) as Authorization: Bearer <token>.
Required permission
view_policiesapplication/json- body
expression*stringCEL expression to evaluate
Length
1 <= lengthcontext*The policy context to evaluate the expression against.
The request has succeeded.
application/json- response
match*booleanWhether the expression matched (returned true)
error?stringError message if evaluation failed
curl -X POST "https://example.com/policies/cel/evaluate" \ -H "Content-Type: application/json" \ -d '{ "expression": "string", "context": { "agent": { "id": "string", "name": "string", "slug": "string" }, "user": { "id": "string", "name": "string", "email": "string", "groups": [ "string" ] }, "mcp": { "id": "string", "name": "string", "slug": "string" } } }'{ "match": true, "error": "string"}