# Not performing POST when running command twice

**URL:** <https://discuss.elastic.co/t/not-performing-post-when-running-command-twice/248454>\
**Category:** Elasticsearch\
**Created:** [September 13, 2020, 7:17pm UTC](https://discuss.elastic.co/t/not-performing-post-when-running-command-twice/248454 "2020-09-13T19:17:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gdiaz](https://avatars.discourse-cdn.com/v4/letter/g/74df32/32.png) [@gdiaz](https://discuss.elastic.co/u/gdiaz)\
**Post date:** [September 13, 2020, 7:17pm UTC](https://discuss.elastic.co/t/not-performing-post-when-running-command-twice/248454/1 "2020-09-13T19:17:21Z")

</div>

Hi all,

I'm running es with the following command  
`docker run -d -p 9200:9200 -p 9300:9300 --name=elasticsearch -e "discovery.type=single-node" -v elasticsearch-data:/usr/share/elasticsearch/data docker.elastic.co/elasticsearch/elasticsearch:7.8.0 elasticsearch`

I'm reading some files from an sftp server, looping through then, extracting the data I need, creating an object, and finally doing a REST POST call to elastic to insert the document. Right now I'm testing connections and the flow of my code and seems to be working as far as connection between services.

I found interesting that I have a postman collection to call my Node endpoint and ran it three or four times one the fist run gets inserted. I thought I was able to run a POST request against elastic with the same data many times and it will insert a new document every time

Any clarification on this?

Thanks

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 13, 2020, 10:28pm UTC](https://discuss.elastic.co/t/not-performing-post-when-running-command-twice/248454/2 "2020-09-13T22:28:00Z")

</div>

Hi @gdiaz

Perhaps you could share your  
POST commands.

Have you tried the same POST commands from Kibana Dev Tools?

---

<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:** [October 11, 2020, 10:28pm UTC](https://discuss.elastic.co/t/not-performing-post-when-running-command-twice/248454/3 "2020-10-11T22:28:03Z")

</div>

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