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

# List all jobs with filtering and pagination

> **Required scope:** read

**Required scope:** `read`

### Query parameters

<ParamField query="status" type="object">
  Filter by status
</ParamField>

<ParamField query="job_type" type="object">
  Filter by job type
</ParamField>

<ParamField query="limit" type="integer">
  Maximum results (default: 100)
</ParamField>

<ParamField query="offset" type="integer">
  Pagination offset (default: 0)
</ParamField>

<ParamField query="sort_by" type="string">
  Sort field (created\_at, updated\_at)
</ParamField>

<ParamField query="sort_order" type="string">
  Sort order (asc, desc)
</ParamField>

<ParamField query="created_after" type="integer (int64)">
  Only jobs created after this timestamp
</ParamField>

<ParamField query="created_before" type="integer (int64)">
  Only jobs created before this timestamp
</ParamField>

### Response

`ListJobsResponse`

<ResponseField name="count" type="integer" required>
  Number of jobs returned
</ResponseField>

<ResponseField name="jobs" type="Job[]" required>
  List of jobs

  <Expandable title="Job">
    <ResponseField name="completed_at" type="integer (int64)">
      Completion timestamp (Unix ms, if completed)
    </ResponseField>

    <ResponseField name="created_at" type="integer (int64)" required>
      Creation timestamp (Unix ms)
    </ResponseField>

    <ResponseField name="error" type="string">
      Error message if failed
    </ResponseField>

    <ResponseField name="id" type="string" required>
      Unique job identifier
    </ResponseField>

    <ResponseField name="input" type="object" required>
      Input parameters
    </ResponseField>

    <ResponseField name="job_type" type="JobType" required />

    <ResponseField name="progress" type="integer (int32)" required>
      Progress percentage (0-100)
    </ResponseField>

    <ResponseField name="result" type="object">
      Result data (JSON)
    </ResponseField>

    <ResponseField name="status" type="JobStatus" required />

    <ResponseField name="updated_at" type="integer (int64)" required>
      Last update timestamp (Unix ms)
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="limit" type="integer" required>
  Limit used
</ResponseField>

<ResponseField name="offset" type="integer" required>
  Offset used
</ResponseField>

<ResponseField name="total" type="integer" required>
  Total count (before pagination)
</ResponseField>

### Status codes

| Code  | Meaning                                            |
| ----- | -------------------------------------------------- |
| `200` | List of jobs                                       |
| `401` | Unauthorized — missing or invalid credentials      |
| `403` | Forbidden — the key/token lacks the required scope |
| `429` | Rate limited — see Retry-After / X-RateLimit-Reset |

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.nsr.stateset.com/api/v1/jobs' \
    --header 'X-API-Key: YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "count": 2,
    "jobs": [
      {
        "completed_at": 1,
        "created_at": 1,
        "error": "string",
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "input": null,
        "job_type": "batch_infer",
        "progress": 1,
        "result": null,
        "status": "pending",
        "updated_at": 1
      }
    ],
    "limit": 20,
    "offset": 1,
    "total": 102
  }
  ```
</ResponseExample>
