The Cat API
The Elasticsearch Admin API is quite extensive and covers almost every part of Elasticsearch architecture: from low-level information about Lucene to high-level ones about the cluster nodes and their health. All this information is available using the Elasticsearch Java API as well as the REST API. However, the returned data, even though it is a JSON document, is not very readable by a user, at least when it comes to the amount of information given.
Because of this, Elasticsearch provides us with a more human-friendly API – the Cat API. The special Cat API returns data in a simple text, tabular format and what's more – it provides aggregated data that is usually usable without any further processing.
The basics
The base endpoint for the Cat API is quite obvious: it is /_cat
. Without any parameters, it shows all the available endpoints for this API. We can check this by running the following command:
curl -XGET 'localhost:9200/_cat'
The response returned by Elasticsearch should be...