List an agent's open incidents (the failure inbox)
Everything currently broken on the monitors this agent owns, newest first, as a JSON array (never null). This is the pull half of failure delivery: an agent polls it at the start of its next run and learns what broke while it was not looking — no webhook, no inbox, no chat integration to configure.
Only open incidents are returned. There is no closed_at field: it would be null on every row this endpoint can emit.
The payload carries what an agent cannot work out from its own run:
- cause — silence and fail demand opposite responses. A fail means the job ran and reported an error; a silence means it never reported at all, which usually implicates the scheduler or the host rather than the job.
- body_excerpt — the error text the failing run printed.
- failed_step — where it died. For a stalled incident this is the whole diagnosis: the run is alive but has not moved past this step.
- failure_signature — new problem, or the fortieth repeat. The single fact that decides retry versus escalate.
- duration_vs_normal — a comparison, never a bare number. "40 minutes" is a measurement; "8.3x the typical run" is a diagnosis.
Every enrichment degrades to absent rather than erroring. A brand-new monitor has no fingerprint history and no archived daily stats; an incident opened by silence has no failure body because nothing was reported — that is the complaint itself. The thin payload is still useful and thickens on its own as history accumulates. This endpoint never fails over a missing enrichment.
- exit_code — the status the run exited with, when it sent one. 137 (SIGKILL, usually the OOM killer) and 1 demand different responses, and only the numeric ping form /ping/{id}/{code} carries one. The field is absent when no code was reported, which is not the same as 0; see the OpenIncident schema.
Request
- Base URL: https://app.lastping.dev
- URL: https://app.lastping.dev/api/v1/agents/{id}/open-incidents
- Auth: API key in header X-Api-Key
Response
Array of open incidents (may be empty).
Example response
[
{
"incident_id": 4821,
"check_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"check_slug": "nightly-etl",
"check_name": "Nightly ETL",
"cause": "fail",
"opened_at": "2026-08-21T03:14:07Z",
"detail": "assertion contains(\"rows_written\") failed",
"run_id": "2026-08-21T03-00-00Z-a91f",
"body_excerpt": "psycopg2.OperationalError: could not connect to server",
"exit_code": 137,
"failed_step": {
"name": "load-warehouse",
"seq": 4,
"at": "2026-08-21T03:12:44Z"
},
"failure_signature": {
"fingerprint": "9f2c1ab30de54771",
"occurrences": 40,
"first_seen": "2026-06-02T03:11:58Z",
"last_seen": "2026-08-21T03:14:07Z"
},
"duration_vs_normal": {
"run_ms": 2400000,
"typical_ms": 288000,
"ratio": 8.33,
"days_sampled": 30,
"summary": "8.3x the typical run (40m0s vs 4m48s), from 30 archived days"
},
"ci": {
"run_url": "https://github.com/acme/etl/actions/runs/1234567890",
"failing_stage": "integration-tests",
"outcome": "failure",
"branch": "main",
"commit_sha": "9f2c1ab30de547714a0f2c1ab30de547714a0f2c"
}
}
]Changes
No recorded changes to this operation across all 2 revisions of this API.