---
title: "GET /api/agent/v1/metric/{id}"
method: GET
path: "/api/agent/v1/metric/{id}"
tags: ["/api/agent"]
---

# GET /api/agent/v1/metric/{id}

`GET /api/agent/v1/metric/{id}`

Get details for a metric by ID.

## Path parameters

- `id` integer, required

## Query parameters

- `with-default-temporal-breakout` boolean, nullable
- `with-field-values` boolean, nullable
- `with-queryable-dimensions` boolean, nullable
- `with-segments` boolean, nullable

## Response `2XX`

Successful response

- MetabaseAgentApiApiMetric — A metric with its queryable dimensions and segments. The default_time_dimension_field_id is the field_id of the recommended time dimension for temporal breakouts.
  - `default_time_dimension_field_id` union — Field id as accepted by agent_api endpoints — either a real app-DB field id (positive integer) or a string alias for expression/aggregation columns.
    - integer — Valid Field ID
    - string
  - `description` string, nullable
  - `id` integer, required
  - `name` string, required
  - `queryable_dimensions` MetabaseAgentApiApiField[], nullable
    - `base_type` string, nullable
    - `coercion_strategy` string, nullable
    - `database_type` string, nullable
    - `description` string, nullable
    - `display_name` string, required
    - `effective_type` string, nullable
    - `field_id` union, required — Field id as accepted by agent_api endpoints — either a real app-DB field id (positive integer) or a string alias for expression/aggregation columns.
      - integer — Valid Field ID
      - string
    - `field_values` unknown[], nullable
      - unknown
    - `name` string, required
    - `semantic_type` string, nullable
    - `type` 'boolean' | 'date' | 'datetime' | 'time' | 'number' | 'string' — A data type for a field derived from Metabase's type hierarchy.
  - `segments` MetabaseAgentApiApiSegment[], nullable
    - `description` string, nullable
    - `display_name` string, nullable
    - `id` integer, required
    - `name` string, required
  - `type` 'metric', required
  - `verified` boolean, nullable

## Other responses

- `4XX` — Client error response
- `5XX` — Server error response

## Changes

> 13 revisions in range; 1 could not be searched.

- **2026-05-22** `b1dc4ea67567` — 3 breaking, 7 info
  - added `#/components/schemas/metabase.agent-api.api.field-id` to the `default_time_dimension_field_id` response property `oneOf` list for the response status `2XX`
  - added `#/components/schemas/metabase.agent-api.api.field-type` to the `queryable_dimensions/oneOf[subschema #1]/items/type` response property `oneOf` list for the response status `2XX`
  - the `queryable_dimensions/oneOf[subschema #1]/items/field_id` response's property type/format changed from `string`/`` to ``/`` for status `2XX`
  - added the optional property `queryable_dimensions/oneOf[subschema #1]/items/base_type` to the response with the `2XX` status
  - …6 more
- **2026-03-09** `78297d193ca4` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/metabase/apis/metabase-api/changes/api/agent/v1/metric/:id/get.md)

---

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