Get the rollup index capabilities Deprecated Technical preview; Added in 6.4.0
Get the rollup capabilities of all jobs inside of a rollup index. A single rollup index may store the data for multiple rollup jobs and may have a variety of capabilities depending on those jobs. This API enables you to determine:
- What jobs are stored in an index (or indices specified via a pattern)?
- What target indices were rolled up, what fields were used in those rollups, and what aggregations can be performed on each job?
Required authorization
- Index privileges:
read
GET /{index}/_rollup/data
Console
GET /sensor_rollup/_rollup/data
resp = client.rollup.get_rollup_index_caps( index="sensor_rollup", )
const response = await client.rollup.getRollupIndexCaps({ index: "sensor_rollup", });
response = client.rollup.get_rollup_index_caps( index: "sensor_rollup" )
$resp = $client->rollup()->getRollupIndexCaps([ "index" => "sensor_rollup", ]);
curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/sensor_rollup/_rollup/data"
client.rollup().getRollupIndexCaps(g -> g .index("sensor_rollup") );
Response examples (200)
A successful response from `GET /sensor_rollup/_rollup/data`. The response contains the rollup job ID, the index that holds the rolled data, and the index pattern that the job was targeting. It also shows a list of fields that contain data eligible for rollup searches. For example, you can use a `min`, `max`, or `sum` aggregation on the `temperature` field, but only a `date_histogram` on `timestamp`.
{ "sensor_rollup" : { "rollup_jobs" : [ { "job_id" : "sensor", "rollup_index" : "sensor_rollup", "index_pattern" : "sensor-*", "fields" : { "node" : [ { "agg" : "terms" } ], "temperature" : [ { "agg" : "min" }, { "agg" : "max" }, { "agg" : "sum" } ], "timestamp" : [ { "agg" : "date_histogram", "time_zone" : "UTC", "fixed_interval" : "1h", "delay": "7d" } ], "voltage" : [ { "agg" : "avg" } ] } } ] } }