System overview

How the two unauthenticated-or-lightweight system endpoints fit into deploying and monitoring an integration.

The System endpoints answer one question each: is the API up? and does my key work? Neither changes anything, and neither needs a scope.

EndpointNeeds a keyUse it for
GET /healthNoUptime monitoring of the API itself.
GET /pingYes, any scopeChecking a freshly deployed key, and your own credentials monitor.

The flow#

Deploying and monitoring a key
Deploying and monitoring a keyYour serverYour monitorLocaloy APIOnce, when you deploy a new key1. GET /ping Bearer key2. 200 principal, environment, scopesCheck the environment and scopes are the ones you meantContinuously, from your monitor3. GET /health no key4. Check database and cache5. 200 ok, or 503 unavailable
  1. — Once, when you deploy a new key —
  2. Your server → Localoy API: GET /ping Bearer key
  3. Localoy API → Your server: 200 principal, environment, scopes
  4. Note: Check the environment and scopes are the ones you meant
  5. — Continuously, from your monitor —
  6. Your monitor → Localoy API: GET /health no key
  7. Localoy API → Localoy API: Check database and cache
  8. Localoy API → Your monitor: 200 ok, or 503 unavailable
  1. Verify the key when you deploy it. GET /ping answers 200 with the key's principal (PARTNER or TECHNOLOGY_PROVIDER), its environment (SANDBOX or PRODUCTION) and its scopes. A wrong environment or a missing scope shows up here, before it fails a real write.
  2. Monitor the API with /health. It checks Localoy's database and cache and needs no key. 200 means every service is healthy; 503 means at least one is not, and the body lists each one.
  3. Monitor your credentials with /ping. A 401 means the key was revoked or mistyped.

Rules to remember#

  • /health is not recorded in your request log, but it still counts toward the per-IP rate limit.
  • /ping is recorded like any other call and counts toward the per-key limit.
  • Both are safe to repeat as often as the rate limit allows.

Next: Health check and Verify a key.