---
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

## Changes

- **2026-06-04** `a545b6b19c2b` — 1 info
  - the endpoint scheme security `developerAuth` was removed from the API
- **2025-09-11** `1ceb0d26f60f` — 1 breaking, 15 info
  - the `batches/items/` response's property type changed from no type to `object` for status `200`
  - added the optional property `batches/items/attributes` to the response with the `200` status
  - added the optional property `batches/items/billing_project` to the response with the `200` status
  - added the optional property `batches/items/closed` to the response with the `200` status
  - …12 more
- **2025-04-16** `afa3b61d1d09` — 10 info
  - api operation id `getBatchesv2alpha` removed and replaced with ``
  - the endpoint scheme security `developerAuth` was added to the API
  - api tag `Batches` added
  - api tag `Batches API v2Alpha` removed
  - …6 more
- **2025-01-14** `559a91071cc1` — 4 warning, 5 info
  - deleted the `query` request parameter `last_batch_id`
  - deleted the `query` request parameter `q`
  - removed the optional property `batches` from the response with the `200` status
  - removed the optional property `last_batch_id` from the response with the `200` status
  - …5 more

[Change history](https://skmtc.dev/hail-is/apis/hail-services/changes/api/v2alpha/batches/get.md)

---

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