slm-execute-retention.asciidoc 1.0 KB

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