# "template is missing" help please

**URL:** <https://discuss.elastic.co/t/template-is-missing-help-please/60198>\
**Category:** Elasticsearch\
**Created:** [September 9, 2016, 8:49pm UTC](https://discuss.elastic.co/t/template-is-missing-help-please/60198 "2016-09-09T20:49:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![davehatma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davehatma/32/29322_2.png) [@davehatma](https://discuss.elastic.co/u/davehatma)\
**Post date:** [September 9, 2016, 8:49pm UTC](https://discuss.elastic.co/t/template-is-missing-help-please/60198/1 "2016-09-09T20:49:25Z")

</div>

For this seemingly simple template file:  
{  
"test": {  
"template": "test",  
"order" : 1  
}  
}

When I POST to .../\_template/test i get the following error:  
{  
"error": {  
"root\_cause": [  
{  
"type": "action\_request\_validation\_exception",  
"reason": "Validation Failed: 1: template is missing;"  
}  
],  
"type": "action\_request\_validation\_exception",  
"reason": "Validation Failed: 1: template is missing;"  
},  
"status": 400  
}

Been trying to two hours and can't seem to figure out why????? If you can help... thanks.....

Here is my ES "About" stuff:

{  
"name": "Tempo",  
"cluster\_name": "elasticsearch",  
"version": {  
"number": "2.4.0",  
"build\_hash": "ce9f0c7394dee074091dd1bc4e9469251181fc55",  
"build\_timestamp": "2016-08-29T09:14:17Z",  
"build\_snapshot": false,  
"lucene\_version": "5.5.2"  
},  
"tagline": "You Know, for Search"  
}

---

<div class="post-metadata">

**Author:** ![kstaken](https://avatars.discourse-cdn.com/v4/letter/k/e68b1a/32.png) [@kstaken](https://discuss.elastic.co/u/kstaken)\
**Post date:** [September 9, 2016, 9:00pm UTC](https://discuss.elastic.co/t/template-is-missing-help-please/60198/2 "2016-09-09T21:00:17Z")

</div>

You have "test": {} around the template which I don't think is valid.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 9, 2016, 9:11pm UTC](https://discuss.elastic.co/t/template-is-missing-help-please/60198/3 "2016-09-09T21:11:37Z")

</div>

Use PUT.

See [https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-templates.html](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-templates.html)

---

<div class="post-metadata">

**Author:** ![davehatma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davehatma/32/29322_2.png) [@davehatma](https://discuss.elastic.co/u/davehatma)\
**Post date:** [September 14, 2016, 5:46pm UTC](https://discuss.elastic.co/t/template-is-missing-help-please/60198/4 "2016-09-14T17:46:46Z")

</div>

Removing "test": { did the trick. I guess I got confused with some other set of documentation, which i regularly use to do these kinds of tests.

Thanks to you both.

---

<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 5, 2017, 10:20pm UTC](https://discuss.elastic.co/t/template-is-missing-help-please/60198/5 "2017-07-05T22:20:11Z")

</div>


