---
title: "Get the workspace-wide asset <-> runnable graph"
method: GET
path: "/w/{workspace}/assets/graph"
tags: ["asset"]
---

# Get the workspace-wide asset <-> runnable graph

`GET /w/{workspace}/assets/graph`

## Path parameters

- `workspace` string, required

## Query parameters

- `asset_kinds` string
- `folder` string
- `dbt_script_hash` string

## Response `200`

asset graph nodes, lineage edges and trigger edges

- AssetGraph
  - `assets` object[], required
    - `kind` 's3object' | 'resource' | 'ducklake' | 'datatable' | 'volume' | 'dbt', required
    - `path` string, required
    - `fork_materialization` 'fork' | 'deferred' — Fork workspaces only — 'fork' when this ducklake asset was materialized in the fork itself, 'deferred' when reads fall back to the parent workspace's current table via a defer view. Omitted otherwise.
    - `dbt` DbtAssetProvenance — What dbt says about the model, snapshot, seed or source that produces (or, for a source, is read at) this relation. A dbt project is one runnable node with many model assets, so per-model metadata belongs here rather than on the script.
      - `unique_id` string, required — dbt's own node id, e.g. `model.jaffle_shop.customers`.
      - `resource_type` 'model' | 'snapshot' | 'seed' | 'source', required
      - `materialized` string — dbt's own word (`table`, `view`, `incremental`, `snapshot`).
      - `materialize_strategy` string — The Windmill write strategy it maps to, absent for `view` and `ephemeral`, which have none.
      - `tags` string[]
      - `description` string
      - `data_tests` object[]
        - `kind` string, required — One of the four generic tests, or a package test's namespaced name (`dbt_utils.accepted_range`).
        - `column` string
        - `args` object
        - `severity` string — Lowercased. dbt's severity decides whether a failure fails the run.
      - `columns` object — Declared column metadata (name -> description). NOT column lineage — `manifest.json` carries none.
      - `freshness` object — A source's declared freshness policy, for the staleness chip.
      - `raw_code` string — The model's SQL as written, at the deploy this graph belongs to. Omitted when the caller cannot read the script.
      - `original_file_path` string — Its path inside the dbt project, e.g. `models/staging/stg_orders.sql`.
  - `runnables` object[], required
    - `path` string, required
    - `usage_kind` 'script' | 'flow' | 'job', required
    - `in_pipeline` boolean — True iff the script is a pipeline member (deployed with `// pipeline`). Omitted when false.
    - `macros` object[] — Macros this script provides to the workspace registry (deployed `// macros` library). Omitted when empty.
      - `name` string, required
      - `params` string, required — verbatim parameter list
      - `is_table` boolean, required
    - `dbt` object — Set on a `dbt` script, which owns a whole project rather than a single output. Omitted otherwise.
      - `model_count` integer, required
  - `edges` object[], required
    - `runnable_path` string, required
    - `runnable_kind` 'script' | 'flow' | 'job', required
    - `asset_kind` 's3object' | 'resource' | 'ducklake' | 'datatable' | 'volume' | 'dbt', required
    - `asset_path` string, required
    - `access_type` 'r' | 'w' | 'rw', nullable
  - `triggers` union[], required
    - union
      - object — Asset trigger edge (`// on <asset>`)
        - `trigger_kind` 'asset', required
        - `asset_kind` 's3object' | 'resource' | 'ducklake' | 'datatable' | 'volume' | 'dbt', required
        - `asset_path` string, required
        - `runnable_kind` 'script' | 'flow' | 'job', required
        - `runnable_path` string, required
      - object — Native trigger edge (schedule, email, kafka, ...). `path` is the trigger row's path.
        - `trigger_kind` 'schedule' | 'email' | 'kafka' | 'mqtt' | 'nats' | 'postgres' | 'sqs' | 'gcp', required
        - `path` string, required
        - `runnable_kind` 'script' | 'flow' | 'job', required
        - `runnable_path` string, required
  - `macro_edges` object[] — Macro-library → consumer edges (deploy-recorded call detection plus `// use`). Omitted when empty.
    - `lib_path` string, required
    - `consumer_path` string, required
    - `macro_names` string[], required
    - `via_use` boolean, required
  - `test_edges` object[] — Ordering-only "must-run-after" edges — a `// data_test relationships` (or custom test reading a pipeline asset) requires the referenced asset's producer to run before the tested script. Not a data-consumption edge; fed into the cascade topo-sort so cold runs order correctly. Omitted when empty.
    - `producer_kind` 'script' | 'flow' | 'job', required
    - `producer_path` string, required
    - `runnable_kind` 'script' | 'flow' | 'job', required
    - `runnable_path` string, required
    - `asset_kind` 's3object' | 'resource' | 'ducklake' | 'datatable' | 'volume' | 'dbt', required
    - `asset_path` string, required
  - `dbt_edges` object[] — `ref()` lineage BETWEEN two dbt models, in the terms the canvas draws — the relations, not dbt's node ids. Without it every model hangs off the one dbt runnable and the project reads as a flat fan-out. Omitted when empty.
    - `from_asset_path` string, required
    - `to_asset_path` string, required
  - `dbt_snapshot_job` string, uuid — The job whose own snapshot the dbt half was resolved from, when one was asked for and found. A run page polls the graph while its job runs, because a dynamic descriptor's snapshot is written mid-run, and this is what tells it to stop. Omitted when the answer came from the version's deployed graph.

## Changes

- **2026-08-01** `33c26da1e324` — 4 warning, 5 info
  - added the new `dbt` enum value to the `assets/items/kind` response property for the response status `200`
  - added the new `dbt` enum value to the `edges/items/asset_kind` response property for the response status `200`
  - added the new `dbt` enum value to the `test_edges/items/asset_kind` response property for the response status `200`
  - added the new `dbt` enum value to the `triggers/items/oneOf[subschema #1]/asset_kind` response property for the response status `200`
  - …5 more
- **2026-07-05** `3aaba0d0cbb5` — 1 info
  - added the optional property `test_edges` to the response with the `200` status
- **2026-07-05** `88b3716ecf04` — 1 info
  - added the optional property `assets/items/fork_materialization` to the response with the `200` status
- **2026-07-02** `60b6c24f5797` — 2 info
  - added the optional property `macro_edges` to the response with the `200` status
  - added the optional property `runnables/items/macros` to the response with the `200` status

[Change history](https://skmtc.dev/windmill/apis/windmill-api/changes/w/:workspace/assets/graph/get.md)

---

[API](https://skmtc.dev/windmill/apis/windmill-api.md) · [All operations](https://skmtc.dev/windmill/apis/windmill-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/windmill/windmill-api/revisions/33c26da1e324/schema)
