elasticsearch/docs/reference/slm/apis/slm-execute-retention.asciidoc
Lee Hinman b03647e593
Add xpack/basic scope to SLM documentation (#51711)
This adds the required

```
[role="xpack"]
[testenv="basic"]
```

To the top of the SLM documentation

Relates to #51678
2020-01-30 16:17:50 -07:00

39 lines
1.1 KiB
Text

[role="xpack"]
[testenv="basic"]
[[slm-api-execute-retention]]
=== Execute snapshot retention policy API
++++
<titleabbrev>Execute snapshot retention policy</titleabbrev>
++++
Deletes any snapshots that are expired according to the policy's retention rules.
[[slm-api-execute-retention-request]]
==== {api-request-title}
`POST /_slm/_execute_retention`
[[slm-api-execute-retention-prereqs]]
==== {api-prereq-title}
If the {es} {security-features} are enabled, you must have the `manage_slm`
cluster privilege to use this API. For more information, see
<<security-privileges>>.
[[slm-api-execute-retention-desc]]
==== {api-description-title}
Manually applies the retention policy to force immediate removal of expired snapshots.
The retention policy is normally applied according to its schedule.
[[slm-api-execute-retention-example]]
==== {api-examples-title}
To force removal of expired snapshots:
[source,console]
--------------------------------------------------
POST /_slm/_execute_retention
--------------------------------------------------
Retention runs asynchronously in the background.