Skip to content

Service status

Two small probes for operational use: one that tells you whether the service and its dependencies are healthy, and one that reports the deployed API version. Handy as a start-up check in your own service, or in a load balancer / uptime monitor.

Operation Endpoint
Health check GET /v1/meta/status
Deployed version GET /v1/meta/version
import asyncio
from pagr import PagrApiClient, PagrError
async def main():
async with PagrApiClient("pagr_prod_xxxxxxxx") as client:
try:
await client.get_status() # True, or raises
print("API version:", await client.get_version())
except PagrError as exc:
print("Pagr is unavailable:", exc)
asyncio.run(main())
GET /v1/meta/status

A readiness probe: it verifies the API’s two hard dependencies — the database and blob storage — are reachable, not merely that the process is running.

None.

None.

Status Body Meaning
200 OK (empty) Both dependencies responded. The service is ready to take traffic.
503 Service Unavailable A plain-text reason A dependency is unreachable.
GET /v1/meta/version

Reports the version of the deployed public-API assembly. Useful for correlating behaviour with a specific deployment in a bug report.

None.

None.

200:

{ "version": "1.4.2.0" }
Field Type Description
version string The deployed assembly version, or "unknown" when it can’t be determined.

The SDKs return the string directly (or null/None/std::nullopt if the field is absent), not the wrapper object.

Operation Python TypeScript Java C# Ruby C++
Health check get_status() getStatus() getStatus() GetStatusAsync() status get_status()
Deployed version get_version() getVersion() getVersion() GetVersionAsync() version get_version()

get_status returns true when healthy and raises otherwise — it never returns false. Wrap it in a try rather than testing the return value.

Status When
503 A dependency (database or blob storage) is unreachable. Surfaces as a PagrError subclass in the SDKs.

As reads, both endpoints are retried by the SDKs on transient failures — including 503 — so a single blip won’t fail your start-up check. See Handle errors and retries.