# How to read data saved in Elasticsearch Domain to my application

**URL:** <https://discuss.elastic.co/t/how-to-read-data-saved-in-elasticsearch-domain-to-my-application/73157>\
**Category:** Elasticsearch\
**Created:** [January 30, 2017, 6:36am UTC](https://discuss.elastic.co/t/how-to-read-data-saved-in-elasticsearch-domain-to-my-application/73157 "2017-01-30T06:36:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![srikanth](https://avatars.discourse-cdn.com/v4/letter/s/f9ae1b/32.png) [@srikanth](https://discuss.elastic.co/u/srikanth)\
**Post date:** [January 30, 2017, 6:36am UTC](https://discuss.elastic.co/t/how-to-read-data-saved-in-elasticsearch-domain-to-my-application/73157/1 "2017-01-30T06:36:27Z")

</div>

i have created a ElasticSearch Domain in Amazon Webservices and i sent and stored data to elasticsearch domain using MQTT Client and analyzed this data using Kibana visualizing tool .Now i want that stored data into my application ,How can i get that data into my application? can anyone suggest me?

i followed the steps given in the bellow link:

[https://aws.amazon.com/blogs/mobile/analyze-device-generated-data-with-aws-iot-and-amazon-elasticsearch-service/](https://aws.amazon.com/blogs/mobile/analyze-device-generated-data-with-aws-iot-and-amazon-elasticsearch-service/)

---

<div class="post-metadata">

**Author:** ![JKhondhu](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@JKhondhu](https://discuss.elastic.co/u/JKhondhu)\
**Post date:** [January 30, 2017, 9:41am UTC](https://discuss.elastic.co/t/how-to-read-data-saved-in-elasticsearch-domain-to-my-application/73157/2 "2017-01-30T09:41:06Z")

</div>

Have you thought about using the native or community driven clients to query your data?  
[https://www.elastic.co/guide/en/elasticsearch/client/index.html](https://www.elastic.co/guide/en/elasticsearch/client/index.html)

---

<div class="post-metadata">

**Author:** ![srikanth](https://avatars.discourse-cdn.com/v4/letter/s/f9ae1b/32.png) [@srikanth](https://discuss.elastic.co/u/srikanth)\
**Post date:** [February 1, 2017, 12:17pm UTC](https://discuss.elastic.co/t/how-to-read-data-saved-in-elasticsearch-domain-to-my-application/73157/3 "2017-02-01T12:17:58Z")

</div>

Hi Jymit Singh,

```
 Thank you for responding, Yes i am using java REST client library to access it. I am using amazon managed (AWS) Elasticsearch. My dought is what i have to use in place of "localhost" in the bellow piece of code. 

```

RestClient restClient = RestClient.builder(  
new HttpHost("localhost", 9200, "http"),  
new HttpHost("localhost", 9201, "http")).build();

---

<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:** [March 1, 2017, 12:18pm UTC](https://discuss.elastic.co/t/how-to-read-data-saved-in-elasticsearch-domain-to-my-application/73157/4 "2017-03-01T12:18:05Z")

</div>

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