# Best way to parse response from /\_nodes/stats API using java

**URL:** <https://discuss.elastic.co/t/best-way-to-parse-response-from-nodes-stats-api-using-java/279356>\
**Category:** Elasticsearch\
**Created:** [July 22, 2021, 8:23am UTC](https://discuss.elastic.co/t/best-way-to-parse-response-from-nodes-stats-api-using-java/279356 "2021-07-22T08:23:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Praveen\_Atluri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/praveen_atluri/32/39721_2.png) [@Praveen\_Atluri](https://discuss.elastic.co/u/Praveen_Atluri)\
**Post date:** [July 22, 2021, 8:23am UTC](https://discuss.elastic.co/t/best-way-to-parse-response-from-nodes-stats-api-using-java/279356/1 "2021-07-22T08:23:08Z")

</div>

I am trying to write a java program which frequently calls the /\_nodes/stats endpoint and other metrics endpoints and plot them. What is the best way to parse the output from above endpoints and extract specific data from them?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [July 22, 2021, 2:53pm UTC](https://discuss.elastic.co/t/best-way-to-parse-response-from-nodes-stats-api-using-java/279356/2 "2021-07-22T14:53:00Z")

</div>

Not sure about the question or a question within the question? What is stopping you from parsing the JSON response? Apart from that maybe the rest high level client makes it easier for your to not parse everything yourself.

---

<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:** [August 19, 2021, 2:53pm UTC](https://discuss.elastic.co/t/best-way-to-parse-response-from-nodes-stats-api-using-java/279356/3 "2021-08-19T14:53:19Z")

</div>

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