Getting local node id from cluster state

I'm working on a backup procedure where I would like to build the path to
index files.

So, for the /0/ in these paths:

.../data/elasticsearch/nodes/0/_state
.../data/elasticsearch/nodes/0/indices

Is it possible to get that information from a ClusterStateResponse?

  • James

--