Link Search Menu Expand Document Documentation Menu

You're viewing version 2.8 of the OpenSearch documentation. This version is no longer maintained. For the latest version, see the current documentation. For information about OpenSearch version maintenance, see Release Schedule and Maintenance Policy.

Verify snapshot repository

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 parameters

Path parameters are optional.

Parameter Data type Description
repository String Name of repository to verify.

Query parameters

Parameter Data type Description
cluster_manager_timeout Time Amount of time to wait for a connection to the master node. Optional, defaults to 30s.
timeout Time The 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:

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:

{
  "nodes" : {
    "by1kztwTRoeCyg4iGU5Y8A" : {
      "name" : "opensearch-node1"
    }
  }
}

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

{
  "nodes" : {
    "lcfL6jv2jo6sMEtp4idMvg" : {
      "name" : "node-1"
    },
    "rEPtFT/B+cuuOHnQn0jy4s" : {
      "name" : "node-2"
  }
}

Response fields

Field Data type Description
nodes Object A 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).
350 characters left

Have a question? .

Want to contribute? or .