---
type: api
title: Get snapshot repository information
description: Get a list of snapshot repositories for a cluster.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/operation/operation-cat-repositories
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/operation/operation-cat-repositories
products:
  - Elasticsearch
---

# Get snapshot repository information

Availability: 2.1+

## Paths

- `GET` `/_cat/repositories`

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

## Description

Get a list of snapshot repositories for a cluster.
IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get snapshot repository API.

## Required authorization

* Cluster privileges: `monitor_snapshot`

## Query String Parameters

- `h` (union Names)
  List of columns to appear in the response. Supports simple wildcards.
  One of: `Name` or `Name[]`
- `s` (union Names)
  List of columns that determine how the table should be sorted.
Sorting defaults to ascending and can be changed by setting `:asc`
or `:desc` as a suffix to the column name.
  One of: `Name` or `Name[]`
- `local` (boolean · default: false)
  If `true`, the request computes the list of selected nodes from the
local cluster state. If `false` the list of selected nodes are computed
from the cluster state of the master node. In both cases the coordinating
node will send requests for further information to each selected node.
- `master_timeout` (string Duration · default: 30s)
  Period to wait for a connection to the master node.

## Response

`application/json`

Type: `[] RepositoriesRecord`

- `id` (string)
  The unique repository identifier.
- `type` (string)
  The repository type.
## Code Examples

#### Console

```console
GET /_cat/repositories?v=true&format=json
```

#### JavaScript

```javascript
const response = await client.cat.repositories({
  v: "true",
  format: "json",
});
```

#### Python

```python
resp = client.cat.repositories(
    v=True,
    format="json",
)
```

#### curl

```curl
curl -X GET "$ELASTICSEARCH_URL/_cat/repositories?v=true&format=json" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.cat().repositories(r -> r);
```

#### PHP

```php
$resp = $client->cat()->repositories([
    "v" => "true",
    "format" => "json",
]);
```

#### Ruby

```ruby
response = client.cat.repositories(
  v: "true",
  format: "json"
)
```

## Response Examples

#### Cat repositories response example1

A successful response from `GET /_cat/repositories?v=true&format=json`.

```json
[
  {
    "id": "repo1",
    "type": "fs"
  },
  {
    "id": "repo2",
    "type": "s3"
  }
]
```

