Accelerate the Value of Data

Faceted Search

The Faceted Search API returns search counts for facet terms.

Note: The results of faceted search may be different when compared to the normal search results using the same filter. The entities search considers all entities, but the entities faceted search considers entities with the facet term only.

Use Faceted Search API to get a distinct list of values with numbers. You can get the exact number by executing the \_total request with filter by the value.

To know more about the /_total request, see Get Entities Total .

Request

GET {TenantURL}/entities/_facets
Table 1. Parameters
Parameter Required Description
Headers Authorization Yes Information about authentication access token in format "Bearer <accessToken>" (see details in Authentication API).
Query filter No Enables entities filtering by a condition. Format for filter query parameter: filter=({Condition Type}[AND/OR {Condition Type}]*) For more information see Filtering Entities.
facet Yes Property that should be used for defining terms and counts. Can have multiple values separated by comma. Examples: facet=type OR facet=attributes.Name OR facet=attributes.Address OR facet=attributes.Education.University OR facet=analyticsAttributes.SomeAttribute.Name OR facet=businessProcessData.businessProcessName
max No Specifies how many items to return. Default is 10.
options No

This is a comma-separated list of different options. Available option is searchByOv: search and sort by all attributes with ov only; disabled by default.

Example: options=searchByOv

activeness No

Available options:

  • active: allows search among active entities.
  • all: allows search among all (active/expired) entities.
  • not_active: allows search among expired entities.

Example: activeness=active

Response

JSON with facets, each with a list of terms and counts.

Example

Request: find Individual entities

GET {TenantURL}/entities/_facets?facet=roles,type&filter=
    (equals(type,'configuration/entityTypes/Individual'))Headers:
     Authorization: Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512 

Response

{
	"roles": {
		"Client": 4261212,
		"Prospect": 20496,
		"Employee": 12
	},
	"type": {
		"Individual": 4899212,
		"Organization": 10496,
		"Location": 12
	}}