Skip to main content
Returns the ID and type of each DataField that matches the parameters you send. Use the returned dataFieldId to reference a DataField, for example in a treatment’s eligibility rules.
Requires a Treatment Management API key in the x-api-key header. Read-only and safe to retry.

Request body

DataFieldParams

Each item describes one DataField. Set exactly one of these fields:

User attribute

Treatment interaction

Event

Aggregations

Response

Each entry in dataFields:

Example

Request
Response (200)

Errors

Errors use the standard error response. Handle them by HTTP status, not by message.
A 404 fails the whole request. No DataFields are returned, including the ones that exist, and message names only the first item that did not match. To get the DataFields that exist and a list of the items that do not, set allowMissing (below).

Partial results with allowMissing

Set allowMissing to true to get the DataFields that exist even when some items do not match, and a list of the items that did not. With allowMissing set to true:
  • The response is 200, even when some or all items do not match.
  • dataFields contains only the items that matched. Match each entry to your request by its dataFieldParams, not by position.
  • An item that matches more than one DataField still fails the request with 404.
  • 400 and 403 errors are unchanged.
Request body
Response (200)