diff --git a/x-pack/legacy/plugins/index_management/server/routes/api/templates/register_create_route.ts b/x-pack/legacy/plugins/index_management/server/routes/api/templates/register_create_route.ts index e134a97dd029e..8cc9f24f78a52 100644 --- a/x-pack/legacy/plugins/index_management/server/routes/api/templates/register_create_route.ts +++ b/x-pack/legacy/plugins/index_management/server/routes/api/templates/register_create_route.ts @@ -15,6 +15,7 @@ import { serializeTemplate } from '../../../../common/lib'; const handler: RouterRouteHandler = async (req, callWithRequest) => { const template = req.payload as Template; + const { include_type_name } = req.query as any; const serializedTemplate = serializeTemplate(template) as TemplateEs; const { name, order, index_patterns, version, settings, mappings, aliases } = serializedTemplate; @@ -49,6 +50,7 @@ const handler: RouterRouteHandler = async (req, callWithRequest) => { return await callWithRequest('indices.putTemplate', { name, order, + include_type_name, body: { index_patterns, version, diff --git a/x-pack/legacy/plugins/index_management/server/routes/api/templates/register_update_route.ts b/x-pack/legacy/plugins/index_management/server/routes/api/templates/register_update_route.ts index 15590e2acbe71..ccbda2dab9364 100644 --- a/x-pack/legacy/plugins/index_management/server/routes/api/templates/register_update_route.ts +++ b/x-pack/legacy/plugins/index_management/server/routes/api/templates/register_update_route.ts @@ -10,6 +10,7 @@ import { serializeTemplate } from '../../../../common/lib'; const handler: RouterRouteHandler = async (req, callWithRequest) => { const { name } = req.params; + const { include_type_name } = req.query as any; const template = req.payload as Template; const serializedTemplate = serializeTemplate(template) as TemplateEs; @@ -22,6 +23,7 @@ const handler: RouterRouteHandler = async (req, callWithRequest) => { return await callWithRequest('indices.putTemplate', { name, order, + include_type_name, body: { index_patterns, version,