---
title: "Where a metric is used"
method: GET
path: "/api/{org_id}/metrics/{metric_name}/usage"
tags: ["Metrics"]
---

# Where a metric is used

`GET /api/{org_id}/metrics/{metric_name}/usage`

## Request

- Base URL: `https://api.openobserve.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openobserve.ai/api/{org_id}/metrics/{metric_name}/usage`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/openobserve/apis/openobserve-api-http/docs/api/:org_id/metrics/:metric_name/usage/get.ts> (a function with typed inputs; its response is checked against the schema)

Lists the dashboards, alerts, SLOs and scheduled pipelines the caller can read whose queries reference the metric

## Path parameters

- `org_id` string, required
- `metric_name` string, required

## Response `200`

Success

- MetricUsage: The objects that use a metric, and how many unparseable queries name it.
  - `alerts` AlertUsage[], required
    - `folder_id` string, required
    - `id` string, required
    - `match` 'text': How an object was matched when no query referencing the metric could be parsed.
    - `name` string, required
  - `dashboards` DashboardUsage[], required
    - `folder_id` string, required
    - `id` string, required
    - `match` 'text': How an object was matched when no query referencing the metric could be parsed.
    - `title` string, required
  - `pipelines` ObjectUsage[], required
    - `id` string, required
    - `match` 'text': How an object was matched when no query referencing the metric could be parsed.
    - `name` string, required
  - `slos` ObjectUsage[], required
    - `id` string, required
    - `match` 'text': How an object was matched when no query referencing the metric could be parsed.
    - `name` string, required
  - `unparsed` integer, required: Queries that name the metric but could not be parsed, so matched only as text.

## Other responses

- `500`: Internal Server Error

---

[API](https://skmtc.dev/openobserve/apis/openobserve-api-http.md) - [All operations](https://skmtc.dev/openobserve/apis/openobserve-api-http/llms.txt) - [OpenAPI document](https://skmtc.dev/openobserve/apis/openobserve-api-http/revisions/0529b8a10252?raw)
