younifyd
Menu

Get snapshot information

Get snapshot information

GET/_snapshot/{repository}/{snapshot}

Use it in a workflow

  1. Add a step and choose the Elasticsearch connector.
  2. Pick the Get snapshot information action (under snapshot).
  3. Fill in the fields below, then reference the result from later steps as {{getSnapshotInformation.response.data}}.

Request

Path parameters

repositorystringrequired

A comma-separated list of snapshot repository names used to limit the request. Wildcard (`*`) expressions are supported.

snapshotoneOfrequired

A comma-separated list of snapshot names to retrieve Wildcards (`*`) are supported. * To get information about all snapshots in a registered repository, use a wildcard (`*`) or `_all`. * To get information about any snapshots that are currently running, use `_current`.

Query parameters

afterstring

An offset identifier to start pagination from as returned by the next field in the response body.

from_sort_valuestring

The value of the current sort column at which to start retrieval. It can be a string `snapshot-` or a repository name when sorting by snapshot or repository name. It can be a millisecond time value or a number when sorting by `index-` or shard count.

ignore_unavailableboolean

If `false`, the request returns an error for any snapshots that are unavailable.

index_detailsboolean

If `true`, the response includes additional information about each index in the snapshot comprising the number of shards in the index, the total size of the index in bytes, and the maximum number of segments per shard in the index. The default is `false`, meaning that this information is omitted.

index_namesboolean

If `true`, the response includes the name of each index in each snapshot.

include_repositoryboolean

If `true`, the response includes the repository name in each snapshot.

master_timeoutoneOf

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.

orderobject

The sort order. Valid values are `asc` for ascending and `desc` for descending order. The default behavior is ascending order.

offsetnumber

Numeric offset to start pagination from based on the snapshots matching this request. Using a non-zero value for this parameter is mutually exclusive with using the after parameter. Defaults to 0.

sizenumber

The maximum number of snapshots to return. The default is -1, which means to return all that match the request without limit.

slm_policy_filterstring

Filter snapshots by a comma-separated list of snapshot lifecycle management (SLM) policy names that snapshots belong to. You can use wildcards (`*`) and combinations of wildcards followed by exclude patterns starting with `-`. For example, the pattern `*,-policy-a-\*` will return all snapshots except for those that were created by an SLM policy with a name starting with `policy-a-`. Note that the wildcard pattern `*` matches all snapshots created by an SLM policy but not those snapshots that were not created by an SLM policy. To include snapshots that were not created by an SLM policy, you can use the special pattern `_none` that will match all snapshots without an SLM policy.

sortstring

The sort order for the result. The default behavior is sorting by snapshot start time stamp.

One ofstart_timedurationnameindex_countrepositoryshard_countfailed_shard_count

stateoneOf

Only return snapshots with a state found in the given comma-separated list of snapshot states. The default is all snapshot states.

verboseboolean

If `true`, returns additional information about each snapshot such as the version of Elasticsearch which took the snapshot, the start and end times of the snapshot, and the number of shards snapshotted. NOTE: The parameters `size`, `order`, `after`, `from_sort_value`, `offset`, `slm_policy_filter`, and `sort` are not supported when you set `verbose=false` and the sort order for requests with `verbose=false` is undefined.

Response

Returns 200 with an object. Read it in later steps with {{getSnapshotInformation.response.data.<field>}}.

remainingnumber

The number of remaining snapshots that were not returned due to size limits and that can be fetched by additional requests using the `next` field value.

totalnumber

The total number of snapshots that match the request when ignoring the size limit or `after` query parameter.

nextstring

If the request contained a size limit and there might be more results, a `next` field will be added to the response. It can be used as the `after` query parameter to fetch additional results.

responsesarray<object>
repositoryanyrequired
snapshotsarray<object>21 fields
errorany
snapshotsarray<object>
data_streamsarray<string>required
durationany
duration_in_millisany
end_timeany
end_time_in_millisany
failuresarray<object>6 fields
include_global_stateboolean
indicesarray<string>
index_detailsobject
metadataany
reasonstring
repositoryany
snapshotanyrequired
shardsany
start_timeany
start_time_in_millisany
statestring
uuidanyrequired
versionany
version_idany
feature_statesarray<object>2 fields
json
{
  "remaining": 0,
  "total": 0,
  "next": "string",
  "responses": [
    {
      "repository": null,
      "snapshots": [
        {
          "data_streams": [
            "string"
          ],
          "snapshot": null,
          "uuid": null,
          "duration": null,
          "duration_in_millis": null,
          "end_time": null,
          "end_time_in_millis": null,
          "failures": [
            {
              "index": null,
              "reason": null,
              "shard_id": null,
              "index_uuid": null,
              "status": null,
              "node_id": null
            }
          ],
          "include_global_state": false,
          "indices": [
            "string"
          ],
          "index_details": {},
          "metadata": null
        }
      ],
      "error": null
    }
  ],
  "snapshots": [
    {
      "data_streams": [
        "string"
      ],
      "snapshot": null,
      "uuid": null,
      "duration": null,
      "duration_in_millis": null,
      "end_time": null,
      "end_time_in_millis": null,
      "failures": [
        {
          "index": null,
          "reason": "string",
          "shard_id": 0,
          "index_uuid": null,
          "status": "string",
          "node_id": null
        }
      ],
      "include_global_state": false,
      "indices": [
        "string"
      ],
      "index_details": {},
      "metadata": null
    }
  ]
}

Need more? See the Elasticsearch guide for connection setup and behaviour shared by every action.