It's not a great error message, but the problem is that you need to do GET /_cluster/health?level=indices and you are doing GET /_cluster/health%3Flevel=indices which are not the same thing at all. The ?level=indices bit isn't part of the path, it goes in the params field instead. See https://www.elastic.co/guide/en/elasticsearch/reference/current/input-http.html#_calling_elasticsearch_apis for more details.