StarSling
APIWhy

Diagnose a failed job or run

Classifies why a CI job failed (sling why) — step_failure / timeout / cancelled / terminated / oom / infra / network_egress / hang / unknown — with evidence, suggested actions, and a downstream-agent prompt, read deterministically from the CI facts store. No LLM in the request path.

View Markdown
GET/api/why

Authorization

bearerAuth
AuthorizationBearer <token>

Session token from sling login.

In: header

Query Parameters

org*string

GitHub organization login. Scopes the request to your membership.

Length1 <= length
job_id?string

Diagnose this job. Give either job_id or run_id, not both.

Match^[1-9]\d*$
run_id?string

Diagnose this run — the most diagnosable failed job in it is chosen.

Match^[1-9]\d*$

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/why?org=acme"
{  "job_id": "88886665361",  "job_name": "typecheck",  "conclusion": "failure",  "classification": "step_failure",  "summary": "Step `Run bun run typecheck` failed with exit code 2.",  "evidence": [    {      "kind": "step",      "ref": "Run bun run typecheck"    },    {      "kind": "log_line",      "ref": "812"    }  ],  "logs": "##[error]Process completed with exit code 2.",  "log_window": "src/index.ts(42,7): error TS2322: Type 'string' is not assignable to type 'number'.",  "suggested_actions": [    {      "title": "Read the failing step's log",      "command": "sling logs att_88886665361.1"    }  ],  "prompt": "The job `typecheck` failed at step `Run bun run typecheck` with a TS2322 type error in src/index.ts:42.",  "meta": {    "truncated": false  }}