slm-execute-retention.asciidoc 1.1 KB

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