Get the cluster status
GET
/v2/status
HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("http://localhost:8080/v2/status")) .method("GET", HttpRequest.BodyPublishers.noBody()) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());const url = 'http://localhost:8080/v2/status';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:8080/v2/statusA public health check: 204 when this node is ready to serve (as
/readyz reports it), 503 when it is not. It needs no credential
and answers no body.
Responses
Section titled “ Responses ”The node is ready.
The node is not ready.