Read one Ledger metric with its readings
ledger_metrics_getOne metric's definition (unit, kind, direction, target, cadence) plus its readings newest first and the open decisions bound to it. Use before answering 'how is X trending?' or before recording a reading against it. metricId accepts the id or the snake_case slug from ledger_metrics_list. For an event metric whose readings carry labels, labels lists each label and its values, largest total first. Pass slice to get the series for part of it ("new users in DE"), or by to split the series by one label ("new users by country"); either returns series, summed per bucket.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | No | Event metrics only. A label name to split the series by. | |
| slice | No | Event metrics only. Per label, the values to keep: { country: ["DE", "AT"] } keeps readings from DE or AT; several labels must all match. Names and values come from `labels`. | |
| bucket | No | Series bucket when `slice` or `by` is set. Default week. | |
| metricId | Yes | Metric id or slug (from ledger_metrics_list). | |
| workspace | No | Workspace slug. Personal tokens with no default workspace MUST pass this; tokens with a default can override per call. Ignored for workspace API keys. |