diff --git a/docs/reference/snapshot-restore/apis/delete-repo-api.asciidoc b/docs/reference/snapshot-restore/apis/delete-repo-api.asciidoc new file mode 100644 index 000000000000..5b518db7e82b --- /dev/null +++ b/docs/reference/snapshot-restore/apis/delete-repo-api.asciidoc @@ -0,0 +1,56 @@ +[[delete-snapshot-repo-api]] +=== Delete snapshot repository API +++++ +Delete snapshot repository +++++ + +Unregisters one or more <>. + +When a repository is unregistered, {es} only removes the reference to the +location where the repository is storing the snapshots. The snapshots themselves +are left untouched and in place. + +//// +[source,console] +---- +PUT /_snapshot/my_repository +{ + "type": "fs", + "settings": { + "location": "my_backup_location" + } +} +---- +//// + +[source,console] +---- +DELETE /_snapshot/my_repository +---- +// TEST[continued] + +[[delete-snapshot-repo-api-request]] +==== {api-request-title} + +`DELETE /_snapshot/` + +[[delete-snapshot-repo-api-path-params]] +==== {api-path-parms-title} + +``:: +(Required, string) +Name of the snapshot repository to unregister. Wildcard (`*`) patterns are +supported. + +[[delete-snapshot-repo-api-query-params]] +==== {api-query-parms-title} + +`master_timeout`:: +(Optional, <>) 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`. + +`timeout`:: +(Optional, <>) Specifies the period of time to wait for +a response. If no response is received before the timeout expires, the request +fails and returns an error. Defaults to `30s`. diff --git a/docs/reference/snapshot-restore/apis/snapshot-restore-apis.asciidoc b/docs/reference/snapshot-restore/apis/snapshot-restore-apis.asciidoc index 14bfc454bad7..25eae2d4946e 100644 --- a/docs/reference/snapshot-restore/apis/snapshot-restore-apis.asciidoc +++ b/docs/reference/snapshot-restore/apis/snapshot-restore-apis.asciidoc @@ -17,8 +17,10 @@ content may not be included yet. === Snapshot repository management APIs * <> +* <> * <> include::clean-up-repo-api.asciidoc[] +include::delete-repo-api.asciidoc[] include::put-repo-api.asciidoc[] \ No newline at end of file diff --git a/docs/reference/snapshot-restore/register-repository.asciidoc b/docs/reference/snapshot-restore/register-repository.asciidoc index 85f1c40ebeb5..bd3f6f1630d2 100644 --- a/docs/reference/snapshot-restore/register-repository.asciidoc +++ b/docs/reference/snapshot-restore/register-repository.asciidoc @@ -79,6 +79,18 @@ or GET /_snapshot/_all ----------------------------------- +You can unregister a repository using the <>: + +[source,console] +----------------------------------- +DELETE /_snapshot/my_backup +----------------------------------- + +When a repository is unregistered, {es} only removes the reference to the +location where the repository is storing the snapshots. The snapshots themselves +are left untouched and in place. + [float] [[snapshots-filesystem-repository]] === Shared file system repository diff --git a/docs/reference/snapshot-restore/take-snapshot.asciidoc b/docs/reference/snapshot-restore/take-snapshot.asciidoc index aeeb18ecfc2d..8c8324273098 100644 --- a/docs/reference/snapshot-restore/take-snapshot.asciidoc +++ b/docs/reference/snapshot-restore/take-snapshot.asciidoc @@ -201,16 +201,3 @@ DELETE /_snapshot/my_backup/my_backup,my_fs_backup DELETE /_snapshot/my_backup/snap* ----------------------------------- // TEST[skip:no my_fs_backup] - -A repository can be unregistered using the following command: - -[source,console] ------------------------------------ -DELETE /_snapshot/my_backup ------------------------------------ -// TEST[continued] - -When a repository is unregistered, Elasticsearch only removes the reference to the location where the repository is storing -the snapshots. The snapshots themselves are left untouched and in place. - - diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/snapshot.delete_repository.json b/rest-api-spec/src/main/resources/rest-api-spec/api/snapshot.delete_repository.json index b94c5f39b4f2..b60aeba83a32 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/snapshot.delete_repository.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/snapshot.delete_repository.json @@ -15,7 +15,7 @@ "parts":{ "repository":{ "type":"list", - "description":"A comma-separated list of repository names" + "description":"Name of the snapshot repository to unregister. Wildcard (`*`) patterns are supported." } } }