List metric groups

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

Expanding the metric groups response

LaunchDarkly supports one field for expanding the “Get metric groups” response. By default, these fields are not included in the response.

To expand the response, append the expand query parameter and add a comma-separated list with the following field:

  • experiments includes all experiments from the specific project that use the metric group

For example, expand=experiments includes the experiments field in the response.

Filtering metric groups

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

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:

Field
DescriptionSupported operators
experimentStatusThe experiment’s status. One of not_started, running, stopped, started.equals
hasConnectionsWhether the metric group has connections to experiments or guarded rollouts. One of true, false.equals
kindThe metric group kind. One of funnel, standard.equals
maintainerIdsThe metric maintainer IDs.equals
maintainerTeamKeyThe metric maintainer team key.equals
queryA “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

projectKeystringRequired

The project key

Headers

AuthorizationstringRequired

Query parameters

filterstringOptional

Accepts filter by experimentStatus, query, kind, and hasConnections. Example: filter=experimentStatus equals 'running' and query equals 'test'.

sortstringOptional

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.

expandstringOptional

A comma-separated list of properties that can reveal additional information in the response.

limitlongOptional

The number of metric groups to return in the response. Defaults to 20. Maximum limit is 50.

offsetlongOptional

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

Metric group collection response

itemslist of objects

An array of metric groups

totalCountintegerOptional

Errors