Unify and manage your data

Get aggregated counts by field

Learn more about how to retrieve aggregated counts grouped by a specified field for summary reporting and dashboard use cases.

Use Get aggregated counts by field API to return aggregated counts grouped by a specified field, such as lookupType, status, or source. You can also apply an optional filter expression and paginate results when the number of groups is large.

HTTP method and endpoint

Use the following HTTP method and endpoint path to submit the request:

GET /configuration/{tenantId}/autopilot/stats/_facets?field={field}&filter={filter}&max={max}&pageNo={pageNo}

The following table describes the endpoint path parameters.

ParameterTypeRequiredDescription
tenantIdStringYesTenant identifier

Query parameters

The following table describes the query parameters.

ParameterTypeRequiredDescriptionAccepted values / Default
fieldStringYesField to aggregate on.Examples: lookupType, status, source
filterStringNoFilter expression used to limit the aggregation scope. Example: equals(status,"TRACKING")
maxIntegerNoNumber of groups to return per page.Default: 10000
pageNoIntegerNoPage number used to retrieve additional groups.Default: 1

Request headers

The following request headers must be included.

HeaderValueRequired
AuthorizationBearer {token}Yes

Request body

This operation does not require a request body.

Response fields

The following table describes the fields returned in the response body if filed chosen is status.

FieldTypeDescription
statusObjectMap of values and their aggregated counts for the requested field.
TRACKINGNumberCount of records for the TRACKING value.
AUTOMAPPEDNumberCount of records for the AUTOMAPPED value.
REJECTEDNumberCount of records for the REJECTED value.
MISSPELLEDNumberCount of records for the MISSPELLED value.
Note: If the selected field is lookuptype or source, the response may vary depending on your RDM configuration.

Example response

The following example shows a successful response.

{
  "status": {
    "TRACKING": 25,
    "AUTOMAPPED": 12,
    "REJECTED": 3,
    "MISSPELLED": 8
  }
}