1
0

delete-snapshot.asciidoc 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. [[ml-delete-snapshot-request]]
  10. == {api-request-title}
  11. `DELETE _ml/anomaly_detectors/<job_id>/model_snapshots/<snapshot_id>`
  12. [[ml-delete-snapshot-prereqs]]
  13. == {api-prereq-title}
  14. * If the {es} {security-features} are enabled, you must have `manage_ml` or
  15. `manage` cluster privileges to use this API. See <<security-privileges>> and
  16. {ml-docs-setup-privileges}.
  17. [[ml-delete-snapshot-desc]]
  18. == {api-description-title}
  19. IMPORTANT: You cannot delete the active model snapshot. To delete that snapshot,
  20. first revert to a different one. To identify the active model snapshot, refer to
  21. the `model_snapshot_id` in the results from the get jobs API.
  22. [[ml-delete-snapshot-path-parms]]
  23. == {api-path-parms-title}
  24. `<job_id>`::
  25. (Required, string)
  26. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=job-id-anomaly-detection]
  27. `<snapshot_id>`::
  28. (Required, string)
  29. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=snapshot-id]
  30. [[ml-delete-snapshot-example]]
  31. == {api-examples-title}
  32. [source,console]
  33. --------------------------------------------------
  34. DELETE _ml/anomaly_detectors/farequote/model_snapshots/1491948163
  35. --------------------------------------------------
  36. // TEST[skip:todo]
  37. When the snapshot is deleted, you receive the following results:
  38. [source,console-result]
  39. ----
  40. {
  41. "acknowledged": true
  42. }
  43. ----