---
title: "List metric attributes"
method: GET
path: "/internal/v1/metrics/{project_id}/attributes"
tags: ["Metrics"]
---

# List metric attributes

`GET /internal/v1/metrics/{project_id}/attributes`

List available attribute keys for metrics. Returns attribute keys with their kind (str, int, float), unit, and count (how many metrics use each attribute). Use the search parameter to filter by metric name. Use this to discover which attributes are available for group by in dashboard queries.

## Path parameters

- `project_id` integer, required

## Query parameters

- `time_start` string, date-time, required — RFC3339 timestamp.
- `time_end` string, date-time, required — RFC3339 timestamp.
- `search` string

## Response `200`

Attribute keys list.

- ListMetricAttributesResponse
  - `items` MetricAttributeKey[], required
    - `value` string, required — Attribute key with type suffix (e.g. host_name::str).
    - `title` string — Display label for the attribute. When empty, clients fall back to value.
    - `subtitle` string — Additional context shown below the title in autocomplete lists.
    - `kind` string, required — Attribute type: str, int, float.
    - `unit` string — Attribute unit.
    - `pinned` boolean — Whether the attribute is pinned.
    - `count` integer — Number of metrics using this attribute.
  - `noData` boolean — True when no attributes exist for the project at all (independent of the current filter).
  - `whereAttrs` object — Map of WHERE attribute names to their matched values, derived from the parsed query.

## Other responses

- `400` — Invalid request
- `401` — Authentication required
- `403` — Insufficient permissions

---

[API](https://skmtc.net/uptrace/apis/uptrace-json-api.md) · [All operations](https://skmtc.net/uptrace/apis/uptrace-json-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/uptrace/uptrace-json-api/revisions/550c8881ab9a/schema)
