Path parameters

  • policy_idstring | array[string] Required

    Comma-separated list of snapshot lifecycle policies to retrieve

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.

    Values are -1 or 0.

  • timeoutstring

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

    Values are -1 or 0.

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • *object Additional properties
      Hide * attributes Show * attributes object
      • Hide in_progress attributes Show in_progress attributes object
      • Hide last_failure attributes Show last_failure attributes object
        • snapshot_namestring Required
        • timestring | number Required

          A date and time, either as a string whose format can depend on the context (defaulting to ISO 8601), or a number of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string representation.

          One of:

          Time unit for milliseconds

      • Hide last_success attributes Show last_success attributes object
        • snapshot_namestring Required
        • timestring | number Required

          A date and time, either as a string whose format can depend on the context (defaulting to ISO 8601), or a number of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string representation.

          One of:

          Time unit for milliseconds

      • modified_datestring | number

        A date and time, either as a string whose format can depend on the context (defaulting to ISO 8601), or a number of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string representation.

        One of:

        Time unit for milliseconds

      • Time unit for milliseconds

      • next_executionstring | number

        A date and time, either as a string whose format can depend on the context (defaulting to ISO 8601), or a number of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string representation.

        One of:

        Time unit for milliseconds

      • Time unit for milliseconds

      • policyobject Required
        Hide policy attributes Show policy attributes object
        • configobject
          Hide config attributes Show config attributes object
          • If false, the snapshot fails if any data stream or index in indices is missing or closed. If true, the snapshot ignores missing or closed data streams and indices.

          • indicesstring | array[string]
          • If true, the current global state is included in the snapshot.

          • feature_statesarray[string]

            A list of feature states to be included in this snapshot. A list of features available for inclusion in the snapshot and their descriptions be can be retrieved using the get features API. Each feature state includes one or more system indices containing data necessary for the function of that feature. Providing an empty array will include no feature states in the snapshot, regardless of the value of include_global_state. By default, all available feature states will be included in the snapshot if include_global_state is true, or no feature states if include_global_state is false.

          • metadataobject
            Hide metadata attribute Show metadata attribute object
          • partialboolean

            If false, the entire snapshot will fail if one or more indices included in the snapshot do not have all primary shards available.

        • namestring Required
        • repositorystring Required
        • retentionobject
          Hide retention attributes Show retention attributes object
          • expire_afterstring Required

            A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

          • max_countnumber Required

            Maximum number of snapshots to retain, even if the snapshots have not yet expired. If the number of snapshots in the repository exceeds this limit, the policy retains the most recent snapshots and deletes older snapshots.

          • min_countnumber Required

            Minimum number of snapshots to retain, even if the snapshots have expired.

        • schedulestring Required
      • versionnumber Required
      • statsobject Required
        Hide stats attributes Show stats attributes object
GET /_slm/policy/{policy_id}
GET _slm/policy/daily-snapshots?human
curl \
 --request GET 'http://api.example.com/_slm/policy/{policy_id}' \
 --header "Authorization: $API_KEY"
Response examples (200)
A successful response from `GET _slm/policy/daily-snapshots?human`.
{
  "daily-snapshots": {
    "version": 1,
    "modified_date": "2099-05-06T01:30:00.000Z",
    "modified_date_millis": 4081757400000,
    "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": "2099-05-07T01:30:00.000Z",
    "next_execution_millis": 4081843800000
  }
}