> For a complete page index of the Captain API documentation, fetch https://docs.captain.dev/llms.txt?excludeSpec=true

# List Jobs

GET https://acme.captain.dev/v1/jobs

List the jobs the key can read, newest first: the jobs it started and the automatic builds of its indexes.

Reference: https://docs.captain.dev/reference/product-search/indexes/list-jobs

## Authentication

- `Authorization` header (bearer token, required) — A write key, issued by Captain. Server side only. Sent as Authorization: Bearer \<key>.

## Request

### Query parameters

- `status` (enum, optional, default: running)
  - Allowed values: `running`, `queued`, `succeeded`, `failed`, `all`
- `index` (string, optional)
- `limit` (integer, optional, default: 50)

## Response

### 200

the jobs in that status, newest first

- `jobs` (list of V1JobsGetResponsesContentApplicationJsonSchemaJobsItems, required)

## Types

### V1JobsGetResponsesContentApplicationJsonSchemaJobsItems

- `id` (string, required)
- `type` (string, required)
- `index` (string, required)
- `status` (string, required)
- `created_at` (integer, optional, nullable)
- `started_at` (integer, optional, nullable)
- `finished_at` (integer, optional, nullable)
- `cancelled` (boolean, optional)

## Examples

**Response**

```json
{
  "jobs": [
    {
      "id": "job_20261002184501_1a2b3c",
      "type": "index.write",
      "index": "products",
      "status": "succeeded",
      "created_at": 1759430701,
      "started_at": null,
      "finished_at": 1759430702
    }
  ]
}
```

**SDK Code**

```python Python REST
import json
import requests

BASE_URL = "https://acme.captain.dev"
API_KEY = "your_write_key"

headers = {
    "Authorization": f"Bearer {API_KEY}",
}

response = requests.get(
    f"{BASE_URL}/v1/jobs",
    headers=headers,
    params={"status": "all", "index": "products"},
    timeout=30.0,
)

print(json.dumps(response.json(), indent=2))
```

```typescript TypeScript REST
const BASE_URL = "https://acme.captain.dev";
const API_KEY = "your_write_key";

const params = new URLSearchParams({ status: "all", index: "products" });

const response = await fetch(`${BASE_URL}/v1/jobs?${params}`, {
  method: "GET",
  headers: {
    Authorization: `Bearer ${API_KEY}`,
  },
});

const result = await response.json();
console.log(JSON.stringify(result, null, 2));
```