Heartbeats: Retrieve One
This documentation entry provides a clear and detailed guide on how to retrieve a specific heartbeat monitor using the API, including the necessary parameters, headers, and expected response.
Endpoint
GET /api/heartbeats/{heartbeat_id}
/api/heartbeats/{heartbeat_id}Retrieve detailed information about a specific heartbeat monitor by its unique identifier.
Request
HTTP Request
GET https://uptimekeep.com/api/heartbeats/{heartbeat_id}Replace {heartbeat_id} with the ID of the heartbeat monitor you wish to retrieve.
Headers
Authorization
String
Bearer token for API authentication.
Example of a request:
curl --request GET \
--url 'https://uptimekeep.com/api/heartbeats/{heartbeat_id}' \
--header 'Authorization: Bearer {api_key}'Response
A successful response returns a JSON object containing detailed information about the specified heartbeat monitor.
Response Example
Fields
Data Object
id
Integer
Unique identifier for the heartbeat monitor.
project_id
Integer
ID of the associated project (if applicable).
name
String
Name of the heartbeat monitor.
code
String
Unique code assigned to the heartbeat monitor.
settings
Object
Configuration settings for the heartbeat monitor (see below for details).
is_ok
Integer
Status of the heartbeat (1 for OK, 0 for Not OK).
uptime
Float
Uptime percentage of the monitored task or service.
downtime
Float
Downtime percentage of the monitored task or service.
total_runs
Integer
Total number of successful runs detected.
total_missed_runs
Integer
Total number of missed runs.
last_run_datetime
String
Timestamp of the last successful run (in YYYY-MM-DD HH:MM:SS format).
notifications
Object
Notification settings for the heartbeat monitor (see below for details).
is_enabled
Boolean
Indicates if the heartbeat monitor is currently active.
datetime
String
Timestamp when the monitor was created (in YYYY-MM-DD HH:MM:SS format).
Settings Object
run_interval
Integer
Interval between expected runs (e.g., 1, 5, 15).
run_interval_type
String
Type of interval (e.g., minutes, hours, days).
run_interval_grace
Integer
Grace period allowed after the expected run interval.
run_interval_grace_type
String
Type of grace period (e.g., seconds, minutes).
Notifications Object
email_is_enabled
Boolean
Indicates if email notifications are enabled.
webhook
String
Webhook URL for notifications (if configured).
slack
String
Slack webhook URL for notifications (if configured).
twilio
String
Twilio credentials for SMS notifications (if configured).
Errors
If the request fails, the API will return an error message with an appropriate HTTP status code, such as 404 Not Found if the heartbeat monitor ID does not exist.
Last updated