2017-06-20 09:23:58 +08:00
|
|
|
[role="xpack"]
|
2018-09-01 07:49:24 +08:00
|
|
|
[testenv="platinum"]
|
2017-04-05 06:26:39 +08:00
|
|
|
[[ml-delete-snapshot]]
|
2018-12-21 02:23:28 +08:00
|
|
|
=== Delete model snapshots API
|
2017-12-15 02:52:49 +08:00
|
|
|
++++
|
2018-12-21 02:23:28 +08:00
|
|
|
<titleabbrev>Delete model snapshots</titleabbrev>
|
2017-12-15 02:52:49 +08:00
|
|
|
++++
|
2017-04-05 06:26:39 +08:00
|
|
|
|
2018-06-14 04:37:35 +08:00
|
|
|
Deletes an existing model snapshot.
|
2017-04-05 06:26:39 +08:00
|
|
|
|
2019-06-28 00:42:47 +08:00
|
|
|
[[ml-delete-snapshot-request]]
|
|
|
|
==== {api-request-title}
|
2017-04-05 06:26:39 +08:00
|
|
|
|
2018-12-08 04:34:11 +08:00
|
|
|
`DELETE _ml/anomaly_detectors/<job_id>/model_snapshots/<snapshot_id>`
|
2017-04-05 06:26:39 +08:00
|
|
|
|
2019-06-28 04:58:42 +08:00
|
|
|
[[ml-delete-snapshot-prereqs]]
|
|
|
|
==== {api-prereq-title}
|
|
|
|
|
|
|
|
* If the {es} {security-features} are enabled, you must have `manage_ml` or
|
2019-10-05 07:10:26 +08:00
|
|
|
`manage` cluster privileges to use this API. See <<security-privileges>>.
|
2019-06-28 04:58:42 +08:00
|
|
|
|
2019-06-28 00:42:47 +08:00
|
|
|
[[ml-delete-snapshot-desc]]
|
|
|
|
==== {api-description-title}
|
2017-04-05 06:26:39 +08:00
|
|
|
|
2017-04-12 04:25:38 +08:00
|
|
|
IMPORTANT: You cannot delete the active model snapshot. To delete that snapshot,
|
2017-06-09 07:02:41 +08:00
|
|
|
first revert to a different one. To identify the active model snapshot, refer to
|
2017-06-20 09:23:58 +08:00
|
|
|
the `model_snapshot_id` in the results from the get jobs API.
|
2017-04-05 06:26:39 +08:00
|
|
|
|
2019-06-28 00:42:47 +08:00
|
|
|
[[ml-delete-snapshot-path-parms]]
|
|
|
|
==== {api-path-parms-title}
|
2017-04-05 06:26:39 +08:00
|
|
|
|
2019-07-12 23:26:31 +08:00
|
|
|
`<job_id>`::
|
2019-12-17 02:42:30 +08:00
|
|
|
(Required, string)
|
|
|
|
include::{docdir}/ml/ml-shared.asciidoc[tag=job-id-anomaly-detection]
|
2017-04-26 05:08:29 +08:00
|
|
|
|
2019-07-12 23:26:31 +08:00
|
|
|
`<snapshot_id>`::
|
2019-12-17 02:42:30 +08:00
|
|
|
(Required, string)
|
|
|
|
include::{docdir}/ml/ml-shared.asciidoc[tag=snapshot-id]
|
2017-04-26 05:08:29 +08:00
|
|
|
|
2019-06-28 00:42:47 +08:00
|
|
|
[[ml-delete-snapshot-example]]
|
|
|
|
==== {api-examples-title}
|
2017-04-05 06:26:39 +08:00
|
|
|
|
2019-09-06 22:55:16 +08:00
|
|
|
[source,console]
|
2017-04-05 06:26:39 +08:00
|
|
|
--------------------------------------------------
|
2018-12-08 04:34:11 +08:00
|
|
|
DELETE _ml/anomaly_detectors/farequote/model_snapshots/1491948163
|
2017-04-05 06:26:39 +08:00
|
|
|
--------------------------------------------------
|
|
|
|
// TEST[skip:todo]
|
|
|
|
|
2017-04-14 05:32:01 +08:00
|
|
|
When the snapshot is deleted, you receive the following results:
|
2019-09-06 04:47:18 +08:00
|
|
|
|
|
|
|
[source,console-result]
|
2017-04-05 06:26:39 +08:00
|
|
|
----
|
|
|
|
{
|
|
|
|
"acknowledged": true
|
|
|
|
}
|
|
|
|
----
|