elasticsearch/docs/reference/ml
Dimitris Athanasiou 92f7c6250a
[7.x][ML] Reset anomaly detection job API (#73908) (#74093)
Adds a new API that allows a user to reset
an anomaly detection job.

To use the API do:

```
POST _ml/anomaly_detectors/<job_id>_reset
```

The API removes all data associated to the job.
In particular, it deletes model state, results and stats.

However, job notifications and user annotations are not removed.

Also, the API can be called asynchronously by setting the parameter
`wait_for_completion` to `false` (defaults to `true`). When run
that way the API returns the task id for further monitoring.

In order to prevent the job from opening while it is resetting,
a new job field has been added called `blocked`. It is an object
that contains a `reason` and the `task_id`. `reason` can take
a value from ["delete", "reset", "revert"] as all these
operations should block the job from opening. The `task_id` is also
included in order to allow tracking the task if necessary.

Finally, this commit also sets the `blocked` field when
the revert snapshot API is called as a job should not be opened
while it is reverted to a different model snapshot.

Backport of #73908
2021-06-15 10:05:40 +03:00
..
anomaly-detection [7.x][ML] Reset anomaly detection job API (#73908) (#74093) 2021-06-15 10:05:40 +03:00
df-analytics/apis [DOCS] Adds max_trees hyperparameter to GET TM API docs (#72298) (#72789) 2021-05-06 10:51:56 +02:00
images [DOCS] Adds anomaly detection rule advanced settings to docs (#72072) (#72202) 2021-04-26 10:11:02 +02:00
ml-shared.asciidoc [DOCS] Adds defaults to get ML results APIs (#73540) (#73735) 2021-06-03 12:03:30 -07:00