2020-07-09 20:45:13 +08:00
|
|
|
[role="xpack"]
|
2020-05-13 20:51:39 +08:00
|
|
|
[[indices-delete-data-stream]]
|
|
|
|
=== Delete data stream API
|
|
|
|
++++
|
|
|
|
<titleabbrev>Delete data stream</titleabbrev>
|
|
|
|
++++
|
|
|
|
|
2020-06-18 22:46:01 +08:00
|
|
|
Deletes one or more <<data-streams,data streams>> and their backing
|
2021-04-01 05:28:55 +08:00
|
|
|
indices. See <<delete-data-stream>>.
|
2020-05-13 20:51:39 +08:00
|
|
|
|
|
|
|
////
|
|
|
|
[source,console]
|
2020-06-18 22:46:01 +08:00
|
|
|
----
|
|
|
|
PUT /_index_template/template
|
2020-05-13 20:51:39 +08:00
|
|
|
{
|
2020-05-28 19:11:15 +08:00
|
|
|
"index_patterns": ["my-data-stream*"],
|
2020-07-15 00:08:54 +08:00
|
|
|
"data_stream": { }
|
2020-05-13 20:51:39 +08:00
|
|
|
}
|
2020-05-28 19:11:15 +08:00
|
|
|
|
|
|
|
PUT /_data_stream/my-data-stream
|
2020-06-18 22:46:01 +08:00
|
|
|
----
|
2020-05-13 20:51:39 +08:00
|
|
|
// TESTSETUP
|
|
|
|
////
|
|
|
|
|
|
|
|
[source,console]
|
2020-06-18 22:46:01 +08:00
|
|
|
----
|
|
|
|
DELETE /_data_stream/my-data-stream
|
|
|
|
----
|
2020-05-13 20:51:39 +08:00
|
|
|
|
2020-05-28 19:11:15 +08:00
|
|
|
////
|
|
|
|
[source,console]
|
2020-06-18 22:46:01 +08:00
|
|
|
----
|
2020-05-28 19:11:15 +08:00
|
|
|
DELETE /_index_template/template
|
2020-06-18 22:46:01 +08:00
|
|
|
----
|
2020-05-28 19:11:15 +08:00
|
|
|
// TEST[continued]
|
|
|
|
////
|
2020-05-13 20:51:39 +08:00
|
|
|
|
|
|
|
[[delete-data-stream-api-request]]
|
|
|
|
==== {api-request-title}
|
|
|
|
|
2020-06-18 22:46:01 +08:00
|
|
|
`DELETE /_data_stream/<data-stream>`
|
2020-05-13 20:51:39 +08:00
|
|
|
|
2021-01-20 22:23:58 +08:00
|
|
|
[[delete-data-stream-api-prereqs]]
|
|
|
|
==== {api-prereq-title}
|
|
|
|
|
|
|
|
* If the {es} {security-features} are enabled, you must have the `delete_index`
|
|
|
|
or `manage` <<privileges-list-indices,index privilege>> for the data stream.
|
|
|
|
|
2020-05-13 20:51:39 +08:00
|
|
|
|
|
|
|
[[delete-data-stream-api-path-params]]
|
|
|
|
==== {api-path-parms-title}
|
|
|
|
|
|
|
|
`<data-stream>`::
|
2020-06-18 22:46:01 +08:00
|
|
|
(Required, string)
|
2020-07-03 05:12:50 +08:00
|
|
|
Comma-separated list of data streams to delete.
|
2020-06-18 22:46:01 +08:00
|
|
|
Wildcard (`*`) expressions are supported.
|
2021-01-13 22:09:15 +08:00
|
|
|
|
|
|
|
[role="child_attributes"]
|
|
|
|
[[delete-data-stream-api-query-parms]]
|
|
|
|
==== {api-query-parms-title}
|
|
|
|
|
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=ds-expand-wildcards]
|
|
|
|
+
|
|
|
|
Defaults to `open`.
|