Create rollup jobs API

Creates a rollup job.

This functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.


PUT _rollup/job/<job_id>


  • If the Elasticsearch security features are enabled, you must have manage or manage_rollup cluster privileges to use this API. For more information, see Security privileges.


Jobs are created in a STOPPED state. You can start them with the start rollup jobs API.

Path parameters

(Required, string) Identifier for the rollup job.

Request body

(Required, string) A cron string which defines when the rollup job should be executed.
(Required, object) Defines the grouping fields that are defined for this rollup job. See rollup job config.
(Required, string) The index or index pattern to roll up. Supports wildcard-style patterns (logstash-*).
(Optional, object) Defines the metrics to collect for each grouping tuple. See rollup job config.
(Required, integer) The number of bucket results that are processed on each iteration of the rollup indexer. A larger value tends to execute faster, but requires more memory during processing.
(Required, string) The index that contains the rollup results. The index can be shared with other rollup jobs.

For more details about the job configuration, see Rollup job configuration.


The following example creates a rollup job named "sensor", targeting the "sensor-*" index pattern:

PUT _rollup/job/sensor
    "index_pattern": "sensor-*",
    "rollup_index": "sensor_rollup",
    "cron": "*/30 * * * * ?",
    "page_size" :1000,
    "groups" : {
      "date_histogram": {
        "field": "timestamp",
        "fixed_interval": "1h",
        "delay": "7d"
      "terms": {
        "fields": ["node"]
    "metrics": [
            "field": "temperature",
            "metrics": ["min", "max", "sum"]
            "field": "voltage",
            "metrics": ["avg"]

When the job is created, you receive the following results:

  "acknowledged": true