API reference / Health

get/metrics

Queue depths, for a scraper

Operation
getMetrics
Authentication
API key

Prometheus text format — the exposition every scraper already speaks, so nobody has to write one.\n\n**Not public, unlike `/health` and `/ready`.** Those answer *"can I reach you"*, which a partner may ask without a credential. Queue depths describe our internal state, and a stuck submission queue is a business fact rather than a liveness one, so this sits on `projects:write` — the ops scope no partner key is ever issued and which is not delegable.\n\nReports the depth of the three row-as-queue tables the product runs on: notifications, webhook deliveries and government submissions. **Not request latency** — a request counter would be easy to add and would not answer the question the readiness review asked, which was how anyone would notice that a partner had stopped receiving webhooks or that email had stopped being queued.

Request

Responses

200Metrics in Prometheus text exposition format, version 0.0.4.

Free-form JSON object.

401No key, an unknown key, a revoked key, or a key whose tenant is not active. All four return an identical body on purpose: distinguishing them would let a caller discover which partners we have.
errorobjectrequired
403`projects:write` is required. No partner key is ever issued this scope.
errorobjectrequired
429Rate limit exceeded. Retry after `retry-after` seconds.
errorobjectrequired

Example

curl
curl -X GET https://api.haavisa.com/metrics \
  -H "Authorization: Bearer $HAAVISA_API_KEY"

More in Health

Something unclear? The eligibility guide explains the model behind the answers; the errors guide covers the envelope.