Skip to main content

List Data Policy Fields

List the declared output fields of a data policy. Fields define the output contract — which field keys the policy produces and their expected types.

Retrieve the list of declared output fields for a data policy. Fields define the output contract: the set of field keys that the policy executor will emit in resolution results. Only fields declared here appear in the final output; any intermediate values computed by rules but not declared as fields are discarded.

Each field has a field_key (the output column name) and a type (the expected value type). The field list is used by the resolution pipeline to validate output schema compliance and by the results UI to determine which columns to display. Adding or removing fields creates a new policy version.

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

Response

Response fields

dataarrayArray of field definition objects.
data[].field_keystringOutput field key name.
data[].typestringExpected value type (e.g. string, number, date).
data[].descriptionstring | nullOptional field description.

curl

Response

{
  "data": [
    { "field_key": "country_code", "type": "string", "description": "ISO 3166-1 alpha-2 country code" },
    { "field_key": "currency", "type": "string", "description": "ISO 4217 currency code" },
    { "field_key": "invoice_date", "type": "date", "description": "Normalized invoice date in ISO 8601 format" }
  ]
}

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.