Health
Health check endpoints for monitoring and load balancers.
Health Check
Simple health check endpoint.
Endpoint
GET /healthExample Request
curl http://localhost:3100/healthSuccess Response
{
"status": "ok",
"timestamp": "2025-01-01T12:00:00.000Z",
"sessionId": "session-1769666229097-mj79858"
}Response Fields
status- Always"ok"if the server is runningtimestamp- Current server time (ISO format)sessionId- Server session ID (changes on restart)
API Health Check
Same as /health, but under /api prefix.
Endpoint
GET /api/healthExample Request
curl http://localhost:3100/api/healthSuccess Response
Same as /health:
{
"status": "ok",
"timestamp": "2025-01-01T12:00:00.000Z",
"sessionId": "session-1769666229097-mj79858"
}Use Cases
- Load balancers - Health checks for routing
- Monitoring - Uptime monitoring
- Container orchestration - Kubernetes/Docker health checks
- Quick status - Verify server is running
Session ID
The sessionId changes on each server restart. Use it to detect restarts:
- Store the session ID
- On next health check, compare
- If different, server restarted
Next Steps
- See Events API for real-time updates
- Check Deployment Guide for production health checks