Shutdown Elastic through API

Hi Team,

We have Elastic cluster running(self-managed) . We wanted to shutdown or restart the service without going to server. I followed this documentation node-lifecycle but it didn't work for me.

This is not supported natively, you would need to build something to automate that for you.

As mentioned in the documentation:

This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.

So, I would assume that calling this API directly is not supported.

Also, it would not do what you want:

This API does NOT terminate the Elasticsearch process. Monitor the node shutdown status to determine when it is safe to stop Elasticsearch.