API reference
List heartbeat runs
List a heartbeat's recent runs with the Uptenna API: when each cron job run started and finished, how long it took, its exit code and output.
GET https://uptenna.com/v1/monitors/{id}/runs
A heartbeat's recent runs, newest first: start and finish times, duration, outcome, exit code and the output the job sent.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | The monitor's id (mon_…). |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | no | 1 to 100. Default 50. |
Example request
curl "https://uptenna.com/v1/monitors/mon_Q2fk8LtW5nVa/runs?limit=20" \
-H "Authorization: Bearer $UPTENNA_API_KEY"const res = await fetch("https://uptenna.com/v1/monitors/mon_Q2fk8LtW5nVa/runs?limit=20", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.UPTENNA_API_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).error.message);
const { data } = await res.json();Response
Returns 200 OK with data, a list of heartbeat run objects.
{
"data": [
{
"id": 4812,
"started_at": "2026-12-01T08:00:02.000Z",
"ended_at": "2026-12-01T08:03:41.000Z",
"duration_ms": 219000,
"state": "fail",
"exit_code": 1,
"message": "pg_dump: error: connection to server failed"
}
]
}Errors
Errors look like { "error": { "code", "message" } } (see Errors).
| Status | Code | When |
|---|---|---|
| 400 | invalid_parameter | limit isn't valid. |
| 400 | not_heartbeat | The monitor is an HTTP monitor: only heartbeats have runs. |
| 404 | not_found | No monitor with this id in your account. |
| 401 | unauthorized | The Authorization header is missing, malformed, or the key is unknown or revoked. |
| 429 | rate_limited | More than 120 requests in 60 seconds with this key. Wait for the Retry-After header's seconds. |