# How to query logstash elasticsearch API to get all data (Im only seeing data fields, not the actual data)

**URL:** <https://discuss.elastic.co/t/how-to-query-logstash-elasticsearch-api-to-get-all-data-im-only-seeing-data-fields-not-the-actual-data/89080>\
**Category:** Elasticsearch\
**Created:** [June 12, 2017, 4:49pm UTC](https://discuss.elastic.co/t/how-to-query-logstash-elasticsearch-api-to-get-all-data-im-only-seeing-data-fields-not-the-actual-data/89080 "2017-06-12T16:49:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Garrett\_Huff](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/garrett_huff/32/18083_2.png) [@Garrett\_Huff](https://discuss.elastic.co/u/Garrett_Huff)\
**Post date:** [June 12, 2017, 4:49pm UTC](https://discuss.elastic.co/t/how-to-query-logstash-elasticsearch-api-to-get-all-data-im-only-seeing-data-fields-not-the-actual-data/89080/1 "2017-06-12T16:49:54Z")

</div>

Hello, im trying to query the elasticsearch index that contains all of my logstash data ([http://localhost:9200/logstash-\*](http://localhost:9200/logstash-*)) but for some reason im not receiving the actual data documents, only the data field names and type. For an example, if i had a data field named "host", when i query the URL above i get back a field "host": {"type": "text", "norms": false, "fields": { "keyword": { "type": "keyword" }}},

Im sure that Im just specifying the wrong URL or something. Can someone tell me how I can query a rest api to return all of my logstash documents?

Thanks

---

<div class="post-metadata">

**Author:** ![lwintergerst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lwintergerst/32/18164_2.png) [@lwintergerst](https://discuss.elastic.co/u/lwintergerst)\
**Post date:** [June 13, 2017, 6:47pm UTC](https://discuss.elastic.co/t/how-to-query-logstash-elasticsearch-api-to-get-all-data-im-only-seeing-data-fields-not-the-actual-data/89080/2 "2017-06-13T18:47:35Z")

</div>

Hello Garrett,  
try using this:  
`http://localhost:9200/logstash-*/_search`

By default you will get 10 documents. If you need more give the size parameter a try:  
`/_search?size=20`

Try not to make the size too large (\>10.000)  
We talk about the reasons in this chapter of the definitive guide.  
[https://www.elastic.co/guide/en/elasticsearch/guide/current/pagination.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/pagination.html)  
Please note that the book is based on 2.x but the same principles still apply.

Let me know if that helps 🙂

Luca

---

<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 11, 2017, 6:47pm UTC](https://discuss.elastic.co/t/how-to-query-logstash-elasticsearch-api-to-get-all-data-im-only-seeing-data-fields-not-the-actual-data/89080/3 "2017-07-11T18:47:45Z")

</div>

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