# Error when installing template "request body is required"

**URL:** <https://discuss.elastic.co/t/error-when-installing-template-request-body-is-required/115607>\
**Category:** Elasticsearch\
**Created:** [January 15, 2018, 10:17pm UTC](https://discuss.elastic.co/t/error-when-installing-template-request-body-is-required/115607 "2018-01-15T22:17:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sylvain-69](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylvain-69/32/26561_2.png) [@Sylvain-69](https://discuss.elastic.co/u/Sylvain-69)\
**Post date:** [January 15, 2018, 10:17pm UTC](https://discuss.elastic.co/t/error-when-installing-template-request-body-is-required/115607/1 "2018-01-15T22:17:39Z")

</div>

Hello,

Here is the error I get when I try to install Winlogbeat template into Elasticsearch :

curl -XPUT -H 'Content-Type: application/json' [http://localhost:9200/\_template/winlogbeat-6.1.0](http://localhost:9200/_template/winlogbeat-6.1.0) -d@winlogbeat.template-6.1.0.json  
Warning: Couldn't read data from file "winlogbeat.template-6.1.0.json", this  
Warning: makes an empty POST.  
{"error":{"root\_cause":[{"type":"parse\_exception","reason":"request body is required"}],"type":"parse\_exception","reason":"request body is required"},"status":400}

Can you help me please ?

---

<div class="post-metadata">

**Author:** ![Sylvain-69](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylvain-69/32/26561_2.png) [@Sylvain-69](https://discuss.elastic.co/u/Sylvain-69)\
**Post date:** [January 15, 2018, 10:20pm UTC](https://discuss.elastic.co/t/error-when-installing-template-request-body-is-required/115607/2 "2018-01-15T22:20:29Z")

</div>

One more information, I exported the template from the powershell command

PS\> .\winlogbeat.exe export template --es.version 6.1.0 | Out-File -Encoding UTF8 winlogbeat.template-6.1.0.json

---

<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:** [January 16, 2018, 4:22am UTC](https://discuss.elastic.co/t/error-when-installing-template-request-body-is-required/115607/3 "2018-01-16T04:22:59Z")

</div>

That's a curl / windows issue.  
Not related to elasticsearch.

Use the Kibana dev console. Much easier.

Or check curl help for windows.  
Or check that your file actually exists and is readable and it's content.

---

<div class="post-metadata">

**Author:** ![Sylvain-69](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylvain-69/32/26561_2.png) [@Sylvain-69](https://discuss.elastic.co/u/Sylvain-69)\
**Post date:** [January 16, 2018, 5:47am UTC](https://discuss.elastic.co/t/error-when-installing-template-request-body-is-required/115607/4 "2018-01-16T05:47:38Z")

</div>

Hello dadoonet,

Actualy my ELK stack is installed on Centos 7 and I use the command curl on it.

But I will defenitly start using the kibana dev console !  
Thank You.

I just started using ELK, I'm not use to it yet !

---

<div class="post-metadata">

**Author:** ![Sylvain-69](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylvain-69/32/26561_2.png) [@Sylvain-69](https://discuss.elastic.co/u/Sylvain-69)\
**Post date:** [January 16, 2018, 5:53am UTC](https://discuss.elastic.co/t/error-when-installing-template-request-body-is-required/115607/5 "2018-01-16T05:53:11Z")

</div>

And also, I wasn't in the right directory when executing the curl command, so the file was not here...

So sorry about that !

Thank you.

---

<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:** [February 13, 2018, 5:53am UTC](https://discuss.elastic.co/t/error-when-installing-template-request-body-is-required/115607/6 "2018-02-13T05:53:37Z")

</div>

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