## List Batch Jobs

`BatchListPageResponse Beta.Batch.List(BatchListParams?parameters, CancellationTokencancellationToken = default)`

**get** `/api/v1/beta/batch-processing`

List batch processing jobs with optional filtering.

Filter by `directory_id`, `job_type`, or `status`. Results
are paginated with configurable `limit` and `offset`.

### Parameters

- `BatchListParams parameters`

  - `string? directoryID`

    Filter by directory ID

  - `JobType? jobType`

    Filter by job type (PARSE, EXTRACT, CLASSIFY)

    - `"classify"Classify`

    - `"extract"Extract`

    - `"parse"Parse`

  - `Long limit`

    Maximum number of jobs to return

  - `Long offset`

    Number of jobs to skip for pagination

  - `string? organizationID`

  - `string? projectID`

  - `Status? status`

    Filter by job status (PENDING, RUNNING, COMPLETED, FAILED, CANCELLED)

    - `"cancelled"Cancelled`

    - `"completed"Completed`

    - `"dispatched"Dispatched`

    - `"failed"Failed`

    - `"pending"Pending`

    - `"running"Running`

### Returns

- `class BatchListPageResponse:`

  Response schema for paginated batch job queries.

  - `required IReadOnlyList<BatchListResponse> Items`

    The list of items.

    - `required string ID`

      Unique identifier for the batch job

    - `required JobType JobType`

      Type of processing operation (parse or classify)

      - `"classify"Classify`

      - `"extract"Extract`

      - `"parse"Parse`

    - `required string ProjectID`

      Project this job belongs to

    - `required Status Status`

      Current job status

      - `"cancelled"Cancelled`

      - `"completed"Completed`

      - `"dispatched"Dispatched`

      - `"failed"Failed`

      - `"pending"Pending`

      - `"running"Running`

    - `required Long TotalItems`

      Total number of items in the job

    - `DateTimeOffset? CompletedAt`

      Timestamp when job completed

    - `DateTimeOffset? CreatedAt`

      Creation datetime

    - `string? DirectoryID`

      Directory being processed

    - `DateTimeOffset EffectiveAt`

    - `string? ErrorMessage`

      Error message for the latest job attempt, if any.

    - `Long FailedItems`

      Number of items that failed processing

    - `string? JobRecordID`

      The job record ID associated with this status, if any.

    - `Long ProcessedItems`

      Number of items processed so far

    - `Long SkippedItems`

      Number of items skipped (already processed or size limit)

    - `DateTimeOffset? StartedAt`

      Timestamp when job processing started

    - `DateTimeOffset? UpdatedAt`

      Update datetime

    - `string? WorkflowID`

      Async job tracking ID

  - `string? NextPageToken`

    A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

  - `Long? TotalSize`

    The total number of items available. This is only populated when specifically requested. The value may be an estimate and can be used for display purposes only.

### Example

```csharp
BatchListParams parameters = new();

var page = await client.Beta.Batch.List(parameters);
await foreach (var item in page.Paginate())
{
    Console.WriteLine(item);
}
```

#### Response

```json
{
  "items": [
    {
      "id": "bjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
      "job_type": "classify",
      "project_id": "proj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
      "status": "cancelled",
      "total_items": 0,
      "completed_at": "2019-12-27T18:11:19.117Z",
      "created_at": "2019-12-27T18:11:19.117Z",
      "directory_id": "dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
      "effective_at": "2019-12-27T18:11:19.117Z",
      "error_message": "error_message",
      "failed_items": 0,
      "job_record_id": "job_record_id",
      "processed_items": 0,
      "skipped_items": 0,
      "started_at": "2019-12-27T18:11:19.117Z",
      "updated_at": "2019-12-27T18:11:19.117Z",
      "workflow_id": "workflow_id"
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
```
