2019-08-30 02:37:47 +08:00
|
|
|
[[indices-delete-template]]
|
|
|
|
=== Delete index template API
|
|
|
|
++++
|
2019-10-02 03:13:27 +08:00
|
|
|
<titleabbrev>Delete index template</titleabbrev>
|
2019-08-30 02:37:47 +08:00
|
|
|
++++
|
|
|
|
|
2020-09-09 22:13:13 +08:00
|
|
|
Deletes an <<index-templates,index template>>.
|
2019-08-30 02:37:47 +08:00
|
|
|
|
|
|
|
////
|
2019-09-06 22:55:16 +08:00
|
|
|
[source,console]
|
2020-09-09 22:13:13 +08:00
|
|
|
----
|
|
|
|
PUT /_index_template/my-index-template
|
2019-08-30 02:37:47 +08:00
|
|
|
{
|
|
|
|
"index_patterns" : ["te*"],
|
2020-09-09 22:13:13 +08:00
|
|
|
"template": {
|
|
|
|
"settings": {
|
2019-08-30 02:37:47 +08:00
|
|
|
"number_of_shards": 1
|
|
|
|
}
|
2020-09-09 22:13:13 +08:00
|
|
|
}
|
2019-08-30 02:37:47 +08:00
|
|
|
}
|
2020-09-09 22:13:13 +08:00
|
|
|
----
|
2019-08-30 02:37:47 +08:00
|
|
|
// TESTSETUP
|
|
|
|
////
|
|
|
|
|
2019-09-06 22:55:16 +08:00
|
|
|
[source,console]
|
2020-09-09 22:13:13 +08:00
|
|
|
----
|
|
|
|
DELETE /_index_template/my-index-template
|
|
|
|
----
|
2019-08-30 02:37:47 +08:00
|
|
|
|
|
|
|
|
|
|
|
[[delete-template-api-request]]
|
|
|
|
==== {api-request-title}
|
|
|
|
|
2020-09-09 22:13:13 +08:00
|
|
|
`DELETE /_index_template/<index-template>`
|
2019-08-30 02:37:47 +08:00
|
|
|
|
2021-03-11 17:52:28 +08:00
|
|
|
The provided <index-template> may contain multiple template names separated by a comma.
|
|
|
|
If multiple template names are specified then there is no wildcard support and the
|
|
|
|
provided names should match completely with existing templates.
|
|
|
|
|
2021-01-28 21:53:10 +08:00
|
|
|
[[delete-template-api-prereqs]]
|
|
|
|
==== {api-prereq-title}
|
|
|
|
|
|
|
|
* If the {es} {security-features} are enabled, you must have the
|
|
|
|
`manage_index_templates` or `manage` <<privileges-list-cluster,cluster
|
|
|
|
privilege>> to use this API.
|
2019-08-30 02:37:47 +08:00
|
|
|
|
|
|
|
[[delete-template-api-desc]]
|
|
|
|
==== {api-description-title}
|
|
|
|
|
2020-07-24 10:02:11 +08:00
|
|
|
Use the delete index template API to delete one or more index templates.
|
2021-03-11 17:52:28 +08:00
|
|
|
Index templates define <<index-modules-settings,settings>>, <<mapping,mappings>>,
|
2021-05-26 04:19:00 +08:00
|
|
|
and <<alias,aliases>> that can be applied automatically to new indices.
|
2019-08-30 02:37:47 +08:00
|
|
|
|
|
|
|
|
|
|
|
[[delete-template-api-path-params]]
|
|
|
|
==== {api-path-parms-title}
|
|
|
|
|
2020-06-02 06:55:05 +08:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-template]
|
2019-08-30 02:37:47 +08:00
|
|
|
|
|
|
|
|
|
|
|
[[delete-template-api-query-params]]
|
|
|
|
==== {api-query-parms-title}
|
|
|
|
|
2020-06-02 06:55:05 +08:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
|