Verify snapshot repository

Introduced 1.0

Verifies that a snapshot repository is functional. Verifies the repository on each node in a cluster.

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.

If you use the Security plugin, you must have the manage cluster privilege.

Path and HTTP methods

  1. GET _snapshot/<repository>/

Path parameters

Path parameters are optional.

ParameterData typeDescription
repositoryStringName of repository to verify.

Query parameters

ParameterData typeDescription
cluster_manager_timeoutTimeAmount of time to wait for a connection to the cluster manager node. Optional, defaults to 30s.
timeoutTimeThe period of time to wait for a response. If a response is not received before the timeout value, the request fails and returns an error. Defaults to 30s.

Example request

The following request verifies that the my-opensearch-repo is functional:

  1. POST /_snapshot/my-opensearch-repo/_verify?timeout=0s&cluster_manager_timeout=50s

Example response

The example that follows corresponds to the request above in the Example request section.

The POST /_snapshot/my-opensearch-repo/_verify?timeout=0s&cluster_manager_timeout=50s request returns the following fields:

  1. {
  2. "nodes" : {
  3. "by1kztwTRoeCyg4iGU5Y8A" : {
  4. "name" : "opensearch-node1"
  5. }
  6. }
  7. }

In the preceding sample, one node is connected to the snapshot repository. If more were connected, you would see them in the response. Example:

  1. {
  2. "nodes" : {
  3. "lcfL6jv2jo6sMEtp4idMvg" : {
  4. "name" : "node-1"
  5. },
  6. "rEPtFT/B+cuuOHnQn0jy4s" : {
  7. "name" : "node-2"
  8. }
  9. }

Response body fields

FieldData typeDescription
nodesObjectA list (not an array) of nodes connected to the snapshot repository. Each node itself is a property where the node ID is the key and the name has an ID (Object) and a name (String).