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] Add "delete index template" API docs #46101

Merged
merged 4 commits into from
Aug 29, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 7 additions & 0 deletions docs/reference/indices.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ index settings, aliases, mappings, and index templates.
* <<indices-update-settings>>
* <<indices-get-settings>>
* <<indices-analyze>>

[float]
[[index-templates]]
=== Index templates:
* <<indices-delete-template>>
* <<indices-templates>>

[float]
Expand Down Expand Up @@ -103,6 +108,8 @@ include::indices/get-settings.asciidoc[]

include::indices/analyze.asciidoc[]

include::indices/delete-index-template.asciidoc[]

include::indices/templates.asciidoc[]

include::indices/stats.asciidoc[]
Expand Down
48 changes: 48 additions & 0 deletions docs/reference/indices/delete-index-template.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[[indices-delete-template]]
=== Delete index template API
++++
<titleabbrev>Delete template index</titleabbrev>
++++

Deletes an existing index.

include::templates.asciidoc[tag=index-template-def]

jrodewig marked this conversation as resolved.
Show resolved Hide resolved
////
[source,js]
--------------------------------------------------
PUT _template/template_1
{
"index_patterns" : ["te*"],
"settings": {
"number_of_shards": 1
}
}
--------------------------------------------------
// CONSOLE
// TESTSETUP
////

[source,js]
--------------------------------------------------
DELETE /_template/template_1
--------------------------------------------------
// CONSOLE


[[delete-template-api-request]]
==== {api-request-title}

`DELETE /_template/<index-template>`


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

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


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

include::{docdir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
2 changes: 2 additions & 0 deletions docs/reference/indices/templates.asciidoc
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
[[indices-templates]]
=== Index Templates

// tag::index-template-def[]
Index templates allow you to define templates that will automatically be
applied when new indices are created. The templates include both
<<index-modules-settings,settings>> and <<mapping,mappings>>
and a simple pattern template that controls whether the template should be
applied to the new index.
// end::index-template-def[]

NOTE: Templates are only applied at index creation time. Changing a template
will have no impact on existing indices. When using the create index API, the
Expand Down
7 changes: 7 additions & 0 deletions docs/reference/rest-api/common-parms.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ tag::index[]
used to limit the request.
end::index[]

tag::index-template[]
`<index-template>`::
(Required, string)
Comma-separated list or wildcard expression of index template names
used to limit the request.
end::index-template[]

tag::local[]
`local`::
(Optional, boolean) If `true`, the request retrieves information from the local
Expand Down