Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
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
5 changes: 4 additions & 1 deletion docs/reference/indices.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ index settings, data streams, aliases, mappings, and index templates.
[[index-templates]]
=== Index templates:
* <<indices-templates>>
* <<indices-delete-template>>
* <<indices-put-template>>
* <<indices-get-template>>
* <<indices-delete-template>>
* <<indices-component-template>>
* <<getting-component-templates>>
* <<indices-template-exists>>

[float]
Expand Down
122 changes: 60 additions & 62 deletions docs/reference/indices/component-templates.asciidoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[indices-component-template]]
=== Component template API
=== Put component template API
++++
<titleabbrev>Component template</titleabbrev>
<titleabbrev>Put component template</titleabbrev>
++++

Component templates are building blocks that specify mappings, settings, or alias configuration, but
Expand Down Expand Up @@ -74,66 +74,6 @@ You can use C-style /* */ block comments in component templates.
You can include comments anywhere in the request body,
except before the opening curly bracket.

[[getting-component-templates]]
===== Getting component templates

=== Get component template API
++++
<titleabbrev>Get component template</titleabbrev>
++++

Returns information about one or more component templates.

[source,console]
--------------------------------------------------
GET /_component_template/template_1
--------------------------------------------------

[[get-component-template-api-request]]
==== {api-request-title}

`GET /_component-template/<component-template>`


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

include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-template]
+
To return all component templates, omit this parameter or use a value of `*`.


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

include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=flat-settings]

include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=local]

include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]


[[get-component-template-api-example]]
==== {api-examples-title}


[[get-component-template-api-wildcard-ex]]
===== Get component templates using a wildcard expression

[source,console]
--------------------------------------------------
GET /_component_template/temp*
--------------------------------------------------


[[get-component-template-api-all-ex]]
===== Get all component templates

[source,console]
--------------------------------------------------
GET /_component_template
--------------------------------------------------

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

Expand Down Expand Up @@ -270,3 +210,61 @@ PUT /_component_template/template_1
--------------------------------------------------

To check the `_meta`, you can use the <<getting-component-templates,get component template>> API.

[[getting-component-templates]]
=== Get component template API
++++
<titleabbrev>Get component template</titleabbrev>
++++

Returns information about one or more component templates.

[source,console]
--------------------------------------------------
GET /_component_template/template_1
--------------------------------------------------

[[get-component-template-api-request]]
==== {api-request-title}

`GET /_component-template/<component-template>`


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

include::{docdir}/rest-api/common-parms.asciidoc[tag=index-template]
+
To return all component templates, omit this parameter or use a value of `*`.


[[get-component-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=local]

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


[[get-component-template-api-example]]
==== {api-examples-title}


[[get-component-template-api-wildcard-ex]]
===== Get component templates using a wildcard expression

[source,console]
--------------------------------------------------
GET /_component_template/temp*
--------------------------------------------------


[[get-component-template-api-all-ex]]
===== Get all component templates

[source,console]
--------------------------------------------------
GET /_component_template
--------------------------------------------------
Loading