get_run_history
Retrieve structured run history for a monitor to diagnose stalled runs and review step progress, incident details, and duration across CI/CD and agent runs.
Instructions
Get structured run history for a monitor — both CI/CD runs and agent/heartbeat runs. Each run carries its run id (rid), kind, received_at, the progress steps reported under it (steps: seq, name, at), and the correlated incident log excerpt (incident_detail) with resolution status. A run that stalled tells you which step it reached and when it stopped moving — no need to follow links to the CI provider. steps is absent for a run that reported none — steps are matched on rid, so they appear only when the job or agent posted /step?rid= with the same run id it started with. CI-specific fields — failing step (failing_stage), triggering actor, commit SHA, run URL, branch, duration_s, outcome — are present only on runs that carried ci_meta; they are simply absent on agent/heartbeat runs. A ping with neither ci_meta nor a rid is excluded entirely. duration_ms is a SEPARATE measurement, present on ANY run (CI or agent/heartbeat) whose success ping paired with its preceding start — this is how to answer 'how long does this job normally take?' for a non-CI monitor. It is computed by LastPing from the /start->success timing, not self-reported by a provider like duration_s is; the two must not be confused as confirming each other, and either can be present without the other.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Monitor UUID. | |
| limit | No | Max runs to return (default 20, max 100). |