# I can't upload the sample accounts.json file

**URL:** <https://discuss.elastic.co/t/i-cant-upload-the-sample-accounts-json-file/109866>\
**Category:** Elasticsearch\
**Created:** [December 1, 2017, 2:33am UTC](https://discuss.elastic.co/t/i-cant-upload-the-sample-accounts-json-file/109866 "2017-12-01T02:33:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Gonzalez1](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@Daniel\_Gonzalez1](https://discuss.elastic.co/u/Daniel_Gonzalez1)\
**Post date:** [December 1, 2017, 2:33am UTC](https://discuss.elastic.co/t/i-cant-upload-the-sample-accounts-json-file/109866/1 "2017-12-01T02:33:06Z")

</div>

Hello I'm new in Elastic.

I'm using Elastic from a Mac. I want to upload de account.json file to elasticsearch with the following command as the documentation says.

\_curl -H "Content-Type: application/json" -XPOST 'localhost:9200/bank/account/_bulk?pretty&refresh' --data-binary "@accounts.json"_

**But I get the following message**

Warning: Couldn't read data from file "accounts.json", this makes an empty  
Warning: POST.  
{  
"error" : {  
"root\_cause" : [  
{  
"type" : "parse\_exception",  
"reason" : "request body is required"  
}  
],  
"type" : "parse\_exception",  
"reason" : "request body is required"  
},  
"status" : 400  
}

What I'm doing wrong?

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [December 1, 2017, 3:06am UTC](https://discuss.elastic.co/t/i-cant-upload-the-sample-accounts-json-file/109866/2 "2017-12-01T03:06:55Z")

</div>

> [@Daniel\_Gonzalez1](#):
>
> Warning: Couldn't read data from file "accounts.json", this makes an empty  
> Warning: POST.

This warning is coming from the curl command - it cannot read the "accounts.json" file.  
That probably means that are running curl from a different directory to the one that has the file.

---

<div class="post-metadata">

**Author:** ![Daniel\_Gonzalez1](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@Daniel\_Gonzalez1](https://discuss.elastic.co/u/Daniel_Gonzalez1)\
**Post date:** [December 1, 2017, 5:39am UTC](https://discuss.elastic.co/t/i-cant-upload-the-sample-accounts-json-file/109866/3 "2017-12-01T05:39:47Z")

</div>

Hello Tim!

Thanks for your reply! Exactly that was the problem.

Thanks so much!

Regards!!

---

<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:** [December 29, 2017, 5:39am UTC](https://discuss.elastic.co/t/i-cant-upload-the-sample-accounts-json-file/109866/4 "2017-12-29T05:39:51Z")

</div>

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