Skip to main content
GET
/
healthz
/
ready
Readiness check
curl --request GET \
  --url http://localhost:9002/healthz/ready
import requests

url = "http://localhost:9002/healthz/ready"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('http://localhost:9002/healthz/ready', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_PORT => "9002",
CURLOPT_URL => "http://localhost:9002/healthz/ready",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "http://localhost:9002/healthz/ready"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("http://localhost:9002/healthz/ready")
.asString();
require 'uri'
require 'net/http'

url = URI("http://localhost:9002/healthz/ready")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "status": "ready",
  "service": "authn-svc",
  "version": "1.0.0",
  "timestamp": "2024-01-15T10:30:00Z",
  "checks": {
    "database": {
      "status": "healthy",
      "latency": "2.5ms"
    },
    "accounts_service": {
      "status": "healthy",
      "latency": "1.2ms"
    },
    "notification_service": {
      "status": "healthy",
      "latency": "0.8ms"
    }
  }
}
{
"status": "not_ready",
"service": "authn-svc",
"version": "1.0.0",
"timestamp": "2024-01-15T10:30:00Z",
"checks": {
"database": {
"status": "unhealthy",
"latency": "5000ms",
"error": "database connection failed"
}
}
}

Response

Service is ready to handle traffic

Response from the readiness probe endpoint

status
enum<string>

Current readiness status

Available options:
ready,
not_ready
service
string
Example:

"authn-svc"

version
string
Example:

"1.0.0"

timestamp
string<date-time>

UTC timestamp of the check

checks
object

Individual health check results