Execute snapshot lifecycle retention API

Deletes any expired snapshots based on lifecycle policy retention rules.

Request

POST /_slm/_execute_retention

Description

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

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
}