Skip to content

Reference

Health Check

Is the service up, and did each environment come up with it? No key required.

GET /healthz

Liveness only. It does not touch the database and does not call any distributor, so it stays fast and cheap enough to poll from a monitor. Note the path: it sits at the root, not under /api/v1.

Request
curl https://api.gatewaystream.com/healthz

Response

status
string optional
Always "ok" when the server answers at all.
service
string optional
The service name.
time
string (ISO 8601) optional
Server time when the check ran.
modes.sandbox
string optional
ready, not_configured or failed — see below.
modes.live
string optional
The same, for the live environment.

Mode States

  • ready — that environment came up and keys for it will work.
  • not_configured — this deployment has no configuration for it. Keys pointing there get 503 mode_unavailable. Normal on a sandbox-only deployment.
  • failed — it was configured but did not initialise. Keys pointing there will also get 503. This one is worth alerting on.

Status Codes

200
The service is up. Read modes to see whether the environment you care about is usable.

Anything other than a 200 — including no response at all — means the service is not serving, and there is no JSON body to read.

Monitoring

A sensible monitor polls this endpoint every thirty seconds or so and alerts on a non-200, or on the environment you depend on reading anything other than ready. Because it takes no key and touches nothing, polling it is cheap and it is exempt from the usual rate limit.

A one-line check
# Alert if sandbox is anything but ready
curl -s https://api.gatewaystream.com/healthz | jq -e '.modes.sandbox == "ready"'