Skip to content

Commit ad56dce

Browse files
authored
[DOCS] Add verify snapshot repository API docs (#57253) (#57290)
1 parent 4235c5e commit ad56dce

File tree

3 files changed

+98
-2
lines changed

3 files changed

+98
-2
lines changed

docs/reference/snapshot-restore/apis/put-repo-api.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ data nodes in the cluster. If `false`, this verification is skipped. Defaults to
7070
`true`.
7171
+
7272
You can manually perform this verification using the
73-
<<snapshots-repository-verification,verify snapshot repository API>>.
73+
<<verify-snapshot-repo-api,verify snapshot repository API>>.
7474
+
7575
IMPORTANT: You can also specify this value using the `verify` request body
7676
parameter. If both parameters are specified, only the query parameter is used.

docs/reference/snapshot-restore/apis/snapshot-restore-apis.asciidoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ content may not be included yet.
2020
* <<delete-snapshot-repo-api,Delete snapshot repository>>
2121
* <<get-snapshot-repo-api,Get snapshot repository>>
2222
* <<put-snapshot-repo-api,Put snapshot repository>>
23+
* <<verify-snapshot-repo-api,Verify snapshot repository>>
2324

2425

2526
include::clean-up-repo-api.asciidoc[]
2627
include::delete-repo-api.asciidoc[]
2728
include::get-repo-api.asciidoc[]
28-
include::put-repo-api.asciidoc[]
29+
include::put-repo-api.asciidoc[]
30+
include::verify-repo-api.asciidoc[]
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
[[verify-snapshot-repo-api]]
2+
=== Verify snapshot repository API
3+
++++
4+
<titleabbrev>Verify snapshot repository</titleabbrev>
5+
++++
6+
7+
Verifies that a snapshot repository is functional.
8+
9+
////
10+
[source,console]
11+
----
12+
PUT /_snapshot/my_repository
13+
{
14+
"type": "fs",
15+
"settings": {
16+
"location": "my_backup_location"
17+
}
18+
}
19+
----
20+
// TESTSETUP
21+
////
22+
23+
[source,console]
24+
----
25+
POST /_snapshot/my_repository/_verify
26+
----
27+
28+
[[verify-snapshot-repo-api-request]]
29+
==== {api-request-title}
30+
31+
`POST /_snapshot/<repository>/_verify`
32+
33+
[[verify-snapshot-repo-api-desc]]
34+
==== {api-description-title}
35+
36+
By default, <<put-snapshot-repo-api,put snapshot repository API>> requests
37+
verify that a snapshot is functional on all master and data nodes in the
38+
cluster.
39+
40+
You can skip this verification using the put snapshot repository API's `verify`
41+
parameter. You can then use the verify snapshot repository API to manually
42+
verify the repository.
43+
44+
If verification is successful, the verify snapshot repository API returns a list
45+
of nodes connected to the snapshot repository. If verification failed, the API
46+
returns an error.
47+
48+
[[verify-snapshot-repo-api-path-params]]
49+
==== {api-path-parms-title}
50+
51+
`<repository>`::
52+
(Required, string)
53+
Name of the snapshot repository to verify.
54+
55+
[[verify-snapshot-repo-api-query-params]]
56+
==== {api-query-parms-title}
57+
58+
`master_timeout`::
59+
(Optional, <<time-units, time units>>) Specifies the period of time to wait for
60+
a connection to the master node. If no response is received before the timeout
61+
expires, the request fails and returns an error. Defaults to `30s`.
62+
63+
`timeout`::
64+
(Optional, <<time-units, time units>>) Specifies the period of time to wait for
65+
a response. If no response is received before the timeout expires, the request
66+
fails and returns an error. Defaults to `30s`.
67+
68+
[role="child_attributes"]
69+
[[verify-snapshot-repo-api-response-body]]
70+
==== {api-response-body-title}
71+
72+
`nodes`::
73+
(object)
74+
+
75+
.Properties of `nodes` objects
76+
[%collapsible%open]
77+
====
78+
`<node_id>`::
79+
(object)
80+
Contains information about a node connected to the snapshot repository.
81+
+
82+
The key is the ID of the node.
83+
+
84+
.Properties of `<node_id>`
85+
[%collapsible%open]
86+
=====
87+
`name`::
88+
(string)
89+
Human-readable name for the node.
90+
+
91+
You can set this name using the <<node.name,`node.name`>> property in
92+
`elasticsearch.yml`. Defaults to the machine's hostname.
93+
=====
94+
====

0 commit comments

Comments
 (0)