# Curl get command not showing data but only header info

**URL:** <https://discuss.elastic.co/t/curl-get-command-not-showing-data-but-only-header-info/23659>\
**Category:** Elasticsearch\
**Created:** [May 20, 2015, 10:24pm UTC](https://discuss.elastic.co/t/curl-get-command-not-showing-data-but-only-header-info/23659 "2015-05-20T22:24:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adurga](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@adurga](https://discuss.elastic.co/u/adurga)\
**Post date:** [May 20, 2015, 10:24pm UTC](https://discuss.elastic.co/t/curl-get-command-not-showing-data-but-only-header-info/23659/1 "2015-05-20T22:24:37Z")

</div>

Hi,

Am working on Elasticsearch server and using the curl command for posting, getting the data in Windows command line.

When I try to post the data using the curl -XPUT command the data appears getting inserted. But when I query the data back using curl-XGET I am not getting the data but only header information like Index name, \_id numberetc. Please see the queries and results below. Please let me know where am I going wrong.

curl -XPUT "/megacorp/emp/1" -d "{""first\_name"" : ""John"",""last\_name"" : ""Smith"",""age"" : "25"}"

{"\_index":"megacorp","\_type":"emp","\_id":"1","\_version":1,"created":true}

curl -XPUT "/megacorp/emp/2" -d "{""first\_name"" : ""Jane"",""last\_name"" : ""Cooper"",""age"" : "35"}"

{"\_index":"megacorp","\_type":"emp","\_id":"2","\_version":1,"created":true}

curl -XPUT "/megacorp/emp/3" -d "{""first\_name"" : ""Bradleey"",""last\_name"" : ""Cooper"",""age"" : "40"}"

{"\_index":"megacorp","\_type":"emp","\_id":"3","\_version":1,"created":true}

curl -XGET "/megacorp/emp/\_search?q=last\_name:Cooper"

{"took":1,"timed\_out":false,"\_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":2,"max\_score":1.0,"hits":[{"\_index":"megacorp","\_type":"emp","\_id":"2","\_score":1.0},{"\_index":"me  
gacorp","\_type":"emp","\_id":"3","\_score":1.0}]}}

---

<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 6, 2017, 12:12am UTC](https://discuss.elastic.co/t/curl-get-command-not-showing-data-but-only-header-info/23659/2 "2017-07-06T00:12:53Z")

</div>


