---
title: "Get a workflow run and every sub-workflow run below it"
method: GET
path: "/api/workflow-runs/{id}/tree"
tags: ["Workflows"]
---

# Get a workflow run and every sub-workflow run below it

`GET /api/workflow-runs/{id}/tree`

## Request

- Base URL: `http://localhost:3013`
- URL: `http://localhost:3013/api/workflow-runs/{id}/tree`
- Auth: HTTP bearer

Follows stored parent links (`parentStepId` → step → run) through every attempt of every step, terminal runs included. `runs` holds list rows without `context`, root first. `hasOpenWork` is true while any run in the tree is live, has a pending, running or waiting step, a queued retry, an open task or a pending approval; after a cancel it turns false once the tree has settled. Both come from one read snapshot. The tree is not paginated. Links that form a cycle or nest deeper than 32 levels return 409.

## Path parameters

- `id` string, required

## Response `200`

The run tree

- object
  - `rootRunId` string, required
  - `runs` WorkflowRunSummary[], required
    - `id` string, uuid, required
    - `workflowId` string, uuid, required
    - `status` 'running' | 'waiting' | 'completed' | 'failed' | 'skipped' | 'cancelled', required
    - `triggerData` unknown
    - `error` string
    - `createdBy` string
    - `startedAt` string, required
    - `lastUpdatedAt` string, required
    - `finishedAt` string
    - `parentStepId` string
    - `parentStepAttempt` integer
  - `hasOpenWork` boolean, required

## Other responses

- `404`: Run not found
- `409`: Stored parent links form a cycle or nest past the depth bound

## Changes

- **2026-10-25** `653be26f6c92`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/changes/api/workflow-runs/:id/tree/get.md)

---

[API](https://skmtc.dev/desplega-ai/apis/agent-swarm-api.md) - [All operations](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/llms.txt) - [OpenAPI document](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/revisions/7e4c7198192a?raw)
