Get snapshot information
- GET /_snapshot/{repository}/{snapshot}
NOTE: The after parameter and next field enable you to iterate through snapshots with some consistency guarantees regarding concurrent creation or deletion of snapshots.
It is guaranteed that any snapshot that exists at the beginning of the iteration and is not concurrently deleted will be seen during the iteration.
Snapshots concurrently created may be seen during an iteration.
- Cluster privileges:
monitor_snapshot
Path Parameters
-
repositorystring Namerequired -
A comma-separated list of snapshot repository names used to limit the request. Wildcard (
*) expressions are supported. -
snapshotName | Namerequired -
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.
- To get information about all snapshots in a registered repository, use a wildcard (
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 byindex-or shard count.If
false, the request returns an error for any snapshots that are unavailable.-
index_detailsboolean · default: false 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 isfalse, meaning that this information is omitted.-
index_namesboolean · default: true If
true, the response includes the name of each index in each snapshot.-
include_repositoryboolean · default: true If
true, the response includes the repository name in each snapshot.-
master_timeoutstring Duration · default: 30s 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.
-
orderSortOrder · default: asc The sort order. Valid values are
ascfor ascending anddescfor descending order. The default behavior is ascending order.Supported values include:
asc: Ascending (smallest to largest)desc: Descending (largest to smallest)
-
Values:
ascdesc -
offsetnumber · default: 0 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 · default: -1 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 Name 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 withpolicy-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_nonethat will match all snapshots without an SLM policy.-
sortSnapshotSort · default: start_time The sort order for the result. The default behavior is sorting by snapshot start time stamp.
-
Values:
start_timedurationnameindex_countrepositoryshard_countfailed_shard_count -
verboseboolean · default: true 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, andsortare not supported when you setverbose=falseand the sort order for requests withverbose=falseis undefined.
Response
-
remainingnumberrequired -
The number of remaining snapshots that were not returned due to size limits and that can be fetched by additional requests using the
nextfield value. -
totalnumberrequired -
The total number of snapshots that match the request when ignoring the size limit or
afterquery parameter. -
nextstring -
If the request contained a size limit and there might be more results, a
nextfield will be added to the response. It can be used as theafterquery parameter to fetch additional results. -
responsesSnapshotResponseItem -
repositorystring Namerequired -
snapshotsSnapshotInfo -
data_streamsstringrequired -
durationstring Duration -
duration_in_millisDurationValueUnitMillis -
end_timeDateTime -
end_time_in_millisEpochTimeUnitMillis -
failuresSnapshotShardFailure -
include_global_stateboolean -
indicesstring IndexName -
index_detailsmap string to IndexDetails -
<string>IndexDetails -
shard_countnumberrequired -
sizenumber | string ByteSize -
size_in_bytesnumberrequired -
max_segments_per_shardnumberrequired -
metadataMetadata -
reasonstring -
repositorystring Name -
snapshotstring Namerequired -
shardsShardStatistics -
failednumber uintrequired -
The number of shards the operation or search attempted to run on but failed.
-
successfulnumber uintrequired -
The number of shards the operation or search succeeded on.
-
totalnumber uintrequired -
The number of shards the operation or search will run on overall.
-
failuresShardFailure -
indexstring IndexName -
nodestring -
reasonErrorCauserequired -
typestringrequired -
The type of error
-
reasonstringnullable -
A human-readable explanation of the error, in English.
-
stack_tracestring -
The server stack trace. Present only if the
error_trace=trueparameter was sent with the request. -
caused_byErrorCause -
root_causeErrorCause -
suppressedErrorCause -
shardnumber -
statusstring -
primaryboolean -
skippednumber uint -
start_timeDateTime -
start_time_in_millisEpochTimeUnitMillis -
statestring -
uuidstringrequired -
versionstring -
version_idnumber VersionNumber -
feature_statesInfoFeatureState -
feature_namestringrequired -
indicesstring Indicesrequired -
errorErrorCause -
typestringrequired -
The type of error
-
reasonstringnullable -
A human-readable explanation of the error, in English.
-
stack_tracestring -
The server stack trace. Present only if the
error_trace=trueparameter was sent with the request. -
caused_byErrorCause -
root_causeErrorCause -
suppressedErrorCause -
snapshotsSnapshotInfo