Get snapshot repository information Generally available; Added in 0.0.0

GET /_snapshot/{repository}

Required authorization

  • Cluster privileges: monitor_snapshot

Path parameters

  • repository string | array[string] Required

    A 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 boolean

    If true, the request gets information from the local node only. If false, the request gets information from the master node.

  • master_timeout string

    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.

    Values are -1 or 0.

Responses

  • 200 application/json
GET /_snapshot/{repository}
GET /_snapshot/my_repository
resp = client.snapshot.get_repository(
    name="my_repository",
)
const response = await client.snapshot.getRepository({
  name: "my_repository",
});
response = client.snapshot.get_repository(
  repository: "my_repository"
)
$resp = $client->snapshot()->getRepository([
    "repository" => "my_repository",
]);
curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_snapshot/my_repository"
Response examples (200)
A successful response from `GET /_snapshot/my_repository`.
{
  "my_repository" : {
    "type" : "fs",
    "uuid" : "0JLknrXbSUiVPuLakHjBrQ",
    "settings" : {
      "location" : "my_backup_location"
    }
  }
}