Get the rollup job capabilities Deprecated Technical preview; Added in 6.3.0
All methods and paths for this operation:
GET /_rollup/data
GET /_rollup/data/{id}
Get the capabilities of any rollup jobs that have been configured for a specific index or index pattern.
This API is useful because a rollup job is often configured to rollup only a subset of fields from the source index. Furthermore, only certain aggregations can be configured for various fields, leading to a limited subset of functionality depending on that configuration. This API enables you to inspect an index and determine:
- Does this index have associated rollup data somewhere in the cluster?
- If yes to the first question, what fields were rolled up, what aggregations can be performed, and where does the data live?
Required authorization
- Cluster privileges:
monitor_rollup
GET /_rollup/data/{id}
Console
GET _rollup/data/sensor-*
resp = client.rollup.get_rollup_caps( id="sensor-*", )
const response = await client.rollup.getRollupCaps({ id: "sensor-*", });
response = client.rollup.get_rollup_caps( id: "sensor-*" )
$resp = $client->rollup()->getRollupCaps([ "id" => "sensor-*", ]);
curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_rollup/data/sensor-*"
Response examples (200)
A successful response from `GET _rollup/data/sensor-*` for a rollup job that targets the index pattern `sensor-*`. 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_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" } ] } } ] } }