---
title: "List metric groups"
method: GET
path: "/api/v2/projects/{projectKey}/metric-groups"
tags: ["Metrics (beta)"]
---

# List metric groups

`GET /api/v2/projects/{projectKey}/metric-groups`

Get a list of all metric groups for the specified project.

### Expanding the metric groups response

This endpoint does not support response expansion.

Although the API accepts an `expand` query parameter for compatibility reasons, it does not currently modify the response. The parameter is reserved for future use.

### Filtering metric groups

The `filter` parameter supports the following operators: `contains`, `equals`, `anyOf`.

#### Supported fields and operators

You can only filter certain fields in metrics when using the `filter` parameter. Additionally, you can only filter some fields with certain operators.

When you search for metrics, the `filter` parameter supports the following fields and operators:

|<div style="width:120px">Field</div> |Description |Supported operators |
|---|---|---|
| `experimentStatus` | The experiment's status. One of `not_started`, `running`, `stopped`, `started`. | `equals` |
| `hasConnections` | Whether the metric group has connections to experiments or guarded rollouts. One of `true`, `false`. | `equals` |
| `kind` | The metric group kind. One of `funnel`, `standard`. | `equals` |
| `maintainerIds` | The metric maintainer IDs. | `anyOf` |
| `maintainerTeamKey` | The metric maintainer team key. | `equals` |
| `query` | A "fuzzy" search across metric group key and name. Supply a string or list of strings to the operator. | `equals` |

### Sorting metric groups

LaunchDarkly supports the following fields for sorting:

- `name` sorts by metric group name.
- `createdAt` sorts by the creation date of the metric group.
- `connectionCount` sorts by the number of connections to experiments the metric group has.

By default, the sort is in ascending order. Use `-` to sort in descending order. For example, `?sort=name` sorts the response by metric group name in ascending order, and `?sort=-name` sorts in descending order.

#### Sample query

`filter=experimentStatus equals 'not_started' and query equals 'metric name'`

## Path parameters

- `projectKey` string, string, required — The project key

## Query parameters

- `filter` string, string — Accepts filter by `experimentStatus`, `query`, `kind`, `hasConnections`, `maintainerIds`, and `maintainerTeamKey`. Example: `filter=experimentStatus equals 'running' and query equals 'test'`.
- `sort` string, string — A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order. Read the endpoint description for a full list of available sort fields.
- `expand` string, string — This parameter is reserved for future use and is not currently supported on this endpoint.
- `limit` integer — The number of metric groups to return in the response. Defaults to 20. Maximum limit is 50.
- `offset` integer — Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and returns the next `limit` items.

## Response `200`

Metric group collection response

- MetricGroupCollectionRep
  - `items` MetricGroupRep[], required — An array of metric groups
    - `_id` string, required — The ID of this metric group
    - `key` string, required — A unique key to reference the metric group
    - `name` string, required — A human-friendly name for the metric group
    - `kind` 'funnel' | 'standard' | 'guardrail', required — The type of the metric group
    - `description` string — Description of the metric group
    - `_links` object, required — The location and content type of related resources
    - `_access` Access
      - `denied` AccessDenied[], required
        - `action` string, required
        - `reason` AccessDeniedReason, required
          - `resources` string[] — Resource specifier strings
          - `notResources` string[] — Targeted resources are the resources NOT in this list. The <code>resources</code> and <code>notActions</code> fields must be empty to use this field.
          - `actions` ActionSpecifier[] — Actions to perform on a resource
          - `notActions` ActionSpecifier[] — Targeted actions are the actions NOT in this list. The <code>actions</code> and <code>notResources</code> fields must be empty to use this field.
          - `effect` 'allow' | 'deny', required — Whether this statement should allow or deny actions on the resources.
          - `role_name` string
      - `allowed` AccessAllowedRep[], required
        - `action` string, required
        - `reason` AccessAllowedReason, required
          - `resources` string[] — Resource specifier strings
          - `notResources` string[] — Targeted resources are the resources NOT in this list. The <code>resources</code> and <code>notActions</code> fields must be empty to use this field.
          - `actions` ActionSpecifier[] — Actions to perform on a resource
          - `notActions` ActionSpecifier[] — Targeted actions are the actions NOT in this list. The <code>actions</code> and <code>notResources</code> fields must be empty to use this field.
          - `effect` 'allow' | 'deny', required — Whether this statement should allow or deny actions on the resources.
          - `role_name` string
    - `tags` string[], required — Tags for the metric group
    - `_creationDate` integer, required
    - `_lastModified` integer, required
    - `maintainer` MaintainerRep, required
      - `member` MemberSummary
        - `_links` object, required — The location and content type of related resources
        - `_id` string, required — The member's ID
        - `firstName` string — The member's first name
        - `lastName` string — The member's last name
        - `role` string, required — The member's base role. If the member has no additional roles, this role will be in effect.
        - `email` string, required — The member's email address
      - `team` MemberTeamSummaryRep
        - `customRoleKeys` string[], required — A list of keys of the custom roles this team has access to
        - `key` string, required — The team key
        - `_links` object
        - `name` string, required — The team name
    - `metrics` MetricInGroupRep[], required — An ordered list of the metrics in this metric group
      - `key` string, required — The metric key
      - `_versionId` string — The version ID of the metric
      - `name` string, required — The metric name
      - `kind` 'pageview' | 'click' | 'custom', required — The kind of event the metric tracks
      - `isNumeric` boolean — For custom metrics, whether to track numeric changes in value against a baseline (<code>true</code>) or to track a conversion when an end user takes an action (<code>false</code>).
      - `unitAggregationType` 'sum' | 'average' — The type of unit aggregation to use for the metric
      - `eventKey` string — The event key sent with the metric. Only relevant for custom metrics.
      - `_links` object, required — The location and content type of related resources
      - `nameInGroup` string — Name of the metric when used within the associated metric group. Can be different from the original name of the metric. Required if and only if the metric group is a <code>funnel</code>.
      - `randomizationUnits` string[] — The randomization units for the metric
    - `_version` integer, required — The version of this metric group
    - `experiments` DependentExperimentRep[]
      - `key` string, required — The experiment key
      - `name` string, required — The experiment name
      - `environmentId` string, required — The environment ID
      - `environmentKey` string, required — The environment key
      - `creationDate` integer, required
      - `archivedDate` integer
      - `_links` object, required — The location and content type of related resources
    - `experimentCount` integer — The number of experiments using this metric group
    - `activeExperimentCount` integer — The number of active experiments using this metric group
    - `activeGuardedRolloutCount` integer — The number of active guarded rollouts using this metric group
  - `_links` object — The location and content type of related resources
  - `totalCount` integer

## Other responses

- `400` — Invalid request
- `401` — Invalid access token
- `403` — Forbidden
- `404` — Invalid resource identifier
- `405` — Method not allowed
- `429` — Rate limited

## Changes

- **2026-02-28** `69c5c9aafe78` — 3 info
  - added the optional property `items/items/activeExperimentCount` to the response with the `200` status
  - added the optional property `items/items/activeGuardedRolloutCount` to the response with the `200` status
  - added the optional property `items/items/metrics/items/eventKey` to the response with the `200` status
- **2025-07-08** `b2724c5174d1` — 1 warning
  - added the new `guardrail` enum value to the `items/items/kind` response property for the response status `200`

[Change history](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api/changes/api/v2/projects/:projectKey/metric-groups/get.md)

---

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