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 checkname: the check name as reported by your applicationlabel: human-readable labelstatus: current status -- Possible values:ok,warning,failed,crashed,skippedmessage: status message from your applicationmeta: always an empty array on the list endpoint. The full meta data is available through history itemsshort_summary: brief summary of the current statusdetected_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), ornull
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 itemstatus: the status at the time of this check -- Possible values:ok,warning,failed,crashed,skippedshort_summary: brief summary of the statusmessage: status message from your applicationmeta: the full meta data for this history item, as reported by your applicationdetected_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.
Feel free to reach out via [email protected] or on X via @OhDearApp if you have any other questions. We'd love to help!