> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sluice.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /api/jobs/:id

> Get full detail for a single job, including state history and recent executions.

Returns the complete job record with state history timeline and recent executions of the same task name.

## Authentication

Session cookie (dashboard).

## Path parameters

| Parameter | Type     | Description      |
| --------- | -------- | ---------------- |
| `id`      | `string` | Sluice job UUID. |

## Response

```json theme={null}
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "externalId": "abc123-def456-ghi789",
  "framework": "celery",
  "connectionId": "550e8400-e29b-41d4-a716-446655440000",
  "name": "app.tasks.send_email",
  "queue": "default",
  "tags": {},
  "state": "failed",
  "stateChangedAt": "2026-02-27T10:30:02.000Z",
  "previousState": "active",
  "createdAt": "2026-02-27T10:29:55.000Z",
  "scheduledFor": null,
  "startedAt": "2026-02-27T10:29:56.000Z",
  "completedAt": "2026-02-27T10:30:02.000Z",
  "durationMs": 6000,
  "workerId": "celery@worker-1",
  "attempt": 1,
  "maxRetries": 3,
  "progress": null,
  "args": null,
  "result": null,
  "error": "ConnectionRefusedError: [Errno 111] Connection refused",
  "stacktrace": "Traceback (most recent call last):\n  File \"/app/tasks.py\", line 42, in send_email\n    smtp.connect(host, port)\nConnectionRefusedError: [Errno 111] Connection refused",
  "parentId": null,
  "rootId": null,
  "extensions": {},
  "stateHistory": [
    { "state": "queued", "timestamp": "2026-02-27T10:29:55.000Z" },
    { "state": "active", "timestamp": "2026-02-27T10:29:56.000Z" },
    { "state": "failed", "timestamp": "2026-02-27T10:30:02.000Z" }
  ],
  "recentExecutions": [
    {
      "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "externalId": "xyz789-abc123-def456",
      "state": "completed",
      "createdAt": "2026-02-27T09:15:00.000Z",
      "startedAt": "2026-02-27T09:15:01.000Z",
      "completedAt": "2026-02-27T09:15:03.000Z",
      "durationMs": 2000,
      "error": null
    }
  ]
}
```

### Additional fields (vs list endpoint)

| Field              | Type       | Description                                                        |
| ------------------ | ---------- | ------------------------------------------------------------------ |
| `tags`             | `object`   | User-defined labels.                                               |
| `previousState`    | `string?`  | State before the current one.                                      |
| `attempt`          | `integer`  | Current attempt number (1-indexed).                                |
| `maxRetries`       | `integer?` | Configured retry limit.                                            |
| `progress`         | `number?`  | Progress value (0.0–1.0).                                          |
| `args`             | `any`      | Job arguments (null in V0 — argument capture is a future feature). |
| `result`           | `any`      | Job return value (null in V0).                                     |
| `stacktrace`       | `string?`  | Full traceback on failure.                                         |
| `parentId`         | `string?`  | Parent job ID (for chains/workflows).                              |
| `rootId`           | `string?`  | Root job of a chain/workflow.                                      |
| `extensions`       | `object`   | Framework-specific data.                                           |
| `stateHistory`     | `array`    | Ordered list of state transitions with timestamps.                 |
| `recentExecutions` | `array`    | Recent runs of the same task name (for comparison).                |

### Error response

```json theme={null}
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Job not found.",
    "docs_url": "https://docs.sluice.sh/troubleshooting/api-errors"
  }
}
```
