OpenSearch/docs/reference/indices/get-index-template.asciidoc
Yannick Welsch f6686345c9 Avoid unnecessary setup and teardown in docs tests (#51430)
The docs tests have recently been running much slower than before (see #49753).

The gist here is that with ILM/SLM we do a lot of unnecessary setup / teardown work on each
test. Compounded with the slightly slower cluster state storage mechanism, this causes the
tests to run much slower.

In particular, on RAMDisk, docs:check is taking

ES 7.4: 6:55 minutes
ES master: 16:09 minutes
ES with this commit: 6:52 minutes

on SSD, docs:check is taking

ES 7.4: ??? minutes
ES master: 32:20 minutes
ES with this commit: 11:21 minutes
2020-01-28 16:52:23 +01:00

92 lines
2.0 KiB
Plaintext

[[indices-get-template]]
=== Get index template API
++++
<titleabbrev>Get index template</titleabbrev>
++++
Returns information about one or more index templates.
////
[source,console]
--------------------------------------------------
PUT _template/template_1
{
"index_patterns" : ["te*"],
"settings": {
"number_of_shards": 1
}
}
--------------------------------------------------
// TESTSETUP
[source,console]
--------------------------------------------------
DELETE _template/template_1
--------------------------------------------------
// TEARDOWN
////
[source,console]
--------------------------------------------------
GET /_template/template_1
--------------------------------------------------
[[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,console]
--------------------------------------------------
GET /_template/template_1,template_2
--------------------------------------------------
[[get-template-api-wildcard-ex]]
===== Get index templates using a wildcard expression
[source,console]
--------------------------------------------------
GET /_template/temp*
--------------------------------------------------
[[get-template-api-all-ex]]
===== Get all index templates
[source,console]
--------------------------------------------------
GET /_template
--------------------------------------------------