A newer version is available. For the latest information, see the
current release documentation.
Reset anomaly detection jobs API
editReset anomaly detection jobs API
editResets an existing anomaly detection job.
Request
editPOST _ml/anomaly_detectors/<job_id>/_reset
Prerequisites
edit-
Requires the
manage_ml
cluster privilege. This privilege is included in themachine_learning_admin
built-in role. -
Before you can reset a job, you must close it. You can set
force
totrue
when closing the job to avoid waiting for the job to complete. See Close jobs.
Description
editAll model state and results are deleted. The job is ready to start over as if it had just been created.
It is not currently possible to reset multiple jobs using wildcards or a comma separated list.
Path parameters
edit-
<job_id>
- (Required, string) Identifier for the anomaly detection job.
Query parameters
edit-
wait_for_completion
-
(Optional, Boolean) Specifies whether the request should return immediately or
wait until the job reset completes. Defaults to
true
.
Examples
editPOST _ml/anomaly_detectors/total-requests/_reset
When the job is reset, you receive the following results:
{ "acknowledged": true }
In the next example we reset the total-requests
job asynchronously:
POST _ml/anomaly_detectors/total-requests/_reset?wait_for_completion=false
When wait_for_completion
is set to false
, the response contains the id
of the job reset task:
{ "task": "oTUltX4IQMOUUVeiohTt8A:39" }
If you want to check the status of the reset task, use the Task management by referencing the task ID.