Type-ahead entity search
Learn how this operation performs a type-ahead search for entities by attribute values, tags, type, and roles.
Request - You can use one of the following endpoints for type-ahead search of entities:
GET {TenantURL}/entities/_typeAheadSearch
POST {TenantURL}/entities/_typeAheadSearch
POST
method and pass the parameters through
the request body.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. |
select
| No | Comma-separated list of properties from entity structure that should
be returned in a response. Allows you to return partial entity object.
Additional system
properties are:
| |
max
| No | Positive Integer value to identify maximum number of entities for each type to return in a response. Default value is 3. | |
options
| No | Comma-separated list of different options. Available options:
| |
scoreEnabled | No | When set to true , documents with search hits in
labels get more search relevance score. The default value is
false . | |
Body (Only for the POST
method) | No | Indicates the JSON body that can have all the same fields as
supported in the query parameters. Note: The query parameters have
priority and override the body parameters. Example:
|
Response
JSON array of entity objects for each type from tenant matching filter request in format, order that is defined by query parameters.
Example Request
Find Entities Starting With Test
GET {TenantURL}/entities/_typeAheadSearch ? filter =
(containsWordStartingWith(attributes, 'test')) & max = 1
Headers: Authorization: Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512
Example Response
GET {TenantURL}/entities/_typeAheadSearch?filter=(containsWordStartingWith(attributes,'test'))&max=1
Headers:
Authorization: Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512,
Total: 2
[ { "URI": "entities/20", "type": "configuration/entityTypes/HCO", ... },
{ "URI": "entities/142","type": "configuration/entityTypes/HCP", ... } ]