Skip to main content

List Data Policy Rules

List the transformation rules of a data policy. Rules define lookup cascades, Lua scripts, direct mappings, and computed fields executed during resolution.

Retrieve the list of transformation rules for a data policy. Rules define the actual transformation logic executed during resolution: lookup cascades against reference tables, Lua scripting for custom logic, direct field-to-field mappings, deterministic computations, and format transformations. Rules are compiled into topological execution order based on field dependencies.

Each rule targets a specific output field and declares its rule type and configuration. The policy compiler validates that all rule dependencies are satisfiable and detects circular references at compile time. During execution, rules are processed in dependency order so that upstream fields are resolved before downstream rules that read from them.

GET/v1/data-policies/{id}/rules

Response

Response fields

dataarrayArray of rule objects.
data[].idstringRule UUID.
data[].field_keystringTarget output field key.
data[].rule_typestringRule type (e.g. lookup, direct, lua, compute, format).
data[].configobjectRule-type-specific configuration.
data[].orderintegerExecution order within the compiled pipeline.

curl

Response

{
  "data": [
    {
      "id": "r1a2b3c4-0001",
      "field_key": "country_code",
      "rule_type": "lookup",
      "config": {
        "table": "country_codes",
        "source_field": "country",
        "fallback": "llm"
      },
      "order": 1
    },
    {
      "id": "r1a2b3c4-0002",
      "field_key": "currency",
      "rule_type": "lua",
      "config": {
        "script": "if cell.country_code == 'US' then return 'USD' end"
      },
      "order": 2
    }
  ]
}

Errors

Error responses

401unauthorizedMissing or invalid API key.
404not_foundData policy not found or does not belong to your organization.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.