# How can I get the status of a Index in elasticsearch in java

**URL:** https://discuss.elastic.co/t/how-can-i-get-the-status-of-a-index-in-elasticsearch-in-java/224248
**Category:** Elasticsearch
**Created:** [March 19, 2020, 10:18am UTC](https://discuss.elastic.co/t/how-can-i-get-the-status-of-a-index-in-elasticsearch-in-java/224248 "2020-03-19T10:18:25Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![daniel-0930](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel-0930/32/64731_2.png) [@daniel-0930](https://discuss.elastic.co/u/daniel-0930)
#### Post date: [March 19, 2020, 10:18am UTC](https://discuss.elastic.co/t/how-can-i-get-the-status-of-a-index-in-elasticsearch-in-java/224248/1 "2020-03-19T10:18:25Z")

</div>

I try to find a Java api, of cause the High-level one, to get the status of a index. It can be done in kibana console with single GET /index/\_stats. However, it is so hard to find one single relevent api in High-level java api to accomplesh this task. Is there any one trying to seek help like this?

---

<div class="post-metadata">

### Author: ![Opster\_Community1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/opster_community1/32/59062_2.png) [@Opster\_Community1](https://discuss.elastic.co/u/Opster_Community1)
#### Post date: [March 19, 2020, 10:42am UTC](https://discuss.elastic.co/t/how-can-i-get-the-status-of-a-index-in-elasticsearch-in-java/224248/2 "2020-03-19T10:42:09Z")

</div>

There is no direct api available for the same but you can always use low level client object to make an API request.

```auto
Response response = highlevelRestClient.getLowLevelClient()
        .performRequest(new Request("GET", "/index/_stats"));

```

Using above you proceed with extracting relevant information from `response` object. I would highly discourage using the above method for api which have direct implementation available in high level rest client.

---

<div class="post-metadata">

### Author: ![daniel-0930](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel-0930/32/64731_2.png) [@daniel-0930](https://discuss.elastic.co/u/daniel-0930)
#### Post date: [March 20, 2020, 1:37am UTC](https://discuss.elastic.co/t/how-can-i-get-the-status-of-a-index-in-elasticsearch-in-java/224248/3 "2020-03-20T01:37:38Z")

</div>

Thanks a lot for your help.  
By the way, do you have any idea why they didn't put this function into high level rest client?

---

<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: [April 17, 2020, 1:37am UTC](https://discuss.elastic.co/t/how-can-i-get-the-status-of-a-index-in-elasticsearch-in-java/224248/4 "2020-04-17T01:37:40Z")

</div>

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