Link Search Menu Expand Document Documentation Menu

Delete Snapshot Repository API

Introduced 1.0

Deletes a snapshot repository registration from the cluster. The storage location and the snapshots in it are not deleted. To use the snapshots again, register the repository again using the Create or Update Snapshot Repository API.

Endpoints

DELETE _snapshot/{repository}

Path parameters

The following table lists the available path parameters.

Parameter Data type Description
repository String Repository to delete.

Example request

The following request deletes the my-opensearch-repo repository:

DELETE /_snapshot/my-opensearch-repo
response = client.snapshot.delete_repository(
  repository = "my-opensearch-repo"
)

Example response

Upon success, the response returns the following JSON object:

{
  "acknowledged" : true
}

To verify that the repository was deleted, use the Get snapshot repository API, passing the repository name as the repository path parameter.

Required permissions

If you use the Security plugin, make sure you have the appropriate permissions: cluster:admin/repository/delete.

350 characters left

Have a question? .

Want to contribute? or .