Skip to content

Health API

The Health API provides an unauthenticated endpoint for monitoring server status and bundle health. Use this endpoint in load balancer health checks, monitoring dashboards, and alerting systems.

Check overall server health and get a summary of bundle states.

Response:

{
"status": "ok",
"uptime": 3600,
"bundles": [
{ "name": "bash", "state": "running" },
{ "name": "weather", "state": "running" },
{ "name": "postgres", "state": "crashed" }
]
}
FieldTypeDescription
statusstringAlways "ok" if the server is responding
uptimenumberServer uptime in seconds
bundlesarraySummary of each bundle’s name and state

Each bundle entry:

FieldTypeDescription
namestringShort server name
statestringLifecycle state: starting, running, crashed, dead, stopped

Example:

Terminal window
curl http://localhost:27247/v1/health

Use GET /v1/health as a lightweight liveness probe:

Terminal window
# Returns 200 if the server is running
curl -f http://localhost:27247/v1/health

Configure liveness and readiness probes:

livenessProbe:
httpGet:
path: /v1/health
port: 27247
initialDelaySeconds: 5
periodSeconds: 30
readinessProbe:
httpGet:
path: /v1/health
port: 27247
initialDelaySeconds: 3
periodSeconds: 10

Poll GET /v1/health to track bundle stability over time. Persistent crashed or dead states in the bundles array indicate bundles that need attention. For detailed bundle inspection, use the nb__status tool with scope: "bundles".