# \DataMetricApi
All URIs are relative to */api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**list_data_metrics**](DataMetricApi.md#list_data_metrics) | **GET** /w/{workspace}/data_metrics/list | list declared measures and dimensions on DuckLake tables
## list_data_metrics
> models::ListDataMetrics200Response list_data_metrics(workspace, table, path_prefix, per_page, cursor_table, cursor_kind, cursor_name, cursor_script)
list declared measures and dimensions on DuckLake tables
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.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace** | **String** | | [required] |
**table** | Option<**String**> | DuckLake table path, with or without the `ducklake://` scheme | |
**path_prefix** | Option<**String**> | Producing script path prefix, e.g. `f/analytics` | |
**per_page** | Option<**i32**> | Results per page, capped at 1000 (default 1000) | |
**cursor_table** | Option<**String**> | Keyset cursor. To page, pass the previous response's `next_cursor` fields back as `cursor_*`; all four move together, and are omitted for the first page. Continue whenever `next_cursor` is present. Every returned row is one the caller may read, so the cursor never names a hidden row. | |
**cursor_kind** | Option<**String**> | | |
**cursor_name** | Option<**String**> | | |
**cursor_script** | Option<**String**> | | |
### Return type
[**models::ListDataMetrics200Response**](listDataMetrics_200_response.md)
### Authorization
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)