---
title: "Get a Metric"
method: GET
path: "/v1/projects/{project}/metrics/{key}"
tags: ["Metrics"]
---

# Get a Metric

`GET /v1/projects/{project}/metrics/{key}`

## Path parameters

- `key` string, required
- `project` string, required

## Response `200`

- Metric
  - `name` string, required — Name of the Metric
  - `key` string, required — Unique key by Project, can be used in the SDK / API to reference by 'key' rather than _id. Must only contain lower-case characters and `_`, `-` or `.`.
  - `description` string — Metric description.
  - `_id` string, required — A unique Metric ID
  - `_project` string, required — The Project owning the Metric
  - `source` 'api' | 'dashboard' | 'importer' | 'github.code_usages' | 'github.pr_insights' | 'gitlab.code_usages' | 'gitlab.pr_insights' | 'bitbucket.code_usages' | 'bitbucket.pr_insights' | 'terraform' | 'cli' | 'slack' | 'mcp' — Source that created the Metric
  - `event` string, required — Event associated with metric
  - `dimension` 'COUNT_PER_UNIQUE_USER' | 'COUNT_PER_VARIABLE_EVALUATION' | 'SUM_PER_UNIQUE_USER' | 'AVERAGE_PER_UNIQUE_USER' | 'TOTAL_AVERAGE' | 'TOTAL_SUM', required — Metric dimension
  - `optimize` 'increase' | 'decrease', required — Indicates whether the metric is optimized for increase or decreasae
  - `createdAt` string, date-time, required — The date the Metric was created
  - `updatedAt` string, date-time, required — The date the Metric was last updated

## Other responses

- `401`
- `403`
- `404`

---

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