-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DOCS] Add "get index template" API docs (#46296)
- Loading branch information
Showing
3 changed files
with
95 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
[[indices-get-template]] | ||
=== Get index template API | ||
++++ | ||
<titleabbrev>Get template index</titleabbrev> | ||
++++ | ||
|
||
Returns information about one or more index templates. | ||
|
||
//// | ||
[source,js] | ||
-------------------------------------------------- | ||
PUT _template/template_1 | ||
{ | ||
"index_patterns" : ["te*"], | ||
"settings": { | ||
"number_of_shards": 1 | ||
} | ||
} | ||
-------------------------------------------------- | ||
// CONSOLE | ||
// TESTSETUP | ||
//// | ||
|
||
[source,js] | ||
-------------------------------------------------- | ||
GET /_template/template_1 | ||
-------------------------------------------------- | ||
// CONSOLE | ||
|
||
|
||
[[get-template-api-request]] | ||
==== {api-request-title} | ||
|
||
`GET /_template/<index-template>` | ||
|
||
|
||
[[get-template-api-path-params]] | ||
==== {api-path-parms-title} | ||
|
||
include::{docdir}/rest-api/common-parms.asciidoc[tag=index-template] | ||
+ | ||
To return all index templates, omit this parameter | ||
or use a value of `_all` or `*`. | ||
|
||
|
||
[[get-template-api-query-params]] | ||
==== {api-query-parms-title} | ||
|
||
include::{docdir}/rest-api/common-parms.asciidoc[tag=flat-settings] | ||
|
||
include::{docdir}/rest-api/common-parms.asciidoc[tag=include-type-name] | ||
|
||
include::{docdir}/rest-api/common-parms.asciidoc[tag=local] | ||
|
||
include::{docdir}/rest-api/common-parms.asciidoc[tag=master-timeout] | ||
|
||
|
||
[[get-template-api-example]] | ||
==== {api-examples-title} | ||
|
||
|
||
[[get-template-api-multiple-ex]] | ||
===== Get multiple index templates | ||
|
||
[source,js] | ||
-------------------------------------------------- | ||
GET /_template/template_1,template_2 | ||
-------------------------------------------------- | ||
// CONSOLE | ||
|
||
|
||
[[get-template-api-wildcard-ex]] | ||
===== Get index templates using a wildcard expression | ||
|
||
[source,js] | ||
-------------------------------------------------- | ||
GET /_template/temp* | ||
-------------------------------------------------- | ||
// CONSOLE | ||
|
||
|
||
[[get-template-api-all-ex]] | ||
===== Get all index templates | ||
|
||
[source,js] | ||
-------------------------------------------------- | ||
GET /_template | ||
-------------------------------------------------- | ||
// CONSOLE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters