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.
/v1/data-policies/{id}/rulesResponse
Response fields
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