Skip to main content

Health

The API has four health endpoints. Each is a GET that needs no API key, so a prober can check whether the API is up and which subsystem is degraded.

Endpoints​

EndpointStatus behaviorWhat it checks
GET /health200 while the process serves traffic, even when status is degradedThe API is reachable and its stores are configured. No downstream call.
GET /health/telemetry200 healthy, 503 degradedThe telemetry store is configured and answers a ping.
GET /health/topology200 healthy, 503 degradedSame checks as /health/telemetry; topology reads from the telemetry store.
GET /health/predictions200 healthy, 503 degradedThe prediction store and resolver are configured and the telemetry store answers a ping.

Downstream pings time out after 1.5 seconds. A passing ping is cached for 15 seconds and a failing one for 5 seconds. A successful probe does not verify a particular account's data or prove a forecast can be produced.

Response shape​

{
"status": "ok",
"checks": {
"telemetry_store_wired": { "ok": true },
"telemetry_store_ping": { "ok": true }
}
}
FieldDescription
statusok or degraded.
checksNamed dependency checks, each with ok, and detail only when the check has something to report.

When present, detail is a short token such as timeout, connection_error, upstream_error or ping_returned_false, not free-form text. Root GET /health reports resolver, data_plane, telemetry_store, and prediction_store. The subsystem endpoints report their own checks, such as telemetry_store_wired and telemetry_store_ping above.

/health/predictions reports prediction_store_wired, telemetry_store_wired, resolver_wired and telemetry_store_ping. Any of them failing returns 503.

Treat a response as healthy only when the HTTP status is 200 and status is ok. For /health, which always returns 200, check status. A 200 whose body is not this JSON shape may mean something other than the Constellation API answered, such as a proxy or captive portal.

Example​

curl -sS https://api.constellation.space/health
curl -sS -o /dev/null -w "%{http_code}\n" https://api.constellation.space/health/predictions

Monitoring usage​

  • Uptime probes: hit /health and alert on a non-200, a timeout, or status: degraded.
  • Subsystem dashboards: probe the subsystem endpoints and page on a sustained 503. /health/topology runs the same checks as /health/telemetry, so only /health/predictions adds a separate signal.
  • Rate budget: health endpoints are exempt from rate limits and need no key, so probes cannot trigger lockout.

Check key validity​

Health checks do not verify your API key. Confirm authenticated access with a topology read:

curl -sS \
-H "x-api-key: $CONSTELLATION_API_KEY" \
"https://api.constellation.space/topology?freshness_seconds=900"
OutcomeMeaning
200Authenticated read succeeded. Check sample times before treating records as evidence of ingestion.
401 auth_failedThe key is wrong or not provisioned in this environment. Alert; do not retry, because repeated failures cause lockout.
403 insufficient_scopeThe key lacks topology:read. See Authentication.
503The data plane or telemetry store is unavailable. Honor the retry delay.

Run authenticated checks less often than health checks: they consume request budget, and a rejected credential can trigger lockout. Use the connection smoke test and follow the retry guidance.