Faceted Search
The Faceted Search API returns search counts for facet terms.
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
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 Example: |
|
activeness |
No |
Available options:
Example: |
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
}}