Stop rollup job API

edit

This 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 stops an existing, started rollup job. If the job does not exist an exception will be thrown. Stopping an already stopped job has no action.

Request

edit

POST _xpack/rollup/job/<job_id>/_stop

Path Parameters

edit
job_id (required)
(string) Identifier for the job

Request Body

edit

There is no request body for the Stop Job API.

Authorization

edit

You must have manage or manage_rollup cluster privileges to use this API. For more information, see Security privileges.

Examples

edit

If we have an already-started rollup job named sensor, it can be stopped with:

POST _xpack/rollup/job/sensor/_stop

Which will return the response:

{
  "stopped": true
}

If however we try to stop a job which doesn’t exist:

POST _xpack/rollup/job/does_not_exist/_stop

A 404 resource_not_found exception will be thrown:

{
    "error" : {
        "root_cause" : [
            {
                "type" : "resource_not_found_exception",
                "reason" : "Task for Rollup Job [does_not_exist] not found",
                "stack_trace": ...
            }
        ],
        "type" : "resource_not_found_exception",
        "reason" : "Task for Rollup Job [does_not_exist] not found",
        "stack_trace": ...
    },
    "status": 404
}