# How can i get only index name from response

**URL:** <https://discuss.elastic.co/t/how-can-i-get-only-index-name-from-response/146280>\
**Category:** Elasticsearch\
**Created:** [August 28, 2018, 7:19am UTC](https://discuss.elastic.co/t/how-can-i-get-only-index-name-from-response/146280 "2018-08-28T07:19:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BleedCode](https://avatars.discourse-cdn.com/v4/letter/b/a87d85/32.png) [@BleedCode](https://discuss.elastic.co/u/BleedCode)\
**Post date:** [August 28, 2018, 7:19am UTC](https://discuss.elastic.co/t/how-can-i-get-only-index-name-from-response/146280/1 "2018-08-28T07:19:06Z")

</div>

How can i get only index name from response generated by calling \_cat/indices using java. Using EntityUtils i am getting the response as string which gives me information in the way how it looks when called using CURL command. i am using rest low level client for fetching the response.

> String responseBody = EntityUtils.toString(response.getEntity());

How should i process the responseBody to get only index name ????

---

<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:** [September 25, 2018, 7:19am UTC](https://discuss.elastic.co/t/how-can-i-get-only-index-name-from-response/146280/3 "2018-09-25T07:19:44Z")

</div>

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