From babd0a859100bdc9997495ed4ec070a5b2abcfc5 Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Wed, 27 May 2020 15:45:34 -0400 Subject: [PATCH] [DOCS] Add verify snapshot repository API docs --- .../apis/put-repo-api.asciidoc | 2 +- .../apis/snapshot-restore-apis.asciidoc | 4 +- .../apis/verify-repo-api.asciidoc | 94 +++++++++++++++++++ 3 files changed, 98 insertions(+), 2 deletions(-) create mode 100644 docs/reference/snapshot-restore/apis/verify-repo-api.asciidoc diff --git a/docs/reference/snapshot-restore/apis/put-repo-api.asciidoc b/docs/reference/snapshot-restore/apis/put-repo-api.asciidoc index 45cbd40ea3954..11f9b4d3f2a77 100644 --- a/docs/reference/snapshot-restore/apis/put-repo-api.asciidoc +++ b/docs/reference/snapshot-restore/apis/put-repo-api.asciidoc @@ -70,7 +70,7 @@ data nodes in the cluster. If `false`, this verification is skipped. Defaults to `true`. + You can manually perform this verification using the -<>. +<>. + IMPORTANT: You can also specify this value using the `verify` request body parameter. If both parameters are specified, only the query parameter is used. diff --git a/docs/reference/snapshot-restore/apis/snapshot-restore-apis.asciidoc b/docs/reference/snapshot-restore/apis/snapshot-restore-apis.asciidoc index 840183fa6efc1..5500d508e3d5c 100644 --- a/docs/reference/snapshot-restore/apis/snapshot-restore-apis.asciidoc +++ b/docs/reference/snapshot-restore/apis/snapshot-restore-apis.asciidoc @@ -20,9 +20,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 +include::put-repo-api.asciidoc[] +include::verify-repo-api.asciidoc[] \ No newline at end of file diff --git a/docs/reference/snapshot-restore/apis/verify-repo-api.asciidoc b/docs/reference/snapshot-restore/apis/verify-repo-api.asciidoc new file mode 100644 index 0000000000000..4574c21655e7a --- /dev/null +++ b/docs/reference/snapshot-restore/apis/verify-repo-api.asciidoc @@ -0,0 +1,94 @@ +[[verify-snapshot-repo-api]] +=== Verify snapshot repository API +++++ +Verify snapshot repository +++++ + +Verifies that a snapshot repository is functional. + +//// +[source,console] +---- +PUT /_snapshot/my_repository +{ + "type": "fs", + "settings": { + "location": "my_backup_location" + } +} +---- +// TESTSETUP +//// + +[source,console] +---- +POST /_snapshot/my_repository/_verify +---- + +[[verify-snapshot-repo-api-request]] +==== {api-request-title} + +`POST /_snapshot//_verify` + +[[verify-snapshot-repo-api-desc]] +==== {api-description-title} + +By default, <> requests +verify that a snapshot is functional on all master and data nodes in the +cluster. + +You can skip this verification using the put snapshot repository API's `verify` +parameter. You can then use the verify snapshot repository API to manually +verify the repository. + +If verification is successful, the verify snapshot repository API returns a list +of nodes connected to the snapshot repository. If verification failed, the API +returns an error. + +[[verify-snapshot-repo-api-path-params]] +==== {api-path-parms-title} + +``:: +(Required, string) +Name of the snapshot repository to verify. + +[[verify-snapshot-repo-api-query-params]] +==== {api-query-parms-title} + +`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`. + +`timeout`:: +(Optional, <>) Specifies the period of time to wait for +a response. If no response is received before the timeout expires, the request +fails and returns an error. Defaults to `30s`. + +[role="child_attributes"] +[[verify-snapshot-repo-api-response-body]] +==== {api-response-body-title} + +`nodes`:: +(object) ++ +.Properties of `nodes` objects +[%collapsible%open] +==== +``:: +(object) +Contains information about a node connected to the snapshot repository. ++ +The key is the ID of the node. ++ +.Properties of `` +[%collapsible%open] +===== +`name`:: +(string) +Human-readable name for the node. ++ +You can set this name using the <> property in +`elasticsearch.yml`. Defaults to the machine's hostname. +===== +====