---
title: "Get visual tree"
method: GET
path: "/api/v1/ui/tree"
tags: ["ui"]
---

# Get visual tree

`GET /api/v1/ui/tree`

Returns the full visual tree of the application. Windows are root nodes. Use query parameters to limit depth, select a tree layer, or scope to a subtree.

## Query parameters

- `depth` integer
- `layer` 'framework' | 'native' | 'render'
- `rootId` string
- `include` string[]

## Response `200`

Array of root elements (windows) with their children.

- ElementInfoJson[] — unresolved $ref

## Other responses

- `409` — Capture is stale or a UI/native mutation or probe is temporarily busy. Retry after obtaining a fresh capture.
- `500` — Internal server error.
- `501` — Capability not implemented by the connected backend.

---

[API](https://skmtc.dev/dotnet/apis/devflow-agent-protocol.md) · [All operations](https://skmtc.dev/dotnet/apis/devflow-agent-protocol/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dotnet/devflow-agent-protocol/revisions/31dec8eed3de/schema)
