mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 23:27:25 -04:00
Specifying `?master_timeout=-1` on an API which performs a cluster state update means that the cluster state update task will never time out while waiting in the pending tasks queue. However this parameter is also re-used in a few places where a timeout of `-1` means something else, typically to timeout immediately. This commit fixes those places so that `?master_timeout=-1` consistently means to wait forever.
137 lines
3.2 KiB
Text
137 lines
3.2 KiB
Text
[[get-snapshot-repo-api]]
|
|
=== Get snapshot repository API
|
|
++++
|
|
<titleabbrev>Get snapshot repository</titleabbrev>
|
|
++++
|
|
|
|
Gets information about one or more registered
|
|
<<snapshots-register-repository,snapshot repositories>>.
|
|
|
|
////
|
|
[source,console]
|
|
----
|
|
PUT /_snapshot/my_repository
|
|
{
|
|
"type": "fs",
|
|
"settings": {
|
|
"location": "my_backup_location"
|
|
}
|
|
}
|
|
----
|
|
// TESTSETUP
|
|
////
|
|
|
|
[source,console]
|
|
----
|
|
GET /_snapshot/my_repository
|
|
----
|
|
|
|
[[get-snapshot-repo-api-request]]
|
|
==== {api-request-title}
|
|
|
|
`GET /_snapshot/<repository>`
|
|
|
|
`GET /_snapshot`
|
|
|
|
[[get-snapshot-repo-api-prereqs]]
|
|
==== {api-prereq-title}
|
|
|
|
* If the {es} {security-features} are enabled, you must have the
|
|
`monitor_snapshot`, `create_snapshot`, or `manage`
|
|
<<privileges-list-cluster,cluster privilege>> to use this API.
|
|
|
|
[[get-snapshot-repo-api-path-params]]
|
|
==== {api-path-parms-title}
|
|
|
|
`<repository>`::
|
|
(Optional, string)
|
|
Comma-separated list of snapshot repository names used to limit the request.
|
|
Wildcard (`*`) expressions are supported including combining wildcards with exclude patterns starting with `-`.
|
|
+
|
|
To get information about all snapshot repositories registered in the
|
|
cluster, omit this parameter or use `*` or `_all`.
|
|
|
|
[[get-snapshot-repo-api-query-params]]
|
|
==== {api-query-parms-title}
|
|
|
|
`local`::
|
|
(Optional, Boolean) If `true`, the request gets information from the local node
|
|
only. If `false`, the request gets information from the master node. Defaults to
|
|
`false`.
|
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
|
|
|
|
[role="child_attributes"]
|
|
[[get-snapshot-repo-api-response-body]]
|
|
==== {api-response-body-title}
|
|
|
|
`<repository>`::
|
|
(object)
|
|
Contains information about the snapshot repository. Key is the name of the
|
|
snapshot repository.
|
|
+
|
|
.Properties of `<repository>`
|
|
[%collapsible%open]
|
|
====
|
|
`type`::
|
|
+
|
|
--
|
|
(string)
|
|
Repository type.
|
|
|
|
.Values for `type`
|
|
[%collapsible%open]
|
|
=====
|
|
`fs`::
|
|
Shared file system repository. See <<snapshots-filesystem-repository>>.
|
|
|
|
[xpack]#`source`#::
|
|
Source-only repository. See <<snapshots-source-only-repository>>.
|
|
|
|
`url`::
|
|
URL repository. See <<snapshots-read-only-repository>>.
|
|
=====
|
|
|
|
More repository types are available through these official plugins:
|
|
|
|
* <<repository-s3, repository-s3>> for S3 repository support
|
|
* {plugins}/repository-hdfs.html[repository-hdfs] for HDFS repository support in
|
|
Hadoop environments
|
|
* <<repository-azure,repository-azure>> for Azure storage repositories
|
|
* <<repository-gcs,repository-gcs>> for Google Cloud Storage repositories
|
|
--
|
|
|
|
`settings`::
|
|
(object)
|
|
Contains settings for the repository. Valid properties for the `settings` object
|
|
depend on the repository type, set using the
|
|
<<put-snapshot-repo-api-request-type,`type`>> parameter.
|
|
+
|
|
For properties, see the <<put-snapshot-repo-api,create or update snapshot
|
|
repository API>>'s <<put-snapshot-repo-api-settings-param,`settings`
|
|
parameter>>.
|
|
====
|
|
|
|
[[get-snapshot-repo-api-example]]
|
|
==== {api-examples-title}
|
|
|
|
[source,console]
|
|
----
|
|
GET /_snapshot/my_repository
|
|
----
|
|
|
|
The API returns the following response:
|
|
|
|
[source,console-result]
|
|
----
|
|
{
|
|
"my_repository" : {
|
|
"type" : "fs",
|
|
"uuid" : "0JLknrXbSUiVPuLakHjBrQ",
|
|
"settings" : {
|
|
"location" : "my_backup_location"
|
|
}
|
|
}
|
|
}
|
|
----
|
|
// TESTRESPONSE[s/"uuid" : "0JLknrXbSUiVPuLakHjBrQ"/"uuid" : $body.my_repository.uuid/]
|