Docs/API

Application Health

The application health endpoints let you retrieve the health checks your application reports to Oh Dear, browse their history, and snooze or unsnooze individual checks. This is useful for monitoring custom health metrics on any monitor with the application health check enabled.

You'll need a monitor ID for these endpoints.

Example request:

$ OHDEAR_TOKEN="your API token"
$ curl https://ohdear.app/api/monitors/1/application-health-checks \
    -H "Authorization: Bearer $OHDEAR_TOKEN" \
    -H 'Accept: application/json' \
    -H 'Content-Type: application/json'

All endpoints below follow the same authentication pattern.

Application health check response fields #

Every application health check endpoint returns an object with these fields:

{
  "id": 42,
  "name": "database",
  "label": "Database",
  "status": "ok",
  "message": "All connections are healthy",
  "meta": [],
  "short_summary": "OK",
  "detected_at": "2024-06-15 14:30:00",
  "updated_at": "2024-06-15 14:30:00",
  "active_snooze": null
}
  • id: unique identifier for this health check
  • name: the check name as reported by your application
  • label: human-readable label
  • status: current status -- Possible values: ok, warning, failed, crashed, skipped
  • message: status message from your application
  • meta: always an empty array on the list endpoint. The full meta data is available through history items
  • short_summary: brief summary of the current status
  • detected_at: when this check was first detected (UTC)
  • updated_at: when this check was last updated (UTC)
  • active_snooze: snooze details if active (see checks docs), or null

History item response fields #

When you retrieve history for a specific health check, each item has these fields:

{
  "id": 1,
  "status": "ok",
  "short_summary": "OK",
  "message": "All connections are healthy",
  "meta": {
    "connection_count": 5,
    "max_connections": 100
  },
  "detected_at": "2024-06-15 14:30:00",
  "updated_at": "2024-06-15 14:30:00"
}
  • id: unique identifier for this history item
  • status: the status at the time of this check -- Possible values: ok, warning, failed, crashed, skipped
  • short_summary: brief summary of the status
  • message: status message from your application
  • meta: the full meta data for this history item, as reported by your application
  • detected_at: when this status was detected (UTC)
  • updated_at: when this history item was last updated (UTC)

List application health checks #

GET /api/monitors/{monitorId}/application-health-checks

Returns a paginated list of all application health checks for a monitor. Each item follows the same shape as the health check object above.

Get history for a health check #

GET /api/monitors/{monitorId}/application-health-checks/{applicationHealthCheckId}

Returns a paginated list of history items for a specific health check. Each item follows the history item shape above. Unlike the list endpoint, history items include the full meta data as reported by your application.

Snooze a health check #

POST /api/monitors/{monitorId}/application-health-checks/{applicationHealthCheckId}/snooze

Temporarily silences notifications for an application health check. See the checks snooze docs for details on snoozing behavior.

Request body (JSON):

  • minutes (integer, required) -- how long to snooze (1 to 144,000)

Returns the health check object with active_snooze populated.

Unsnooze a health check #

POST /api/monitors/{monitorId}/application-health-checks/{applicationHealthCheckId}/unsnooze

Removes the active snooze from an application health check. Returns the health check object with active_snooze set to null.

Was this page helpful?

Feel free to reach out via [email protected] or on X via @OhDearApp if you have any other questions. We'd love to help!