---
title: "Retrieve a batch"
method: GET
path: "/api/v1/batches/{batchId}"
tags: ["batches"]
---

# Retrieve a batch

`GET /api/v1/batches/{batchId}`

Retrieve a batch by its ID, including its status and the IDs of all runs in the batch.

## Response `200`

Successful request

- object
  - `id` string — The batch ID.
  - `status` 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'PARTIAL_FAILED' | 'ABORTED' — The current status of the batch.
  - `idempotencyKey` string, nullable — The idempotency key provided when triggering, if any.
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `runCount` integer — The total number of runs in the batch.
  - `runs` string[] — Array of run IDs in the batch.
  - `successfulRunCount` integer, nullable — Number of successful runs (populated after completion).
  - `failedRunCount` integer, nullable — Number of failed runs (populated after completion).
  - `errors` object[], nullable — Error details for failed items (present for PARTIAL_FAILED batches).
    - `index` integer — The index of the failed item.
    - `taskIdentifier` string — The task identifier of the failed item.
    - `error` object — The error details.
    - `errorCode` string, nullable — An optional error code.

## Other responses

- `401` — Unauthorized request
- `404` — Batch not found

---

[API](https://skmtc.net/winsenlabs/apis/trigger-dev-v3-rest-api.md) · [All operations](https://skmtc.net/winsenlabs/apis/trigger-dev-v3-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/winsenlabs/trigger-dev-v3-rest-api/revisions/737c498e605b/schema)
