From f4a673c722bd01bf22a4c0c081b122d324e01fee Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Wed, 27 May 2020 11:12:55 -0400 Subject: [PATCH] [DOCS] Add get snapshot repo API docs (#57150) (#57218) --- .../apis/get-repo-api.asciidoc | 132 ++++++++++++++++++ .../apis/put-repo-api.asciidoc | 1 + .../apis/snapshot-restore-apis.asciidoc | 2 + 3 files changed, 135 insertions(+) create mode 100644 docs/reference/snapshot-restore/apis/get-repo-api.asciidoc diff --git a/docs/reference/snapshot-restore/apis/get-repo-api.asciidoc b/docs/reference/snapshot-restore/apis/get-repo-api.asciidoc new file mode 100644 index 00000000000..6d34ce600d9 --- /dev/null +++ b/docs/reference/snapshot-restore/apis/get-repo-api.asciidoc @@ -0,0 +1,132 @@ +[[get-snapshot-repo-api]] +=== Get snapshot repository API +++++ +Get snapshot repository +++++ + +Gets information about one or more registered +<>. + +//// +[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/` + +`GET /_snapshot` + +[[get-snapshot-repo-api-path-params]] +==== {api-path-parms-title} + +``:: +(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, <>) 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} + +``:: +(object) +Contains information about the snapshot repository. Key is the name of the +snapshot repository. ++ +.Properties of `` +[%collapsible%open] +==== +`type`:: ++ +-- +(string) +Repository type. + +.Values for `type` +[%collapsible%open] +===== +`fs`:: +Shared file system repository. See <>. + +[xpack]#`source`#:: +Source-only repository. See <>. + +`url`:: +URL repository. See <>. +===== + +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 +<> parameter. ++ +For properties, see the <>'s +<>. +==== + +[[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" + } + } +} +---- diff --git a/docs/reference/snapshot-restore/apis/put-repo-api.asciidoc b/docs/reference/snapshot-restore/apis/put-repo-api.asciidoc index d394d11129a..45cbd40ea39 100644 --- a/docs/reference/snapshot-restore/apis/put-repo-api.asciidoc +++ b/docs/reference/snapshot-restore/apis/put-repo-api.asciidoc @@ -157,6 +157,7 @@ plugins: repositories -- +[[put-snapshot-repo-api-settings-param]] `settings`:: + -- diff --git a/docs/reference/snapshot-restore/apis/snapshot-restore-apis.asciidoc b/docs/reference/snapshot-restore/apis/snapshot-restore-apis.asciidoc index 25eae2d4946..840183fa6ef 100644 --- a/docs/reference/snapshot-restore/apis/snapshot-restore-apis.asciidoc +++ b/docs/reference/snapshot-restore/apis/snapshot-restore-apis.asciidoc @@ -18,9 +18,11 @@ content may not be included yet. * <> * <> +* <> * <> include::clean-up-repo-api.asciidoc[] include::delete-repo-api.asciidoc[] +include::get-repo-api.asciidoc[] include::put-repo-api.asciidoc[] \ No newline at end of file