Aggregate Date Histogram (deprecated)

Deprecated. Use POST /api/search with a date_histogram definition in query.aggregations. Search aggregations require private data sources.
Documentation: Aggregations with Search API
Date Histogram Aggregate endpoint enables user to query the aggregated result based on the number of days. Mostly used to generate dashboards, reports, and graphs.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
int32
30 to 300

This parameter creates and caches a pointer to the results of the query for the specified duration (in seconds) specified. This pointer prevents new data from entering the results of the query containing duplicates or gaps in paging. It also has the effect of improving performance while paging through query results.

Body Params

The date histogram aggregate request containing the query and aggregation parameters.

continuation_token
object

Used to indicate that the request should be long lived.

int32 | null

Set keep_alive_seconds as a query parameter on the endpoint. The endpoint overwrites this body field with the query parameter.

string
required
length ≥ 1

A plain Apache Lucene query string.

data_sources
array of strings
required

Required. The sources to search, using Auto source names such as twitter_auto. Use the private. prefix for private data, for example private.twitter_auto. A name the API key cannot access returns 403 with Cannot view data source.

data_sources*
Headers
string

API key for authentication.

string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Responses

401

Unauthorized. The apikey header is missing or invalid.

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json