---
title: "List jobs in a batch"
method: GET
path: "/api/v2alpha/batches/{batch_id}/jobs"
tags: ["Batches API v2Alpha"]
---

# List jobs in a batch

`GET /api/v2alpha/batches/{batch_id}/jobs`

List jobs in a batch by batch ID.

## Path parameters

- `batch_id` number, required

## Response `200`

Successfully retrieved the jobs in the batch.

- JobV2ListResponse
  - `jobs` JobV2Response[]
    - `batch_id` integer — ID of the batch this job belongs to
    - `job_id` integer — The job ID
    - `state` 'pending' | 'running' | 'succeeded' | 'failed' | 'cancelled' — Current state of the job
    - `exit_code` integer, nullable — Exit code of the job
    - `duration` number, nullable — Duration of the job in seconds
    - `cost` number, nullable — Cost of the job
    - `start_time` string, date-time, nullable — When the job started
    - `end_time` string, date-time, nullable — When the job ended
    - `attributes` object — Key-value pairs of attributes for the job
    - `spec` CreateJobRequest
      - `job_spec` object, required
        - `command` string[], required — Command to execute
        - `env` object — Environment variables
        - `port` integer — Port to expose
        - `resources` object
          - `cpu` string
          - `memory` string
          - `storage` string
        - `service_account` object
          - `namespace` string
          - `name` string
        - `timeout` integer — Job timeout in seconds
        - `attributes` object — Job attributes
        - `callback` string — Callback URL
  - `last_job_id` integer, nullable — ID of the last job in the list for pagination

---

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