delete-snapshot.asciidoc 1.2 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. ==== Request
  9. `DELETE _xpack/ml/anomaly_detectors/<job_id>/model_snapshots/<snapshot_id>`
  10. ==== Description
  11. IMPORTANT: You cannot delete the active model snapshot. To delete that snapshot,
  12. first revert to a different one. To identify the active model snapshot, refer to
  13. the `model_snapshot_id` in the results from the get jobs API.
  14. ==== Path Parameters
  15. `job_id` (required)::
  16. (string) Identifier for the job
  17. `snapshot_id` (required)::
  18. (string) Identifier for the model snapshot
  19. ==== Authorization
  20. You must have `manage_ml`, or `manage` cluster privileges to use this API.
  21. For more information, see {xpack-ref}/security-privileges.html[Security Privileges].
  22. //<<privileges-list-cluster>>.
  23. ==== Examples
  24. The following example deletes the `1491948163` snapshot:
  25. [source,js]
  26. --------------------------------------------------
  27. DELETE _xpack/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. ----