# Get a job's steps (/api/jobs/get-job)

`GET /api/jobs/{id}`

One workflow job's attempts, each with its step list (sling jobs show). A job id is one attempt; this resolves it to the logical job (run_id, job_name) and returns every attempt with its steps. Authenticated; a job in another org 404s (opaque).

Base URL: `https://runners.starsling.dev`

## Authentication

Requires a bearer token (`Authorization: Bearer`).

## Parameters

| Name | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | GitHub job id. A non-numeric id resolves to 404, not 422. e.g. `85933007091` |
| `org` | query | string | yes | GitHub organization login. Scopes the request to your membership. e.g. `acme` |

## Responses

| Status | Description |
| --- | --- |
| `200` | One job, with each attempt's step list. |
| `401` | No credential, or a GitHub grant too old to read org membership — re-run `sling login`. |
| `403` | You are not a member of the org named in `?org=`. |
| `404` | No such job in that org. A job in an org you can't see answers the same way — existence is never confirmed across a tenant boundary. |
| `422` | A path or query parameter failed schema validation. `details` names each offending field. |
| `500` | The control plane failed, or the CI facts store is not configured for this deployment. |

### `200` body

- `run_id` — string, required
- `run_url` — string, required
- `job_name` — string, required
- `attempts` — array<object>, required
  - array of object
    - `attempt_id` — string, required. e.g. `att_85933007091.1`
    - `attempt` — string | integer, required
    - `status` — string, required
    - `conclusion` — string
    - `runner_id` — string
    - `label` — string
    - `duration_ms` — string | integer
    - `steps` — array<object>, required

### Example

```json
{
  "run_id": "28961231706",
  "run_url": "https://github.com/acme/api/actions/runs/28961231706",
  "job_name": "typecheck",
  "attempts": [
    {
      "attempt_id": "att_85933007091.1",
      "attempt": 1,
      "status": "completed",
      "conclusion": "failure",
      "runner_id": "611593",
      "label": "starsling-ubuntu-24.04-8",
      "duration_ms": 89000,
      "steps": [
        {
          "name": "Set up job",
          "number": 1,
          "status": "completed",
          "conclusion": "success",
          "duration_ms": 2000
        },
        {
          "name": "Run bun run typecheck",
          "number": 4,
          "status": "completed",
          "conclusion": "failure",
          "duration_ms": 61000
        }
      ]
    }
  ]
}
```