v1

latestOpenAPI 3.0.32026-07-1761731.6 KB

Partially evaluate a query

post/v1/compile/{path}

Path parameters

pathstring urlPath required
Example:app/rbac

The path separator is used to access values inside object and array documents. If the path indexes into an array, the server will attempt to convert the array index to an integer. If the path element cannot be converted to an integer, the server will respond with 404.

Query parameters

prettyboolean

If parameter is true, response will formatted for humans.

explain'notes' | 'fails' | 'full' | 'debug'

Return query explanation in addition to result.

metricsboolean

Return query performance metrics in addition to result.

instrumentboolean

Instrument query evaluation and return a superset of performance metrics in addition to result.

Headers

Accept-Encoding'gzip'

Indicates the server should respond with a gzip encoded body. The server will send the compressed response only if its length is above server.encoding.gzip.min_length value. See the configuration section

Content-Encoding'gzip'

Indicates that the request body is gzip encoded

Request body

unknownsstring[]

The terms to treat as unknown during partial evaluation.

Example request

{
  "input": {
    "user": "alice",
    "action": "read",
    "object": "id123",
    "type": "dog"
  }
}

Response

Successful response