delete-snapshot.asciidoc 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[ml-delete-snapshot]]
  4. === Delete model snapshots API
  5. ++++
  6. <titleabbrev>Delete model snapshots</titleabbrev>
  7. ++++
  8. Deletes an existing model snapshot.
  9. ==== Request
  10. `DELETE _ml/anomaly_detectors/<job_id>/model_snapshots/<snapshot_id>`
  11. ==== Description
  12. IMPORTANT: You cannot delete the active model snapshot. To delete that snapshot,
  13. first revert to a different one. To identify the active model snapshot, refer to
  14. the `model_snapshot_id` in the results from the get jobs API.
  15. ==== Path Parameters
  16. `job_id` (required)::
  17. (string) Identifier for the job
  18. `snapshot_id` (required)::
  19. (string) Identifier for the model snapshot
  20. ==== Authorization
  21. You must have `manage_ml`, or `manage` cluster privileges to use this API.
  22. For more information, see {xpack-ref}/security-privileges.html[Security Privileges].
  23. ==== Examples
  24. The following example deletes the `1491948163` snapshot:
  25. [source,js]
  26. --------------------------------------------------
  27. DELETE _ml/anomaly_detectors/farequote/model_snapshots/1491948163
  28. --------------------------------------------------
  29. // CONSOLE
  30. // TEST[skip:todo]
  31. When the snapshot is deleted, you receive the following results:
  32. [source,js]
  33. ----
  34. {
  35. "acknowledged": true
  36. }
  37. ----
  38. // TESTRESPONSE