---
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/4371/api/doc/elasticsearch/v8/operation/operation-snapshot-verify-repository
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/operation/operation-snapshot-verify-repository
products:
  - Elasticsearch
---

# Verify a snapshot repository

Availability: 0.0+

## Paths

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

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/authentication#basicauth)
- [Bearer auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/authentication#bearerauth)

#### Path Parameters

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

## Description

Check for common misconfigurations in a snapshot repository.

## Required authorization

* Cluster privileges: `manage`

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

## Query String Parameters

- `master_timeout` (string Duration · default: 30s)
  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 Duration · default: 30s)
  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 CompactNodeInfo)
  Information about the nodes connected to the snapshot repository.
The key is the ID of the node.
  Map values ({} CompactNodeInfo)
  - `name` (string Name)
    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"
)
```

