Skip to main content
GET
Rule grammar spec

Authorizations

Authorization
string
header
required

Response

200 - application/json

Grammar spec

Canonical rule DSL spec. Each section documents what the parser accepts; consumers (LLM agents, integrations) generate rule_text against this contract. Examples are guaranteed to parse — a CI test feeds them through ParseTree.

variables
object
operators
object
functions
object
coverage_functions
object

Coverage functions and the calendar windows the projection stores, with each function's own syntax, return value and examples under functions. Separate from functions at the top level because the operand is a reporting period's completeness, not a data point's value. TIME_NOT_CAPTURED is compared only against a duration literal (literals.duration).

ratio_functions
object

Functions that divide one measurement by another. The DSL has no arithmetic operators, so a ratio is authored as a call — RATIO(<numerator>, <denominator>) — whose operands are each a data point reference or an aggregate over one.

boolean
object
literals
object
examples
object[]
substitution_methods
object

Served substitution method catalog: every method's name, the params each one requires, and the percentile calculation.

validation_error_codes
object

Map of error code → description and how_to_fix.