Delete snapshots Generally available

DELETE /_snapshot/{repository}/{snapshot}

Required authorization

  • Cluster privileges: manage

Path parameters

  • repository string Required

    A repository name

  • snapshot string Required

    A comma-separated list of snapshot names

Query parameters

  • master_timeout string

    Explicit operation timeout for connection to master node

    Values are -1 or 0.

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • acknowledged boolean Required

      For a successful response, this value is always true. On failure, an exception is returned instead.

DELETE /_snapshot/{repository}/{snapshot}
DELETE /_snapshot/my_repository/snapshot_2,snapshot_3
resp = client.snapshot.delete(
    repository="my_repository",
    snapshot="snapshot_2,snapshot_3",
)
const response = await client.snapshot.delete({
  repository: "my_repository",
  snapshot: "snapshot_2,snapshot_3",
});
response = client.snapshot.delete(
  repository: "my_repository",
  snapshot: "snapshot_2,snapshot_3"
)
$resp = $client->snapshot()->delete([
    "repository" => "my_repository",
    "snapshot" => "snapshot_2,snapshot_3",
]);
curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_snapshot/my_repository/snapshot_2,snapshot_3"
Response examples (200)
A successful response from `DELETE /_snapshot/my_repository/snapshot_2,snapshot_3`. The request deletes `snapshot_2` and `snapshot_3` from the repository named `my_repository`.
{
  "acknowledged" : true
}