---
type: api
title: Verify a snapshot repository
description: Check for common misconfigurations in a snapshot repository.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/v8/operation/operation-snapshot-verify-repository
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/v8/operation/operation-snapshot-verify-repository
products:
  - Elasticsearch
---

# Verify a snapshot repository

Availability: Generally available since 0.0

## Paths

- `POST` `/_snapshot/{repository}/_verify`

#### Path parameters

- `repository` (string) — required
  The name of the snapshot repository to verify.

## Description

Check for common misconfigurations in a snapshot repository.

[Read the reference documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.19/snapshots-register-repository.html#snapshots-repository-verification)

## Required authorization

- Cluster privileges: `manage`

## Authentication

- Api key: `Authorization: <value>`
  Elasticsearch APIs support key-based authentication.
  You must create an API key and use the encoded value in the request header.
  For example:
  
  
  ```
  curl -X GET "${ES_URL}/_cat/indices?v=true" \
    -H "Authorization: ApiKey ${API_KEY}"
  ```
  
  To get API keys, use the `/_security/api_key` APIs.
- Basic: `Authorization: Basic <credentials>`
- Bearer: `Authorization: Bearer <token>`
  Elasticsearch APIs support the use of bearer tokens in the `Authorization` HTTP header to authenticate with the API.
  For examples, refer to [Token-based authentication services](https://www.elastic.co/guide/en/elasticsearch/reference/current/token-authentication-services.html)

## Query string parameters

- `master_timeout` (string · default: 30s) — optional
  The period to wait for the master node.
If the master node is not available before the timeout expires, the request fails and returns an error.
To indicate that the request should never timeout, set it to `-1`.
- `timeout` (string · default: 30s) — optional
  The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata.
If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged.
To indicate that the request should never timeout, set it to `-1`.

## Response

`application/json`

- `nodes` (map string to object)
  Information about the nodes connected to the snapshot repository.
The key is the ID of the node.
  Map values (object)
  - `name` (string)
    A human-readable name for the node.
You can set this name using the `node.name` property in `elasticsearch.yml`.
The default value is the machine's hostname.
## Code examples

#### Console

```console
POST _snapshot/my_unverified_backup/_verify
```

#### JavaScript

```javascript
const response = await client.snapshot.verifyRepository({
  name: "my_unverified_backup",
});
```

#### Python

```python
resp = client.snapshot.verify_repository(
    name="my_unverified_backup",
)
```

#### curl

```curl
curl -X POST "$ELASTICSEARCH_URL/_snapshot/my_unverified_backup/_verify" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.snapshot().verifyRepository(v -> v
    .name("my_unverified_backup")
);
```

#### C#

```c#
var response = await client.Snapshot.VerifyRepositoryAsync(name: "my_unverified_backup");
```

#### PHP

```php
$resp = $client->snapshot()->verifyRepository([
    "repository" => "my_unverified_backup",
]);
```

#### Ruby

```ruby
response = client.snapshot.verify_repository(
  repository: "my_unverified_backup"
)
```

