APIPolicies

Validate CEL expression

Validate a CEL expression.

POST
/policies/cel/validate

Validate a CEL expression.

Authorization

ApiKeyAuth
headerAuthorizationBearer <token>

Bearer token authentication. Send an API key (a saai_api_-prefixed token) as Authorization: Bearer <token>.

Required permission

view_policies

Request Body

application/json
  1. body
expression*string

CEL expression to validate

Length1 <= length

Response Body

The request has succeeded.

application/json
  1. response
valid*boolean

Whether the expression is valid

error?string

Human-readable error message if invalid

position?integer

Character offset of the error in the expression

Formatint32
curl -X POST "https://example.com/policies/cel/validate" \  -H "Content-Type: application/json" \  -d '{    "expression": "string"  }'
{  "valid": true,  "error": "string",  "position": 0}