Path parameters

  • policy_id string | array[string] Required

    Comma-separated list of snapshot lifecycle policies to retrieve

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • * object Additional properties

      Additional properties are allowed.

      Hide * attributes Show * attributes object
      • Additional properties are allowed.

        Hide in_progress attributes Show in_progress attributes object
      • Additional properties are allowed.

        Hide last_failure attributes Show last_failure attributes object
      • Additional properties are allowed.

        Hide last_success attributes Show last_success attributes object
      • modified_date string | 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.

      • Time unit for milliseconds

      • next_execution string | 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.

      • Time unit for milliseconds

      • policy object Required

        Additional properties are allowed.

        Hide policy attributes Show policy attributes object
        • config object

          Additional properties are allowed.

          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.

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

          • feature_states array[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.

          • metadata object
            Hide metadata attribute Show metadata attribute object
            • * object Additional properties

              Additional properties are allowed.

          • partial boolean

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

        • name string Required
        • repository string Required
        • Additional properties are allowed.

          Hide retention attributes Show retention attributes object
          • expire_after string 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_count number 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_count number Required

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

        • schedule string Required
      • version number Required
      • stats object Required

        Additional properties are allowed.

        Hide stats attributes Show stats attributes object
GET /_slm/policy/{policy_id}
curl \
 -X GET http://api.example.com/_slm/policy/{policy_id}
Response examples (200)
{
  "additionalProperty1": {
    "in_progress": {
      "name": "string",
      "": 42.0,
      "state": "string",
      "uuid": "string"
    },
    "last_failure": {
      "snapshot_name": "string",
      "": "string"
    },
    "last_success": {
      "snapshot_name": "string",
      "": "string"
    },
    "": 42.0,
    "policy": {
      "config": {
        "ignore_unavailable": true,
        "indices": "string",
        "include_global_state": true,
        "feature_states": [
          "string"
        ],
        "metadata": {
          "additionalProperty1": {},
          "additionalProperty2": {}
        },
        "partial": true
      },
      "name": "string",
      "repository": "string",
      "retention": {
        "expire_after": "string",
        "max_count": 42.0,
        "min_count": 42.0
      },
      "schedule": "string"
    },
    "version": 42.0,
    "stats": {
      "retention_deletion_time": "string",
      "": 42.0,
      "retention_failed": 42.0,
      "retention_runs": 42.0,
      "retention_timed_out": 42.0,
      "policy": "string",
      "total_snapshots_deleted": 42.0,
      "total_snapshot_deletion_failures": 42.0,
      "total_snapshots_failed": 42.0,
      "total_snapshots_taken": 42.0
    }
  },
  "additionalProperty2": {
    "in_progress": {
      "name": "string",
      "": 42.0,
      "state": "string",
      "uuid": "string"
    },
    "last_failure": {
      "snapshot_name": "string",
      "": "string"
    },
    "last_success": {
      "snapshot_name": "string",
      "": "string"
    },
    "": 42.0,
    "policy": {
      "config": {
        "ignore_unavailable": true,
        "indices": "string",
        "include_global_state": true,
        "feature_states": [
          "string"
        ],
        "metadata": {
          "additionalProperty1": {},
          "additionalProperty2": {}
        },
        "partial": true
      },
      "name": "string",
      "repository": "string",
      "retention": {
        "expire_after": "string",
        "max_count": 42.0,
        "min_count": 42.0
      },
      "schedule": "string"
    },
    "version": 42.0,
    "stats": {
      "retention_deletion_time": "string",
      "": 42.0,
      "retention_failed": 42.0,
      "retention_runs": 42.0,
      "retention_timed_out": 42.0,
      "policy": "string",
      "total_snapshots_deleted": 42.0,
      "total_snapshot_deletion_failures": 42.0,
      "total_snapshots_failed": 42.0,
      "total_snapshots_taken": 42.0
    }
  }
}