Skip to main content

Health API Reference

Synentra exposes a health check endpoint that can be used for liveness and readiness probes, as well as for monitoring the overall health of the gateway and its dependencies.

The endpoint aggregates the status of various internal components and returns a summary, including the time taken to perform all checks.

Base URL

Throughout this guide the base URL is assumed to be your running server, e.g. http://localhost:7080. Replace <BASE_URL> in the examples with your actual server address.


Endpoint

GET <BASE_URL>/health

This endpoint does not require authentication and is intended for monitoring tools, orchestrators (e.g., Kubernetes), and load balancers.


Response

The response is a JSON object with two fields:

FieldTypeDescription
statusstringOverall health status. Possible values: "Healthy" or "Unhealthy".
healthCheckDurationstringTime span (format: d.HH:mm:ss.fffffff) taken to execute all health checks.
  • If all registered health checks pass, the HTTP status code is 200 OK and status is "Healthy".
  • If any check fails (or times out), the HTTP status code is 503 Service Unavailable and status is "Unhealthy".

Example

curl "http://localhost:7080/health"

Response (200 OK):

{
"status": "Healthy",
"healthCheckDuration": "00:00:00.0123456"
}

Response (503 Service Unavailable):

{
"status": "Unhealthy",
"healthCheckDuration": "00:00:00.0456789"
}

Usage in Orchestrators

Kubernetes

The /health endpoint is ideal for both liveness and readiness probes:

livenessProbe:
httpGet:
path: /health
port: 7080
initialDelaySeconds: 10
periodSeconds: 10

Docker / Compose

You can use curl or a custom health check script:

healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7080/health"]
interval: 30s
timeout: 5s
retries: 3

Was this helpful?