Shards and Index states through Java Client

Hi,

I am looking a way to get Shards and Index states through Java Client 7.17

The states getting from:
GET _cat/indices/?v
GET _cat/shards/?v

Is it possible though HighLevelRestAPI?

You can not with the HighLevelRestAPI but anyway you should switch to the new Java Client as the High Level one is deprecated in 7.17 and removed in 8.x.

With the new Java Client you can easily do that:

If you don't want to move to the new client, you will need to use the low level client instead and call manually the endpoint and interpret the response.
Or run get Indices API instead.

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