|
1 | 1 | [[indices-component-template]] |
2 | | -=== Component template API |
| 2 | +=== Put component template API |
3 | 3 | ++++ |
4 | | -<titleabbrev>Component template</titleabbrev> |
| 4 | +<titleabbrev>Put component template</titleabbrev> |
5 | 5 | ++++ |
6 | 6 |
|
7 | 7 | Component templates are building blocks that specify mappings, settings, or alias configuration, but |
@@ -74,66 +74,6 @@ You can use C-style /* */ block comments in component templates. |
74 | 74 | You can include comments anywhere in the request body, |
75 | 75 | except before the opening curly bracket. |
76 | 76 |
|
77 | | -[[getting-component-templates]] |
78 | | -===== Getting component templates |
79 | | - |
80 | | -=== Get component template API |
81 | | -++++ |
82 | | -<titleabbrev>Get component template</titleabbrev> |
83 | | -++++ |
84 | | - |
85 | | -Returns information about one or more component templates. |
86 | | - |
87 | | -[source,console] |
88 | | --------------------------------------------------- |
89 | | -GET /_component_template/template_1 |
90 | | --------------------------------------------------- |
91 | | - |
92 | | -[[get-component-template-api-request]] |
93 | | -==== {api-request-title} |
94 | | - |
95 | | -`GET /_component-template/<component-template>` |
96 | | - |
97 | | - |
98 | | -[[get-component-template-api-path-params]] |
99 | | -==== {api-path-parms-title} |
100 | | - |
101 | | -include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-template] |
102 | | -+ |
103 | | -To return all component templates, omit this parameter or use a value of `*`. |
104 | | - |
105 | | - |
106 | | -[[get-component-template-api-query-params]] |
107 | | -==== {api-query-parms-title} |
108 | | - |
109 | | -include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=flat-settings] |
110 | | - |
111 | | -include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=local] |
112 | | - |
113 | | -include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout] |
114 | | - |
115 | | - |
116 | | -[[get-component-template-api-example]] |
117 | | -==== {api-examples-title} |
118 | | - |
119 | | - |
120 | | -[[get-component-template-api-wildcard-ex]] |
121 | | -===== Get component templates using a wildcard expression |
122 | | - |
123 | | -[source,console] |
124 | | --------------------------------------------------- |
125 | | -GET /_component_template/temp* |
126 | | --------------------------------------------------- |
127 | | - |
128 | | - |
129 | | -[[get-component-template-api-all-ex]] |
130 | | -===== Get all component templates |
131 | | - |
132 | | -[source,console] |
133 | | --------------------------------------------------- |
134 | | -GET /_component_template |
135 | | --------------------------------------------------- |
136 | | - |
137 | 77 | [[put-component-template-api-path-params]] |
138 | 78 | ==== {api-path-parms-title} |
139 | 79 |
|
@@ -270,3 +210,61 @@ PUT /_component_template/template_1 |
270 | 210 | -------------------------------------------------- |
271 | 211 |
|
272 | 212 | To check the `_meta`, you can use the <<getting-component-templates,get component template>> API. |
| 213 | + |
| 214 | +[[getting-component-templates]] |
| 215 | +=== Get component template API |
| 216 | +++++ |
| 217 | +<titleabbrev>Get component template</titleabbrev> |
| 218 | +++++ |
| 219 | + |
| 220 | +Returns information about one or more component templates. |
| 221 | + |
| 222 | +[source,console] |
| 223 | +-------------------------------------------------- |
| 224 | +GET /_component_template/template_1 |
| 225 | +-------------------------------------------------- |
| 226 | + |
| 227 | +[[get-component-template-api-request]] |
| 228 | +==== {api-request-title} |
| 229 | + |
| 230 | +`GET /_component-template/<component-template>` |
| 231 | + |
| 232 | + |
| 233 | +[[get-component-template-api-path-params]] |
| 234 | +==== {api-path-parms-title} |
| 235 | + |
| 236 | +include::{docdir}/rest-api/common-parms.asciidoc[tag=index-template] |
| 237 | ++ |
| 238 | +To return all component templates, omit this parameter or use a value of `*`. |
| 239 | + |
| 240 | + |
| 241 | +[[get-component-template-api-query-params]] |
| 242 | +==== {api-query-parms-title} |
| 243 | + |
| 244 | +include::{docdir}/rest-api/common-parms.asciidoc[tag=flat-settings] |
| 245 | + |
| 246 | +include::{docdir}/rest-api/common-parms.asciidoc[tag=local] |
| 247 | + |
| 248 | +include::{docdir}/rest-api/common-parms.asciidoc[tag=master-timeout] |
| 249 | + |
| 250 | + |
| 251 | +[[get-component-template-api-example]] |
| 252 | +==== {api-examples-title} |
| 253 | + |
| 254 | + |
| 255 | +[[get-component-template-api-wildcard-ex]] |
| 256 | +===== Get component templates using a wildcard expression |
| 257 | + |
| 258 | +[source,console] |
| 259 | +-------------------------------------------------- |
| 260 | +GET /_component_template/temp* |
| 261 | +-------------------------------------------------- |
| 262 | + |
| 263 | + |
| 264 | +[[get-component-template-api-all-ex]] |
| 265 | +===== Get all component templates |
| 266 | + |
| 267 | +[source,console] |
| 268 | +-------------------------------------------------- |
| 269 | +GET /_component_template |
| 270 | +-------------------------------------------------- |
0 commit comments