---
title: "Get the job dependency graph for a batch"
method: GET
path: "/api/v1alpha/batches/{batch_id}/job_graph"
tags: ["Batches API v1Alpha"]
---

# Get the job dependency graph for a batch

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

## Request

- Base URL: `{{ base_url }}`
- URL: `{{ base_url }}/api/v1alpha/batches/{batch_id}/job_graph`
- Auth: none declared

Get every job's parent ids for the whole batch, for rendering a job dependency DAG. Jobs with no parents have an empty parent_ids array. Paginated by job_offset — see JobOffsetPagination. Job metadata (name, state) is not included here; join client-side against the existing jobs list endpoint by job_id.

## Path parameters

- `batch_id` number, required

## Query parameters

- `job_offset` integer
- `page_size` integer

## Response `200`

Successfully retrieved the job graph for the batch.

- JobGraphResponse
  - `data` JobGraphEntry[]
    - `job_id` integer: ID of the job
    - `parent_ids` integer[]: IDs of this job's parents
  - `pagination` JobOffsetPagination: Pagination info shared by endpoints that page over a batch's jobs by job_offset (see the job_offset/page_size query params on those endpoints).
    - `current_job_offset` integer: The job_offset that produced this page.
    - `next_page_job_offset` integer, nullable: The job_offset to request for the next page. Null if this is the last page.
    - `page_size` integer: The page_size that produced this page.
    - `total_jobs` integer: Total number of jobs in the batch.

## Changes

- **2026-09-16** `8faaa449f4de`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/hail-is/apis/hail-services/changes/api/v1alpha/batches/:batch_id/job_graph/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.dev/hail-is/apis/hail-services/revisions/cc95ba1cb4af?raw)
