Skip to content
5 changes: 5 additions & 0 deletions docs/changelog/114128.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 114128
summary: Adding `index_template_substitutions` to the simulate ingest API
area: Ingest Node
type: enhancement
issues: []
11 changes: 7 additions & 4 deletions docs/reference/indices/put-index-template.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ include::{docdir}/rest-api/common-parms.asciidoc[tag=master-timeout]
[[put-index-template-api-request-body]]
==== {api-request-body-title}

// tag::request-body[]

`composed_of`::
(Optional, array of strings)
An ordered list of component template names. Component templates are merged in the order
Expand All @@ -102,7 +104,7 @@ See <<create-index-template,create an index template>>.
+
.Properties of `data_stream`
[%collapsible%open]
====
=====
`allow_custom_routing`::
(Optional, Boolean) If `true`, the data stream supports
<<mapping-routing-field,custom routing>>. Defaults to `false`.
Expand All @@ -117,7 +119,7 @@ See <<create-index-template,create an index template>>.
+
If `time_series`, each backing index has an `index.mode` index setting of
`time_series`.
====
=====

`index_patterns`::
(Required, array of strings)
Expand Down Expand Up @@ -146,7 +148,7 @@ Template to be applied. It may optionally include an `aliases`, `mappings`, or
+
.Properties of `template`
[%collapsible%open]
====
=====
`aliases`::
(Optional, object of objects) Aliases to add.
+
Expand All @@ -161,7 +163,7 @@ include::{es-ref-dir}/indices/create-index.asciidoc[tag=aliases-props]
include::{docdir}/rest-api/common-parms.asciidoc[tag=mappings]

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

`version`::
(Optional, integer)
Expand All @@ -174,6 +176,7 @@ Marks this index template as deprecated.
When creating or updating a non-deprecated index template that uses deprecated components,
{es} will emit a deprecation warning.
// end::index-template-api-body[]
// end::request-body[]

[[put-index-template-api-example]]
==== {api-examples-title}
Expand Down
21 changes: 21 additions & 0 deletions docs/reference/ingest/apis/simulate-ingest.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,21 @@ POST /_ingest/_simulate
}
}
}
},
"index_template_substitutions": { <3>
"my-index-template": {
"index_patterns": ["my-index-*"],
"composed_of": ["component_template_1", "component_template_2"]
}
}
}
----

<1> This replaces the existing `my-pipeline` pipeline with the contents given here for the duration of this request.
<2> This replaces the existing `my-component-template` component template with the contents given here for the duration of this request.
These templates can be used to change the pipeline(s) used, or to modify the mapping that will be used to validate the result.
<3> This replaces the existing `my-index-template` index template with the contents given here for the duration of this request.
These templates can be used to change the pipeline(s) used, or to modify the mapping that will be used to validate the result.

[[simulate-ingest-api-request]]
==== {api-request-title}
Expand Down Expand Up @@ -225,6 +233,19 @@ include::{es-ref-dir}/indices/put-component-template.asciidoc[tag=template]

====

`index_template_substitutions`::
(Optional, map of strings to objects)
Map of index template names to substitute index template definition objects.
+
.Properties of index template definition objects
[%collapsible%open]

====

include::{es-ref-dir}/indices/put-index-template.asciidoc[tag=request-body]

====

[[simulate-ingest-api-example]]
==== {api-examples-title}

Expand Down
Loading