Run a policy Added in 7.4.0

PUT /_slm/policy/{policy_id}/_execute

Immediately create a snapshot according to the snapshot lifecycle policy without waiting for the scheduled time. The snapshot policy is normally applied according to its schedule, but you might want to manually run a policy before performing an upgrade or other maintenance.

Path parameters

  • policy_id string Required

    The id of the snapshot lifecycle policy to be executed

Query parameters

  • The period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.

  • timeout string

    The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
PUT /_slm/policy/{policy_id}/_execute
curl \
 --request PUT 'http://api.example.com/_slm/policy/{policy_id}/_execute' \
 --header "Authorization: $API_KEY"
Response examples (200)
Run `POST /_slm/policy/daily-snapshots/_execute` to take an immediate snapshot according to the `daily-snapshots` policy.
{
  "snapshot_name": "daily-snap-2019.04.24-gwrqoo2xtea3q57vvg0uea"
}