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]]
|
2017-12-15 02:52:49 +08:00
|
|
|
=== Delete Model Snapshots API
|
|
|
|
++++
|
|
|
|
<titleabbrev>Delete Model Snapshots</titleabbrev>
|
|
|
|
++++
|
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
|
|
|
|
2017-04-26 05:08:29 +08:00
|
|
|
|
2017-06-07 04:42:47 +08:00
|
|
|
==== Request
|
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
|
|
|
|
|
|
|
|
2017-06-07 04:42:47 +08:00
|
|
|
==== Description
|
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
|
|
|
|
2017-06-07 04:42:47 +08:00
|
|
|
==== Path Parameters
|
2017-04-05 06:26:39 +08:00
|
|
|
|
|
|
|
`job_id` (required)::
|
2017-04-12 10:26:18 +08:00
|
|
|
(string) Identifier for the job
|
2017-04-05 06:26:39 +08:00
|
|
|
|
|
|
|
`snapshot_id` (required)::
|
2017-04-12 10:26:18 +08:00
|
|
|
(string) Identifier for the model snapshot
|
2017-04-05 06:26:39 +08:00
|
|
|
|
|
|
|
|
2017-06-07 04:42:47 +08:00
|
|
|
==== Authorization
|
2017-04-26 05:08:29 +08:00
|
|
|
|
|
|
|
You must have `manage_ml`, or `manage` cluster privileges to use this API.
|
2017-06-20 09:23:58 +08:00
|
|
|
For more information, see {xpack-ref}/security-privileges.html[Security Privileges].
|
2017-04-26 05:08:29 +08:00
|
|
|
|
|
|
|
|
2017-06-07 04:42:47 +08:00
|
|
|
==== Examples
|
2017-04-05 06:26:39 +08:00
|
|
|
|
2017-04-14 05:32:01 +08:00
|
|
|
The following example deletes the `1491948163` snapshot:
|
2017-04-05 06:26:39 +08:00
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
2018-12-08 04:34:11 +08:00
|
|
|
DELETE _ml/anomaly_detectors/farequote/model_snapshots/1491948163
|
2017-04-05 06:26:39 +08:00
|
|
|
--------------------------------------------------
|
|
|
|
// CONSOLE
|
|
|
|
// TEST[skip:todo]
|
|
|
|
|
2017-04-14 05:32:01 +08:00
|
|
|
When the snapshot is deleted, you receive the following results:
|
2017-04-21 23:23:27 +08:00
|
|
|
[source,js]
|
2017-04-05 06:26:39 +08:00
|
|
|
----
|
|
|
|
{
|
|
|
|
"acknowledged": true
|
|
|
|
}
|
|
|
|
----
|
2018-12-08 04:34:11 +08:00
|
|
|
// TESTRESPONSE
|