Delete rollup jobs API

edit

Deprecated in 8.11.0.

Rollups will be removed in a future version. Use downsampling instead.

Deletes an existing rollup job.

Request

edit

DELETE _rollup/job/<job_id>

Prerequisites

edit
  • 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.

Description

edit

A job must be stopped first before it can be deleted. If you attempt to delete a started job, an error occurs. Similarly, if you attempt to delete a nonexistent job, an exception occurs.

When a job is deleted, that only removes the process that is actively monitoring and rolling up data. It does not delete any previously rolled up data. This is by design; a user may wish to roll up a static dataset. Because the dataset is static, once it has been fully rolled up there is no need to keep the indexing rollup job around (as there will be no new data). So the job can be deleted, leaving behind the rolled up data for analysis.

If you wish to also remove the rollup data, and the rollup index only contains the data for a single job, you can simply delete the whole rollup index. If the rollup index stores data from several jobs, you must issue a delete-by-query that targets the rollup job’s ID in the rollup index.

POST my_rollup_index/_delete_by_query
{
  "query": {
    "term": {
      "_rollup.id": "the_rollup_job_id"
    }
  }
}

Path parameters

edit
<job_id>
(Required, string) Identifier for the job.

Response codes

edit
404 (Missing resources)
This code indicates that there are no resources that match the request. It occurs if you try to delete a job that doesn’t exist.

Example

edit

If we have a rollup job named sensor, it can be deleted with:

resp = client.rollup.delete_job(
    id="sensor",
)
print(resp)
response = client.rollup.delete_job(
  id: 'sensor'
)
puts response
const response = await client.rollup.deleteJob({
  id: "sensor",
});
console.log(response);
DELETE _rollup/job/sensor

Which will return the response:

{
  "acknowledged": true
}