2017-04-04 18:26:39 -04:00
|
|
|
[[ml-delete-snapshot]]
|
|
|
|
==== Delete Model Snapshots
|
|
|
|
|
2017-04-11 21:52:47 -04:00
|
|
|
The delete model snapshot API enables you to delete an existing model snapshot.
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2017-04-25 17:08:29 -04:00
|
|
|
|
2017-04-04 18:26:39 -04:00
|
|
|
===== Request
|
|
|
|
|
|
|
|
`DELETE _xpack/ml/anomaly_detectors/<job_id>/model_snapshots/<snapshot_id>`
|
|
|
|
|
|
|
|
|
2017-04-11 16:25:38 -04:00
|
|
|
===== Description
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2017-04-11 16:25:38 -04:00
|
|
|
IMPORTANT: You cannot delete the active model snapshot. To delete that snapshot,
|
|
|
|
first revert to a different one.
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2017-04-11 16:25:38 -04:00
|
|
|
//TBD: Where do you see restorePriority? Per old docs, the active model snapshot
|
|
|
|
//is "...the snapshot with the highest restorePriority".
|
2017-04-04 18:26:39 -04:00
|
|
|
|
|
|
|
===== Path Parameters
|
|
|
|
|
|
|
|
`job_id` (required)::
|
2017-04-11 22:26:18 -04:00
|
|
|
(string) Identifier for the job
|
2017-04-04 18:26:39 -04:00
|
|
|
|
|
|
|
`snapshot_id` (required)::
|
2017-04-11 22:26:18 -04:00
|
|
|
(string) Identifier for the model snapshot
|
2017-04-04 18:26:39 -04:00
|
|
|
|
|
|
|
|
2017-04-25 17:08:29 -04:00
|
|
|
===== Authorization
|
|
|
|
|
|
|
|
You must have `manage_ml`, or `manage` cluster privileges to use this API.
|
|
|
|
For more information, see <<privileges-list-cluster>>.
|
|
|
|
|
|
|
|
|
2017-04-04 18:26:39 -04:00
|
|
|
===== Examples
|
|
|
|
|
2017-04-13 17:32:01 -04:00
|
|
|
The following example deletes the `1491948163` snapshot:
|
2017-04-04 18:26:39 -04:00
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
2017-04-13 17:32:01 -04:00
|
|
|
DELETE _xpack/ml/anomaly_detectors/farequote/model_snapshots/1491948163
|
2017-04-04 18:26:39 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
// CONSOLE
|
|
|
|
// TEST[skip:todo]
|
|
|
|
|
2017-04-13 17:32:01 -04:00
|
|
|
When the snapshot is deleted, you receive the following results:
|
2017-04-21 11:23:27 -04:00
|
|
|
[source,js]
|
2017-04-04 18:26:39 -04:00
|
|
|
----
|
|
|
|
{
|
|
|
|
"acknowledged": true
|
|
|
|
}
|
|
|
|
----
|