# How can I insert JSON data directly elastic search using curl command?

**URL:** <https://discuss.elastic.co/t/how-can-i-insert-json-data-directly-elastic-search-using-curl-command/90400>\
**Category:** Elasticsearch\
**Created:** [June 22, 2017, 7:20am UTC](https://discuss.elastic.co/t/how-can-i-insert-json-data-directly-elastic-search-using-curl-command/90400 "2017-06-22T07:20:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![patil-akshay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/patil-akshay/32/15295_2.png) [@patil-akshay](https://discuss.elastic.co/u/patil-akshay)\
**Post date:** [June 22, 2017, 7:20am UTC](https://discuss.elastic.co/t/how-can-i-insert-json-data-directly-elastic-search-using-curl-command/90400/1 "2017-06-22T07:20:50Z")

</div>

I want to insert JSON data into elastic search directly using curl command data I am getting from one of the web service

---

<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:** [June 22, 2017, 10:30pm UTC](https://discuss.elastic.co/t/how-can-i-insert-json-data-directly-elastic-search-using-curl-command/90400/2 "2017-06-22T22:30:37Z")

</div>

```auto
curl -XPOST http://localhost:9200/index/doc -d 'YOUR JSON HERE`

```

---

<div class="post-metadata">

**Author:** ![patil-akshay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/patil-akshay/32/15295_2.png) [@patil-akshay](https://discuss.elastic.co/u/patil-akshay)\
**Post date:** [June 23, 2017, 5:19am UTC](https://discuss.elastic.co/t/how-can-i-insert-json-data-directly-elastic-search-using-curl-command/90400/3 "2017-06-23T05:19:25Z")

</div>

I tried that data is loading properly but it's not visible in Discover tab of kibana, I think there is issue with timestamp do you know how to specify the time stamp

---

<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:** [June 23, 2017, 6:57am UTC](https://discuss.elastic.co/t/how-can-i-insert-json-data-directly-elastic-search-using-curl-command/90400/4 "2017-06-23T06:57:46Z")

</div>

How can I tell? I have no idea of what you sent, what the mapping is, how you configured your index pattern in Kibana...

You should provide more details.

---

<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 21, 2017, 6:57am UTC](https://discuss.elastic.co/t/how-can-i-insert-json-data-directly-elastic-search-using-curl-command/90400/5 "2017-07-21T06:57:53Z")

</div>

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