Elasticsearch GET API for Shard Size
Animesh was right, the _stats
API is the one that you want, but to get shard level stats, you must specify the level
parameter:
curl -XGET host:9200/my-index/_stats?level=shards
The level
can currently be set to any of:
- shards
- index (default)
- node
Another way to get shards size is by the request:
curl -XGET localhost:9200/_cat/shards?v=true&format=JSON&bytes=b (mb, gb and etc.)
This is more convenient and better way to get information about shards, specially about size.
Elastic documentation: elastic doc