Execute snapshot lifecycle retention API

edit

Deletes any expired snapshots based on lifecycle policy retention rules.

Request

edit

POST /_slm/_execute_retention

Description

edit

While Snapshot Lifecycle Management retention is usually invoked through the global cluster settings for its schedule, it can sometimes be useful to invoke a retention run to expunge expired snapshots immediately. This API allows you to run a one-off retention run.

Examples

edit

To immediately start snapshot retention, use the following request:

POST /_slm/_execute_retention

This API returns the following response as retention runs asynchronously in the background:

{
  "acknowledged": true
}