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.
Endpoints
Section titled “Endpoints”| Operation | Endpoint |
|---|---|
| Health check | GET /v1/meta/status |
| Deployed version | GET /v1/meta/version |
Example
Section titled “Example”# Health — 200 means healthy, 503 means a dependency is downcurl -i "https://pagr-prd-api-public.azurewebsites.net/v1/meta/status"
# Versioncurl "https://pagr-prd-api-public.azurewebsites.net/v1/meta/version"# → { "version": "1.4.2.0" }No Authorization header needed for either.
import asynciofrom 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())import { PagrApiClient, PagrError } from 'pagr';
const client = new PagrApiClient('pagr_prod_xxxxxxxx');
try { await client.getStatus(); // true, or throws console.log('API version:', await client.getVersion());} catch (err) { if (err instanceof PagrError) console.log('Pagr is unavailable:', err.message); else throw err;}import org.example.PagrApiClient;import org.example.exception.PagrException;
try (PagrApiClient client = new PagrApiClient("pagr_prod_xxxxxxxx")) { client.getStatus(); // true, or throws System.out.println("API version: " + client.getVersion());} catch (PagrException exc) { System.out.println("Pagr is unavailable: " + exc.getMessage());}using Pagr.Sdk;using Pagr.Sdk.Exceptions;
using var client = new PagrApiClient("pagr_prod_xxxxxxxx");
try{ await client.GetStatusAsync(); // true, or throws Console.WriteLine($"API version: {await client.GetVersionAsync()}");}catch (PagrApiException exc){ Console.WriteLine($"Pagr is unavailable: {exc.Message}");}require "pagr"
client = Pagr::Client.new("pagr_prod_xxxxxxxx")
begin client.status # true, or raises puts "API version: #{client.version}"rescue Pagr::Error => e warn "Pagr is unavailable: #{e.message}"end#include "pagr/PagrApiClient.hpp"#include "pagr/exceptions.hpp"
pagr::PagrApiClient client("pagr_prod_xxxxxxxx");
try { client.get_status(); // true, or throws if (const auto version = client.get_version()) { std::cout << "API version: " << *version << "\n"; }} catch (const pagr::PagrApiException& exc) { std::cout << "Pagr is unavailable: " << exc.what() << "\n";}get_status_async / get_version_async forms are also available.
Health check
Section titled “Health check”GET /v1/meta/statusA readiness probe: it verifies the API’s two hard dependencies — the database and blob storage — are reachable, not merely that the process is running.
Path parameters
Section titled “Path parameters”None.
Query parameters
Section titled “Query parameters”None.
Response
Section titled “Response”| 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. |
Deployed version
Section titled “Deployed version”GET /v1/meta/versionReports the version of the deployed public-API assembly. Useful for correlating behaviour with a specific deployment in a bug report.
Path parameters
Section titled “Path parameters”None.
Query parameters
Section titled “Query parameters”None.
Response
Section titled “Response”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.
SDK reference
Section titled “SDK reference”| 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.
Errors
Section titled “Errors”| 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.
Related articles
Section titled “Related articles”- Handle errors and retries — the exception tree and the retry policy.
- API Overview — base URL and versioning.
- Troubleshooting — what to check when calls fail.
