Get snapshot repository API

Get snapshot repository API

Gets information about one or more registered snapshot repositories.

  1. GET /_snapshot/my_repository

Request

GET /_snapshot/<repository>

GET /_snapshot

Prerequisites

  • If the Elasticsearch security features are enabled, you must have the monitor_snapshot, create_snapshot, or manage cluster privilege to use this API.

Path parameters

<repository>

(Optional, string) Comma-separated list of snapshot repository names used to limit the request. Wildcard (*) expressions are supported including combining wildcards with exclude patterns starting with -.

To get information about all snapshot repositories registered in the cluster, omit this parameter or use * or _all.

Query parameters

local

(Optional, Boolean) If true, the request gets information from the local node only. If false, the request gets information from the master node. Defaults to false.

master_timeout

(Optional, time units) Specifies the period of time to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Defaults to 30s.

Response body

<repository>

(object) Contains information about the snapshot repository. Key is the name of the snapshot repository.

Properties of <repository>

Examples

  1. GET /_snapshot/my_repository

The API returns the following response:

  1. {
  2. "my_repository" : {
  3. "type" : "fs",
  4. "uuid" : "0JLknrXbSUiVPuLakHjBrQ",
  5. "settings" : {
  6. "location" : "my_backup_location"
  7. }
  8. }
  9. }