Get snapshot information Added in 0.0.0
Path parameters
-
Comma-separated list of snapshot repository names used to limit the request. Wildcard (*) expressions are supported.
-
Comma-separated list of snapshot names to retrieve. Also accepts wildcards (*).
- 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
-
master_timeout string
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.
-
verbose boolean
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.
-
index_details boolean
If true, returns 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. Defaults to false, meaning that this information is omitted.
-
index_names boolean
If true, returns the name of each index in each snapshot.
-
include_repository boolean
If true, returns the repository name in each snapshot.
-
sort string
Allows setting a sort order for the result. Defaults to start_time, i.e. sorting by snapshot start time stamp.
Values are
start_time
,duration
,name
,index_count
,repository
,shard_count
, orfailed_shard_count
. -
size number
Maximum number of snapshots to return. Defaults to 0 which means return all that match the request without limit.
-
order string
Sort order. Valid values are asc for ascending and desc for descending order. Defaults to asc, meaning ascending order.
Values are
asc
ordesc
. -
after string
Offset identifier to start pagination from as returned by the next field in the response body.
-
offset number
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.
-
from_sort_value string
Value of the current sort column at which to start retrieval. Can either be a string snapshot- or repository name when sorting by snapshot or repository name, a millisecond time value or a number when sorting by index- or shard count.
-
slm_policy_filter string
Filter snapshots by a comma-separated list of SLM policy names that snapshots belong to. Also accepts wildcards (*) and combinations of wildcards followed by exclude patterns starting with -. To include snapshots not created by an SLM policy you can use the special pattern _none that will match all snapshots without an SLM policy.
curl \
-X GET http://api.example.com/_snapshot/{repository}/{snapshot}
{
"responses": [
{
"repository": "string",
"snapshots": [
{
"data_streams": [
"string"
],
"duration": "string",
"": 42.0,
"failures": [
{}
],
"include_global_state": true,
"indices": [
"string"
],
"index_details": {
"additionalProperty1": {},
"additionalProperty2": {}
},
"metadata": {
"additionalProperty1": {},
"additionalProperty2": {}
},
"reason": "string",
"repository": "string",
"snapshot": "string",
"shards": {
"failed": 42.0,
"successful": 42.0,
"total": 42.0,
"failures": [
{}
],
"skipped": 42.0
},
"state": "string",
"uuid": "string",
"version": "string",
"version_id": 42.0,
"feature_states": [
{}
]
}
],
"error": {
"type": "string",
"reason": "string",
"stack_trace": "string",
"caused_by": {},
"root_cause": [
{}
],
"suppressed": [
{}
]
}
}
],
"snapshots": [
{
"data_streams": [
"string"
],
"duration": "string",
"": 42.0,
"failures": [
{
"index": "string",
"node_id": "string",
"reason": "string",
"shard_id": "string",
"index_uuid": "string",
"status": "string"
}
],
"include_global_state": true,
"indices": [
"string"
],
"index_details": {
"additionalProperty1": {
"shard_count": 42.0,
"": 42.0,
"size_in_bytes": 42.0,
"max_segments_per_shard": 42.0
},
"additionalProperty2": {
"shard_count": 42.0,
"": 42.0,
"size_in_bytes": 42.0,
"max_segments_per_shard": 42.0
}
},
"metadata": {
"additionalProperty1": {},
"additionalProperty2": {}
},
"reason": "string",
"repository": "string",
"snapshot": "string",
"shards": {
"failed": 42.0,
"successful": 42.0,
"total": 42.0,
"failures": [
{
"index": "string",
"node": "string",
"reason": {},
"shard": 42.0,
"status": "string"
}
],
"skipped": 42.0
},
"state": "string",
"uuid": "string",
"version": "string",
"version_id": 42.0,
"feature_states": [
{
"feature_name": "string",
"indices": "string"
}
]
}
],
"total": 42.0,
"remaining": 42.0
}