Check Health

Check that the API is ready: it reaches the database with a SELECT 1, answers 200 while the database answers and 503 as soon as it does not. No authentication, so an uptime monitor can poll it every minute.

get/health
curl --request GET \
  --url 'https://api.tries.care/health'
{
  "status": "ok",
  "version": "6d649b3612c4e0f1a8b2d9c7e5f30a4b1c2d3e4f",
  "checks": {
    "database": true,
    "stripe": true
  }
}

Responses

  • 200The API is ready: its database answers.application/json
    • statusenum<string>required
    • versionstringnullablerequired

      The commit the running build was made from, or null outside a deployed build.

    • checksobjectrequired
      Properties (2)
      • databasebooleanrequired

        Whether the database answered a SELECT 1.

      • stripebooleanrequired

        Whether a Stripe key is configured. No call is made to Stripe, and this check never makes the API unavailable.

  • 503The API is not ready: its database did not answer, or the probe itself failed.application/json
    • statusenum<string>required
    • versionstringnullablerequired

      The commit the running build was made from, or null outside a deployed build.

    • checksobjectrequired
      Properties (2)
      • databasebooleanrequired

        Whether the database answered a SELECT 1.

      • stripebooleanrequired

        Whether a Stripe key is configured. No call is made to Stripe, and this check never makes the API unavailable.