Skip to content

Health API

The Health API provides unauthenticated endpoints for monitoring server status and bundle health. Use these endpoints 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

Get detailed health information for each installed bundle, including uptime and restart count. Use this endpoint when you need more detail than GET /v1/health provides.

Response:

[
{
"name": "bash",
"state": "running",
"uptime": 3600,
"restartCount": 0
},
{
"name": "weather",
"state": "running",
"uptime": 3580,
"restartCount": 0
},
{
"name": "postgres",
"state": "crashed",
"uptime": 0,
"restartCount": 3
}
]

Each entry:

FieldTypeDescription
namestringShort server name
statestringLifecycle state: starting, running, crashed, dead, stopped
uptimenumberSeconds since the bundle last started (0 if not running)
restartCountnumberNumber of times the bundle has been restarted due to crashes

Example:

Terminal window
curl http://localhost:27247/v1/bundles/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/bundles/health to track bundle stability over time. A high restartCount or persistent crashed/dead states indicate bundles that need attention.