Health / Status API
Two open endpoints for monitors and dashboards: a single-purpose health probe and a structured per-component status snapshot.
Both endpoints are open (no API key required) and safe to hit from any
host (no rate-limit attribution). GET /api/verify does no work, so it needs
no cache. GET /api/status keeps its snapshot for 30 s in-process and marks
the response cacheable for 15 s, so a flood of probes rarely reaches the
underlying checks.
GET /api/verify: minimal health
Use when all you need is "is links.et alive". Always returns 200 with a tiny JSON body.
Don't use this to check whether an upstream (telebirr, CBE, …) is healthy;
this endpoint only reports on links.et itself.
GET /api/status: structured per-component status
Use when you want to know which upstream is degraded or what response times look like right now.
Response
| HTTP | When |
|---|---|
200 | links.et is serving. A single bank may still be down: read status and components. |
503 | links.et itself is down: Postgres is, or no bank answers at all. |
Field reference
| Field | Type | Notes |
|---|---|---|
ok | boolean | false only when links.et itself is down (the 503 case). |
status | enum | operational | slow | down; worst across all components |
checkedAt | ISO timestamp | When the underlying probe round was last taken |
cached | boolean | true if the snapshot came from the in-process 30 s cache |
components[].name | string | Human label (e.g. "Telebirr — transactioninfo.ethiotelecom.et") |
components[].host | string | Upstream host or internal address |
components[].group | enum | internal (the links.et service itself) or upstream |
components[].status | enum | Per-component operational / slow / down |
components[].responseMs | number | null | Probe round-trip time |
components[].httpStatus | number | null | HTTP status the upstream returned (or null for non-HTTP probes like Postgres) |
components[].error | string | null | Network or timeout error message when the probe failed |
Classification rules
down: probe failed or upstream returned HTTP>= 500slow: probe succeeded but took longer than the per-component slow threshold (3 s for most banks, 1.5 s for Bank of Abyssinia, 6 s for Zemen)operational: probe succeeded under threshold
The human-readable /status page uses the same rules on a different
reading: it shows the stored probe round from the last few minutes, where a
probe may take 20 s. This endpoint probes live and gives each bank 8 s. So a
bank that answers in 8 to 20 s is down here and slow on the page.
A component marked down here does not stop /api/verify from asking
that bank. Verifications always go to the bank, because some banks drop a
share of requests and answer the rest, so one failed probe says little about
the next request. telebirr is the usual case.
HEAD /api/status: uptime-monitor friendly
Same status code semantics as GET /api/status, no body. Cheapest possible
probe; recommended for monitors that only need to react to 200 vs 503.
Polling cadence
The in-process snapshot is taken again when a request finds it older than
30 s, and the GET response is cache-controlled for 15 s. A polling interval between 30 s and 5 minutes
is plenty; anything faster gets you the same cached snapshot, just with
extra bandwidth.