Commit graph

3 commits

Author SHA1 Message Date
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
Lisa Cawley
a5f4da693b
[DOCS] Adds new snapshot upgrade API (#65095) (#65100) 2020-11-17 12:21:01 -08:00
Lisa Cawley
9633d503d8
[DOCS] Changes level offset for anomaly detection APIs (#59920) (#59928) 2020-07-20 13:10:54 -07:00
Renamed from docs/reference/ml/anomaly-detection/apis/ml-api.asciidoc (Browse further)