---
title: "Get all jobs in a batch"
method: GET
path: "/api/v1alpha/batches/{batch_id}/jobs"
tags: ["Batches API v1Alpha"]
---

# Get all jobs in a batch

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

Get all jobs in a batch by ID.

## Path parameters

- `batch_id` number, required

## Response `200`

Successfully retrieved the jobs in the batch.

- JobListResponse
  - `jobs` JobResponse[]
    - `batch_id` integer — ID of the batch this job belongs to
    - `job_id` integer — The job ID
    - `job_group_id` integer — ID of the job group this job belongs to
    - `name` string, nullable — Name of the job
    - `user` string — User who owns the job
    - `billing_project` string — Billing project for the job
    - `state` 'Pending' | 'Ready' | 'Creating' | 'Running' | 'Failed' | 'Cancelled' | 'Error' | 'Success' — Current state of the job
    - `display_state` string, nullable — Human-readable display state
    - `exit_code` integer, nullable — Exit code of the job
    - `duration` number, nullable — Duration of the job in milliseconds
    - `start_time` string, date-time, nullable — When the job started
    - `end_time` string, date-time, nullable — When the job ended
    - `cost` number, nullable — Total cost of the job in USD
    - `msec_mcpu` integer — Millisecond milli-CPU usage
    - `cost_breakdown` CostBreakdownEntry[] — Per-resource cost breakdown
      - `resource` string — Name of the resource
      - `cost` number — Cost for this resource in USD
    - `always_run` boolean — Whether the job runs regardless of the batch's success state
    - `n_max_attempts` integer — Maximum number of times this job will be attempted
    - `inst_coll` string, nullable — Instance collection the job ran on
    - `attributes` object, nullable — Key-value pairs of attributes for the job
    - `status` object, nullable — Detailed job status
    - `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)
