# Error when installing a template in ES

**URL:** https://discuss.elastic.co/t/error-when-installing-a-template-in-es/187210
**Category:** Elasticsearch
**Created:** [June 25, 2019, 1:22am UTC](https://discuss.elastic.co/t/error-when-installing-a-template-in-es/187210 "2019-06-25T01:22:35Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![kumar4](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kumar4/32/48326_2.png) [@kumar4](https://discuss.elastic.co/u/kumar4)
#### Post date: [June 25, 2019, 1:22am UTC](https://discuss.elastic.co/t/error-when-installing-a-template-in-es/187210/1 "2019-06-25T01:22:35Z")

</div>

when i run the flowwing command: curl -XPUT localhost:9200/\_template/blueliv -d @template.json  
it give me an error  
is there any oher command to instal template in ES 6

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [June 25, 2019, 6:02am UTC](https://discuss.elastic.co/t/error-when-installing-a-template-in-es/187210/2 "2019-06-25T06:02:10Z")

</div>

What error does it give? What does the template look like?

---

<div class="post-metadata">

### Author: ![astrodi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/astrodi/32/117732_2.png) [@astrodi](https://discuss.elastic.co/u/astrodi)
#### Post date: [June 25, 2019, 6:52am UTC](https://discuss.elastic.co/t/error-when-installing-a-template-in-es/187210/3 "2019-06-25T06:52:01Z")

</div>

I experienced, that PUT \_search/template endpoint is [not supported anymore in ES 6.5](https://www.elastic.co/guide/en/elasticsearch/reference/6.7/breaking-changes-6.0.html#_stored_search_template_apis_removed)  
instead, I'm using PUT \_scripts endpoint:

`curl -XPUT localhost:9200/_scripts/blueliv -d @template.json`

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [June 25, 2019, 6:56am UTC](https://discuss.elastic.co/t/error-when-installing-a-template-in-es/187210/4 "2019-06-25T06:56:52Z")

</div>

What type of template are you uploading?

---

<div class="post-metadata">

### Author: ![kumar4](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kumar4/32/48326_2.png) [@kumar4](https://discuss.elastic.co/u/kumar4)
#### Post date: [June 25, 2019, 9:34am UTC](https://discuss.elastic.co/t/error-when-installing-a-template-in-es/187210/5 "2019-06-25T09:34:48Z")

</div>

i am uploading the blueliv template using this tutorial:

> **[Blueliv/elk-config-examples](https://github.com/Blueliv/elk-config-examples)**
>
> Example Configuration for ELK stack with Blueliv Plugin - Blueliv/elk-config-examples

---

<div class="post-metadata">

### Author: ![astrodi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/astrodi/32/117732_2.png) [@astrodi](https://discuss.elastic.co/u/astrodi)
#### Post date: [June 25, 2019, 11:41am UTC](https://discuss.elastic.co/t/error-when-installing-a-template-in-es/187210/6 "2019-06-25T11:41:12Z")

</div>

I think, mappings contains more types (which is not allowed in ES 6.+)  
They suggest to use master branch for ES 6.3 with compatible code:

> **[Blueliv/elk-config-examples](https://github.com/Blueliv/elk-config-examples/tree/ES-6.3.0-compatible)**
>
> Example Configuration for ELK stack with Blueliv Plugin - Blueliv/elk-config-examples

---

<div class="post-metadata">

### Author: ![kumar4](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kumar4/32/48326_2.png) [@kumar4](https://discuss.elastic.co/u/kumar4)
#### Post date: [June 25, 2019, 2:32pm UTC](https://discuss.elastic.co/t/error-when-installing-a-template-in-es/187210/7 "2019-06-25T14:32:39Z")

</div>

thank you, so based on this tutorial thatr you provided i will use the command :  
curl -XPUT localhost:9200/\_scripts/blueliv -d @template.json  
Or the command  
curl -XPUT localhost:9200/\_template/blueliv -d @template.json

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 23, 2019, 2:32pm UTC](https://discuss.elastic.co/t/error-when-installing-a-template-in-es/187210/8 "2019-07-23T14:32:49Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
