---
title: "List batches (v2)"
method: GET
path: "/api/v2alpha/batches"
tags: ["Batches"]
---

# List batches (v2)

`GET /api/v2alpha/batches`

Get a list of batches using v2 query format

## Query parameters

- `q` string
- `last_batch_id` integer

## Response `200`

List of batches retrieved successfully

- BatchListResponse
  - `batches` BatchResponse[]
    - `id` integer — The batch ID
    - `user` string — The user who created the batch
    - `billing_project` string — The billing project associated with the batch
    - `token` string — Token for batch identification
    - `state` 'open' | 'complete' | 'cancelled' | 'failure' | 'running' — Current state of the batch
    - `complete` boolean — Whether the batch is complete
    - `closed` boolean — Whether the batch is closed
    - `n_jobs` integer — Total number of jobs in the batch
    - `n_completed` integer — Number of completed jobs
    - `n_succeeded` integer — Number of succeeded jobs
    - `n_failed` integer — Number of failed jobs
    - `n_cancelled` integer — Number of cancelled jobs
    - `time_created` string, date-time — When the batch was created
    - `time_completed` string, date-time, nullable — When the batch completed
    - `attributes` object — Key-value pairs of attributes for the batch
  - `last_batch_id` integer, nullable — ID of the last batch in the list for pagination

## Other responses

- `401` — Unauthorized
- `403` — Forbidden - requires developer privileges

---

[API](https://skmtc.net/hail-is/apis/hail-services.md) · [All operations](https://skmtc.net/hail-is/apis/hail-services/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hail-is/hail-services/revisions/3bd6e13adfa6/schema)
