Skip to main content
GET
/
health
GET /health and GET /ready
curl --request GET \
  --url https://mcr.peaq.xyz/health

Documentation Index

Fetch the complete documentation index at: https://docs.peaq.xyz/llms.txt

Use this file to discover all available pages before exploring further.

GET /health

GET /health
A lightweight liveness probe. Returns 200 whenever the process is running. Does not check chain connectivity or contract readiness.

Response

200 OK
FieldTypeDescription
statusstringAlways "ok" when the process is running

Error responses

None. This endpoint always returns 200 while the server process is alive.

Example

curl "${PEAQOS_MCR_API_URL}/health"
Response
{
  "status": "ok"
}

GET /ready

GET /ready
A readiness probe. Verifies that the RPC node is reachable and all six contracts (IdentityRegistry, IdentityStaking, EventRegistry, MachineNFT, DID registry, AdminFlags) are callable. Returns 200 when all checks pass and 503 when any check fails.

Response

200 OK (all contracts ready)
FieldTypeDescription
statusstring"ready"
rpc_connectedbooleantrue when the RPC node is reachable
contracts.identity_registrybooleanIdentityRegistry contract callable
contracts.identity_stakingbooleanIdentityStaking contract callable
contracts.event_registrybooleanEventRegistry contract callable
contracts.machine_nftbooleanMachineNFT contract callable
contracts.admin_flagsbooleanAdminFlags contract callable. Returns true when the contract address is not configured. AdminFlags is optional, so the readiness probe skips the call and reports ready.
contracts.did_registrybooleanDID precompile callable
503 Service Unavailable (one or more checks failed) The response body has the same shape as the 200 response, but status is "not_ready" and one or more boolean fields are false.
StatusCondition
503Any contract unreachable, RPC failure, or services not initialised
Two failure modes produce a 503:
  • Services not initialised (server started without IDENTITY_REGISTRY_ADDRESS): every field is false, including rpc_connected and contracts.admin_flags.
  • Initialised but a check failed (RPC down, contract unreachable, etc.): only the failing fields are false. When ADMIN_FLAGS_ADDRESS is unset, contracts.admin_flags is true: AdminFlags is optional, the probe skips it, and that field never blocks readiness.

Example

curl "${PEAQOS_MCR_API_URL}/ready"
Response (healthy)
{
  "status": "ready",
  "rpc_connected": true,
  "contracts": {
    "identity_registry": true,
    "identity_staking": true,
    "event_registry": true,
    "machine_nft": true,
    "admin_flags": true,
    "did_registry": true
  }
}
Response (not ready)
{
  "status": "not_ready",
  "rpc_connected": false,
  "contracts": {
    "identity_registry": false,
    "identity_staking": false,
    "event_registry": false,
    "machine_nft": false,
    "admin_flags": false,
    "did_registry": false
  }
}