---
title: "Read Metric Source"
method: GET
path: "/console/v1/metrics/metric_source/{name}"
tags: ["Metrics", "Metrics (Warehouse Native)"]
---

# Read Metric Source

`GET /console/v1/metrics/metric_source/{name}`

## Path parameters

- `name` string, required

## Response `200`

Read metric source response

- object
  - `message` string, required — A simple string explaining the result of the operation.
  - `data` object, required — A single result.
    - `name` string, required — The name of the source, serving as its primary identifier.
    - `description` string, required — A detailed description of the source, providing context and usage information.
    - `tags` string[] — Optional tags for categorizing the source and improving searchability.
    - `sql` string, required — The SQL query or statement used to extract data from the source.
    - `timestampColumn` string, required — The name of the column containing timestamp data for the source.
    - `timestampAsDay` boolean — Indicates whether the timestamp should be treated as a day-level granularity.
    - `idTypeMapping` object[], required — Array defining the mapping between Statsig unit IDs and their respective source columns.
      - `statsigUnitID` string, required — The identifier mapping for Statsig units.
      - `column` string, required — The corresponding column name in the source that relates to the Statsig unit ID.
    - `sourceType` 'table' | 'query' — The type of source, indicating whether it is a database table or a custom query.
    - `tableName` string — The name of the database table if the source type is "table".
    - `datePartitionColumn` string — The name of the date partition column if the source type is "table". Can be undefined.
    - `customFieldMapping` object[] — Optional array defining mappings for custom fields using specific formulas.
      - `key` string, required — The identifier for the custom field mapping.
      - `formula` string, required — The formula or expression used to compute the custom field value.
    - `isReadOnly` boolean — Specifies if the source can only be edited via the Console API.
    - `isVerified` boolean — Marks the metric source as verified, indicating trustworthiness within the organization.
    - `disableCURE` boolean — Disable CURE for all metrics built from this metric source
    - `owner` object, nullable — Schema for owner data including ID, type, name.
      - `ownerID` string — ID of the owner
      - `ownerType` string — Type of the owner (e.g., SDK_KEY or USER)
      - `ownerName` string — The name of the owner. This field is optional.
      - `ownerEmail` string — The email of the owner. This field is optional.
    - `team` string, nullable — Optional field indicating the team name responsible for the metric source, aiding in accountability and management.
    - `teamID` string, nullable — Optional field indicating the team ID responsible for the metric source, aiding in accountability and management.

## Other responses

- `400` — Invalid request. Please check the request input and try again.
- `401` — This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx

---

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