Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Reformat delete index API docs #45755

Merged
merged 4 commits into from
Aug 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 42 additions & 10 deletions docs/reference/indices/delete-index.asciidoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
[[indices-delete-index]]
=== Delete Index
=== Delete index API
++++
<titleabbrev>Delete index</titleabbrev>
++++

The delete index API allows to delete an existing index.
Deletes an existing index.

[source,js]
--------------------------------------------------
Expand All @@ -10,13 +13,42 @@ DELETE /twitter
// CONSOLE
// TEST[setup:twitter]

The above example deletes an index called `twitter`. Specifying an index or a
wildcard expression is required. Aliases cannot be used to delete an index.
Wildcard expressions are resolved to matching concrete indices only.

The delete index API can also be applied to more than one index, by either
using a comma separated list, or on all indices (be careful!) by using `_all` or `*` as index.
[[delete-index-api-request]]
==== {api-request-title}

In order to disable allowing to delete indices via wildcards or `_all`,
set `action.destructive_requires_name` setting in the config to `true`.
This setting can also be changed via the cluster update settings api.
`DELETE /<index>`


[[delete-index-api-path-params]]
==== {api-path-parms-title}

`<index>`::
+
--
(Request, string) Comma-separated list or wildcard expression of indices to
delete.

In this parameter, wildcard expressions match only open, concrete indices. You
cannot delete an index using an <<indices-aliases,alias>>.

To delete all indices, use `_all` or `*` . To disallow the deletion of indices
with `_all` or wildcard expressions, change the
`action.destructive_requires_name` cluster setting to `true`. You can update
this setting in the `elasticsearch.yml` file or using the
<<cluster-update-settings,cluster update settings>> API.
--


[[delete-index-api-query-params]]
==== {api-query-parms-title}

include::{docdir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]

include::{docdir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
+
Defaults to `open`.

include::{docdir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable]

include::{docdir}/rest-api/common-parms.asciidoc[tag=timeoutparms]