Create a rollup job
Deprecated /_rollup/job/{id} WARNING: From 8.15.0, calling this API in a cluster with no rollup usage will fail with a message about the deprecation and planned removal of rollup features. A cluster needs to contain either a rollup job or a rollup index in order for this API to be allowed to run.
The rollup job configuration contains all the details about how the job should run, when it indexes documents, and what future queries will be able to run against the rollup index.
There are three main sections to the job configuration: the logistical details about the job (for example, the cron schedule), the fields that are used for grouping, and what metrics to collect for each group.
Jobs are created in a STOPPED state. You can start them with the start rollup jobs API.
Required authorization
- Cluster privileges:
manage,manage_rollup
Parameters
path Path Parameters
| Name | Type |
|---|---|
id
required
Identifier for the rollup job. This can be any alphanumeric string and uniquely identifies the data that is associated with the rollup job. The ID is persistent; it is stored with the rolled up data. If you create a job, let it run for a while, then delete the job, the data that the job rolled up is still be associated with this job ID. You cannot create a new job with the same ID since that could lead to problems with mismatched job configurations. | type TypesId = string |
Request Body
cron: string;
groups:
index_pattern: string;
metrics?:
page_size: number;
rollup_index:
timeout?:
headers?:
}
Responses
acknowledged: boolean;
}