parent
baca45978c
commit
f4a673c722
|
@ -0,0 +1,132 @@
|
|||
[[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-path-params]]
|
||||
==== {api-path-parms-title}
|
||||
|
||||
`<repository>`::
|
||||
(Required, string)
|
||||
Comma-separated list of snapshot repository names used to limit the request.
|
||||
Wildcard (`*`) expressions are supported.
|
||||
+
|
||||
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`.
|
||||
|
||||
`master_timeout`::
|
||||
(Optional, <<time-units, time units>>) Specifies the period of time 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. Defaults to `30s`.
|
||||
|
||||
[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:
|
||||
|
||||
* {plugins}/repository-s3.html[repository-s3] for S3 repository support
|
||||
* {plugins}/repository-hdfs.html[repository-hdfs] for HDFS repository support in
|
||||
Hadoop environments
|
||||
* {plugins}/repository-azure.html[repository-azure] for Azure storage
|
||||
repositories
|
||||
* {plugins}/repository-gcs.html[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,put 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",
|
||||
"settings" : {
|
||||
"location" : "my_backup_location"
|
||||
}
|
||||
}
|
||||
}
|
||||
----
|
|
@ -157,6 +157,7 @@ plugins:
|
|||
repositories
|
||||
--
|
||||
|
||||
[[put-snapshot-repo-api-settings-param]]
|
||||
`settings`::
|
||||
+
|
||||
--
|
||||
|
|
|
@ -18,9 +18,11 @@ content may not be included yet.
|
|||
|
||||
* <<clean-up-snapshot-repo-api,Clean up snapshot repository>>
|
||||
* <<delete-snapshot-repo-api,Delete snapshot repository>>
|
||||
* <<get-snapshot-repo-api,Get snapshot repository>>
|
||||
* <<put-snapshot-repo-api,Put snapshot repository>>
|
||||
|
||||
|
||||
include::clean-up-repo-api.asciidoc[]
|
||||
include::delete-repo-api.asciidoc[]
|
||||
include::get-repo-api.asciidoc[]
|
||||
include::put-repo-api.asciidoc[]
|
Loading…
Reference in New Issue