Terms aggregation query on a given property.
POST/api/query/termsAggregation
Bucket counts come from a per-shard sample and are approximate; use /api/query with trackTotalCountUpTo: -1 for an exact count. termsAggregationProperty must be a keyword/text property in dot notation (/*/ path syntax returns no buckets; numeric properties are rejected). searchTerm is a case-insensitive contains filter.
Request
Responses
- 200
- 400
- 401
- 403
- 406
- 415
- 503
Returns the top N terms aggregations matching a given search expression for the given property.
Invalid request body. Please be aware that termsAggregationProperty is required
Not Authorized
Not Allowed
No representation matches the Accept header. This API carries its version in the media type, so asking for a version it no longer serves — for example application/vnd.hxcs.v0+json — is answered here.
Unsupported request body media type. Accepted: application/json.
The search index is unreachable. The request was not served and can be retried; Retry-After gives a delay in seconds.
Response Headers
Seconds to wait before retrying.