Endpoints

Status worker HTTP reference: heartbeat, component health snapshots, and the diagnostics route.

Endpoints

All endpoints are IP-allowlisted (loopback + Docker subnets) and need no token. Responses are JSON; a request from outside the allowlist gets 403 { "ok": false, "error": "Forbidden" }, and a malformed JSON body gets a JSON 400 rather than an HTML error page.

Heartbeat

POSThttp://127.0.0.1:3030/heartbeat/:componentIdPublic
Check in with a component's current status.
Body
status
stringrequired
One of operational, degraded, partial, outage, maintenance.
curl
curl -X POST http://127.0.0.1:3030/heartbeat/lunar-api \
  -H 'Content-Type: application/json' \
  -d '{"status":"operational"}'

Returns { "ok": true, "componentId": "...", "status": "..." }. Side effects: registers the component if unseen, resolves any open incident for it, and pushes the status to hep.gg only when it changed. A hep.gg push failure is logged but never fails the heartbeat — the next beat retries.

Health snapshots

GEThttp://127.0.0.1:3030/healthPublic
State of every known component.
GEThttp://127.0.0.1:3030/health/:componentIdPublic
State of one component (404 if unknown).

Each snapshot contains lastHeartbeatAt, secondsSinceLastHeartbeat, lastReportedStatus, publishedStatus (what hep.gg last accepted, null = unknown), and activeIncidentId.

Diagnostics

GEThttp://127.0.0.1:3030/diagPublic
Resolved config plus a live hep.gg round-trip.

Returns the resolved config (HEP_BASE, a token preview, the timing constants) and the raw response of a live GET /status-api/status call — the quickest way to confirm the token and base URL are right.