Skip to main content

List Data Policy Rules

List the transformation rules of a data policy: lookups, Lua scripts, computed and conditional fields, executed in dependency order during resolution.

List the transformation rules of a data policy. Rules are the executable logic of resolution: reference-table lookups (exact and fuzzy), sandboxed Lua scripts, deterministic computations, conditionals, coalescing, and validation checks. The policy compiler orders rules topologically by their field dependencies, so upstream fields always resolve before the rules that read them.

Each rule declares a rule_type, its configuration, and its position (ordinal) in the policy. The compiler validates every rule at compile time: unknown rule types and circular field dependencies are rejected before anything executes against your data.

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

Path parameters

id*uuidData policy UUID.

Response

Response fields

dataarrayArray of rule objects, ordered by ordinal.
data[].idstringRule UUID.
data[].field_keystringTarget output field key.
data[].rule_typestringRule type (e.g. select_field, transform, lookup_exact, script).
data[].configobjectRule-type-specific configuration.
data[].ordinalintegerPosition of the rule within the policy.
data[].created_atstringISO 8601 creation timestamp.
links.selfstringURL to this rule list.
links.policystringURL to the parent policy.

curl

Response

{
  "data": [
    {
      "id": "r1a2b3c4-0001",
      "field_key": "country_code",
      "rule_type": "lookup_exact",
      "config": {
        "reference_table_id": "country_codes",
        "search_column": "name",
        "output_column": "iso2"
      },
      "ordinal": 1,
      "created_at": "2024-10-01T09:10:00.000Z"
    },
    {
      "id": "r1a2b3c4-0002",
      "field_key": "currency",
      "rule_type": "script",
      "config": {
        "script": "if record:get('country_code') == 'US' then return 'USD' end"
      },
      "ordinal": 2,
      "created_at": "2024-10-01T09:12:00.000Z"
    }
  ],
  "links": {
    "self": "/v1/data-policies/p1a2b3c4-e5f6-7890-abcd-ef1234567890/rules",
    "policy": "/v1/data-policies/p1a2b3c4-e5f6-7890-abcd-ef1234567890"
  }
}

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.
Fuzzy lookups cascade through configurable tiers: exact match after normalization (lowercase + trim) first, then token-based Jaccard matching against the reference table. The rule's error behavior decides what happens when no tier clears the confidence threshold.