NOTE: You are looking at documentation for an older release. For the latest information, see the current release documentation.
Delete job API
editDelete job API
editThis functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
This API deletes an existing rollup job. A job must be stopped first before it can be deleted. Attempting to delete a started job will result in an error. Similarly, attempting to delete a nonexistent job will throw an exception.
Request
editDELETE _xpack/rollup/job/<job_id>
Path Parameters
edit-
job_id
(required) - (string) Identifier for the job
Request Body
editThere is no request body for the Delete Job API.
Authorization
editYou must have manage
or manage_rollup
cluster privileges to use this API.
For more information, see
Security privileges.
Examples
editIf we have a rollup job named sensor
, it can be deleted with:
DELETE _xpack/rollup/job/sensor
Which will return the response:
{ "acknowledged": true }
If however we try to delete a job which doesn’t exist:
DELETE _xpack/rollup/job/does_not_exist
A 404 resource_not_found
exception will be thrown:
{ "error" : { "root_cause" : [ { "type" : "resource_not_found_exception", "reason" : "the task with id [does_not_exist] doesn't exist", "stack_trace": ... } ], "type" : "resource_not_found_exception", "reason" : "the task with id [does_not_exist] doesn't exist", "stack_trace": ... }, "status": 404 }