slm-execute-retention.asciidoc 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. [role="xpack"]
  2. [testenv="basic"]
  3. [[slm-api-execute-retention]]
  4. === Execute snapshot retention policy API
  5. ++++
  6. <titleabbrev>Execute snapshot retention policy</titleabbrev>
  7. ++++
  8. Deletes any snapshots that are expired according to the policy's retention rules.
  9. [[slm-api-execute-retention-request]]
  10. ==== {api-request-title}
  11. `POST /_slm/_execute_retention`
  12. [[slm-api-execute-retention-prereqs]]
  13. ==== {api-prereq-title}
  14. If the {es} {security-features} are enabled, you must have the `manage_slm`
  15. cluster privilege to use this API. For more information, see
  16. <<security-privileges>>.
  17. [[slm-api-execute-retention-desc]]
  18. ==== {api-description-title}
  19. Manually applies the retention policy to force immediate removal of expired snapshots.
  20. The retention policy is normally applied according to its schedule.
  21. [[slm-api-execute-retention-example]]
  22. ==== {api-examples-title}
  23. To force removal of expired snapshots:
  24. [source,console]
  25. --------------------------------------------------
  26. POST /_slm/_execute_retention
  27. --------------------------------------------------
  28. Retention runs asynchronously in the background.