---
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

---

[API](https://skmtc.net/metabase/apis/metabase-api.md) · [All operations](https://skmtc.net/metabase/apis/metabase-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/metabase/metabase-api/versions/08b5a2bafb4f/schema)
