API reference
Get a run
GET/v1/runs/{run_id}
A run’s state, how it ended, its pull request and, once it’s written, its summary. Any run in the key’s projects, including runs a person or a tracker rule started.
curl --fail-with-body -sS https://<workspace>.nightlab.io/v1/runs/run-42 \
-H "Authorization: Bearer $NIGHTLAB_API_KEY"
const res = await fetch(
"https://<workspace>.nightlab.io/v1/runs/run-42",
{
headers: {
Authorization: `Bearer ${process.env.NIGHTLAB_API_KEY}`,
},
},
);
if (!res.ok) throw new Error(await res.text());
const answer = await res.json();
import os, requests
answer = requests.get(
"https://<workspace>.nightlab.io/v1/runs/run-42",
headers={"Authorization": f"Bearer {os.environ['NIGHTLAB_API_KEY']}"},
timeout=30,
)
answer.raise_for_status()
Path
run_idstringRequiredThe run’s
id, likerun-42.
The answer
200 with the run. Its summary is filled in once the run has ended, usually within a minute; run.summarized says when.
200 OK
{
"id": "run-42",
"project": "shop",
"issue": "SHOP-1431",
"action": "build",
"state": "completed",
"outcome": "pr_opened",
"no_pr_reason": null,
"pr_url": "https://github.com/acme/shop/pull/322",
"pr_state": "draft",
"external_ref": "ci-8812",
"summary": {
"resolves": "yes",
"text": "Customers can now download past invoices as PDFs from their account."
},
"created_at": "2026-11-01T10:00:00Z",
"updated_at": "2026-11-01T10:24:00Z",
"finished_at": "2026-11-01T10:24:00Z",
"links": {
"api": "/v1/runs/run-42",
"portal": "https://app.nightlab.io/runs/run-42"
}
}
Refusals
404 for a run that doesn’t exist or isn’t in the key’s projects, and 403 for a key without runs:read.