IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Get snapshot lifecycle policy API
editGet snapshot lifecycle policy API
editReturns information about one or more snapshot lifecycle policies.
Description
editUse the snapshot lifecycle policy API to retrieve information about one or more snapshot lifecycle policies. The API response also includes information about the latest successful and failed attempts to create automatic snapshots.
Path parameters
edit-
<snapshot-lifecycle-policy-id>
- (Optional, string) Comma-separated list of snapshot lifecycle policy IDs to retrieve.
Examples
editGet a specific policy
editGET /_slm/policy/daily-snapshots?human
The API returns the following response:
{ "daily-snapshots" : { "version": 1, "modified_date": "2019-04-23T01:30:00.000Z", "modified_date_millis": 1556048137314, "policy" : { "schedule": "0 30 1 * * ?", "name": "<daily-snap-{now/d}>", "repository": "my_repository", "config": { "indices": ["data-*", "important"], "ignore_unavailable": false, "include_global_state": false }, "retention": { "expire_after": "30d", "min_count": 5, "max_count": 50 } }, "stats": { "policy": "daily-snapshots", "snapshots_taken": 0, "snapshots_failed": 0, "snapshots_deleted": 0, "snapshot_deletion_failures": 0 }, "next_execution": "2019-04-24T01:30:00.000Z", "next_execution_millis": 1556048160000 } }
Get all policies
editGET /_slm/policy