delete-snapshot.asciidoc 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. [role="xpack"]
  2. [[ml-delete-snapshot]]
  3. = Delete model snapshots API
  4. ++++
  5. <titleabbrev>Delete model snapshots</titleabbrev>
  6. ++++
  7. Deletes an existing model snapshot.
  8. [[ml-delete-snapshot-request]]
  9. == {api-request-title}
  10. `DELETE _ml/anomaly_detectors/<job_id>/model_snapshots/<snapshot_id>`
  11. [[ml-delete-snapshot-prereqs]]
  12. == {api-prereq-title}
  13. Requires the `manage_ml` cluster privilege. This privilege is included in the
  14. `machine_learning_admin` built-in role.
  15. [[ml-delete-snapshot-desc]]
  16. == {api-description-title}
  17. IMPORTANT: You cannot delete the active model snapshot. To delete that snapshot,
  18. first revert to a different one. To identify the active model snapshot, refer to
  19. the `model_snapshot_id` in the results from the get jobs API.
  20. [[ml-delete-snapshot-path-parms]]
  21. == {api-path-parms-title}
  22. `<job_id>`::
  23. (Required, string)
  24. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=job-id-anomaly-detection]
  25. `<snapshot_id>`::
  26. (Required, string)
  27. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=snapshot-id]
  28. [[ml-delete-snapshot-example]]
  29. == {api-examples-title}
  30. [source,console]
  31. --------------------------------------------------
  32. DELETE _ml/anomaly_detectors/farequote/model_snapshots/1491948163
  33. --------------------------------------------------
  34. // TEST[skip:todo]
  35. When the snapshot is deleted, you receive the following results:
  36. [source,console-result]
  37. ----
  38. {
  39. "acknowledged": true
  40. }
  41. ----