---
type: api
title: List the attached snapshot repositories
description: Lists all the snapshot repositories this deployment has access to. These are snapshot repositories of other deployments that have been linked to this deployment.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-get-deployment-es-resource-snapshot-repository
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-get-deployment-es-resource-snapshot-repository
products:
  - Elastic Cloud Enterprise
---

# List the attached snapshot repositories

## Paths

- `GET` `/deployments/{deployment_id}/elasticsearch/{ref_id}/snapshot/repository`

- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/authentication#basicauth)
- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/authentication#apikey)

#### Path Parameters

- `deployment_id` (string)
  Identifier for the Deployment
- `ref_id` (string)
  User-specified RefId for the Resource (or '_main' if there is only one)

## Description

Lists all the snapshot repositories this deployment has access to. These are snapshot repositories of other deployments that have been linked to this deployment.

## Responses

#### `200`

List of snapshot repositories for this deployment

`application/json`

- `repositories` ([] SnapshotDependency)
  List of snapshot repositories (other deployments whose snapshots this deployment can access)
  - `cluster_id` (string)
    Elasticsearch cluster id
  - `deployment_id` (string)
    Deployment id
  - `deployment_name` (string)
    Deployment name
  - `repository_name` (string)
    The name of the snapshot repository in Elasticsearch (e.g. _clone_abcd1234)
#### `404`

* The Deployment specified by {deployment_id} cannot be found. (code: `deployments.deployment_not_found`)
* The Resource specified by {ref_id} cannot be found. (code: `deployments.deployment_resource_not_found`)

`application/json`

- `errors` ([] BasicFailedReplyElement)
  A list of errors that occurred in the failing request
  - `code` (string)
    A structured code representing the error type that occurred
  - `message` (string)
    A human readable message describing the error that occurred
  - `fields` ([] string)
    If the error can be tied to a specific field or fields in the user request, this lists those fields
##### Response Headers

- `x-cloud-error-codes` (enum)
  The error codes associated with the response

#### `500`

We have failed you. (code: `deployments.metadata_internal_error`)

`application/json`

- `errors` ([] BasicFailedReplyElement)
  A list of errors that occurred in the failing request
  - `code` (string)
    A structured code representing the error type that occurred
  - `message` (string)
    A human readable message describing the error that occurred
  - `fields` ([] string)
    If the error can be tied to a specific field or fields in the user request, this lists those fields
##### Response Headers

- `x-cloud-error-codes` (enum)
  The error codes associated with the response

## Code Examples

#### Console

```console
GET /deployments/{deployment_id}/elasticsearch/{ref_id}/snapshot/repository
```

#### curl

```curl
curl -X GET "/deployments/{deployment_id}/elasticsearch/{ref_id}/snapshot/repository"
```

