---
title: "list declared measures and dimensions on DuckLake tables"
method: GET
path: "/w/{workspace}/data_metrics/list"
tags: ["data_metric"]
---

# list declared measures and dimensions on DuckLake tables

`GET /w/{workspace}/data_metrics/list`

Call this before writing any aggregate query over a DuckLake table. A declared measure is the canonical definition of that number, and reproducing it yourself will silently disagree with it (a `revenue` measure typically excludes refunds or test rows). Filter by `table` for one table's declarations, or by `path_prefix` (e.g. `f/analytics`) for everything declared under a folder; omit both to browse the whole catalog. Results are keyset-paged: a full page may mean more remain, so continue with the `cursor_*` params rather than assuming a measure does not exist. Use each returned `expr` verbatim, and when a measure has a `filter` write it as `expr FILTER (WHERE filter)` so measures with different predicates can share one GROUP BY. If a number you need has no declared measure, write your own aggregate as usual. Results are limited to declarations whose producing script the caller can read.

## Path parameters

- `workspace` string, required

## Query parameters

- `table` string
- `path_prefix` string
- `per_page` integer
- `cursor_table` string
- `cursor_kind` string
- `cursor_name` string
- `cursor_script` string

## Response `200`

declared measures and dimensions

- object
  - `metrics` DataMetric[], required
    - `script_path` string, required — The declaring script, and the path reads are authorized against
    - `table_path` string, required — Canonical scheme-less DuckLake path, `<lake>/<schema>.<table>` (schema defaults to `main`)
    - `kind` 'measure' | 'dimension', required
    - `name` string, required
    - `expr` string, required
    - `filter` string — Row predicate from a measure's trailing `where`
  - `next_cursor` object — Present when more rows may follow: pass its fields back as the `cursor_*` params. Absent means the catalog is exhausted.
    - `table_path` string, required
    - `kind` string, required
    - `name` string, required
    - `script_path` string, required

## Changes

> 176 revisions in range; 16 could not be searched.

- **2026-07-21** `e5b105dc7cd7` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/windmill/apis/windmill-api/changes/w/:workspace/data_metrics/list/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/7b281701c340/schema)
