---
title: "List feature flags"
method: GET
path: "/api/v2/flags/{projectKey}"
tags: ["Feature flags"]
---

# List feature flags

`GET /api/v2/flags/{projectKey}`

Get a list of all feature flags in the given project. You can include information specific to different environments by adding `env` query parameter. For example, setting `env=production` adds configuration details about your production environment to the response. You can also filter feature flags by tag with the `tag` query parameter.

> #### Recommended use
>
> This endpoint can return a large amount of information. We recommend using some or all of these query parameters to decrease response time and overall payload size: `limit`, `env`, `query`, and `filter=creationDate`.

### Filtering flags

You can filter on certain fields using the `filter` query parameter. For example, setting `filter=query:dark-mode,tags:beta+test` matches flags with the string `dark-mode` in their key or name, ignoring case, which also have the tags `beta` and `test`.

The `filter` query parameter supports the following arguments:

| Filter argument       | Description | Example              |
|-----------------------|-------------|----------------------|
| `applicationEvaluated`  | A string. It filters the list to flags that are evaluated in the application with the given key. | `filter=applicationEvaluated:com.launchdarkly.cafe` |
| `archived`              | (deprecated) A boolean value. It filters the list to archived flags. | Use `filter=state:archived` instead |
| `contextKindsEvaluated` | A `+`-separated list of context kind keys. It filters the list to flags which have been evaluated in the past 30 days for all of the context kinds in the list. | `filter=contextKindsEvaluated:user+application` |
| `codeReferences.max`    | An integer value. Use `0` to return flags that do not have code references. | `filter=codeReferences.max:0` |
| `codeReferences.min`    | An integer value. Use `1` to return flags that do have code references. | `filter=codeReferences.min:1` |
| `creationDate`          | An object with an optional `before` field whose value is Unix time in milliseconds. It filters the list to flags created before the date. | `filter=creationDate:{"before":1690527600000}` |
| `evaluated`             | An object that contains a key of `after` and a value in Unix time in milliseconds. It filters the list to all flags that have been evaluated since the time you specify, in the environment provided. This filter requires the `filterEnv` filter. | `filter=evaluated:{"after":1690527600000},filterEnv:production` |
| `filterEnv`             | A valid environment key. You must use this field for filters that are environment-specific. If there are multiple environment-specific filters, you only need to include this field once. | `filter=evaluated:{"after": 1590768455282},filterEnv:production` |
| `guardedRollout` | A string, one of `any`, `monitoring`, `regressed`, `rolledBack`, `completed`, `archived`. It filters the list to flags that are part of guarded rollouts. | `filter=guardedRollout:monitoring` |
| `hasExperiment`         | A boolean value. It filters the list to flags that are used in an experiment. | `filter=hasExperiment:true` |
| `maintainerId`          | A valid member ID. It filters the list to flags that are maintained by this member. | `filter=maintainerId:12ab3c45de678910abc12345` |
| `maintainerTeamKey`     | A string. It filters the list to flags that are maintained by the team with this key. | `filter=maintainerTeamKey:example-team-key` |
| `query`                 | A string. It filters the list to flags that include the specified string in their key or name. It is not case sensitive. | `filter=query:example` |
| `releasePipeline`       | A release pipeline key. It filters the list to flags that are either currently active in the release pipeline or have completed the release pipeline. | `filter=releasePipeline:default-release-pipeline` |
| `state`                 | A string, either `live`, `deprecated`, or `archived`. It filters the list to flags in this state. | `filter=state:archived` |
| `sdkAvailability`       | A string, one of `client`, `mobile`, `anyClient`, `server`. Using `client` filters the list to flags whose client-side SDK availability is set to use the client-side ID. Using `mobile` filters to flags set to use the mobile key. Using `anyClient` filters to flags set to use either the client-side ID or the mobile key. Using `server` filters to flags set to use neither, that is, to flags only available in server-side SDKs.  | `filter=sdkAvailability:client` |
| `tags`                  | A `+`-separated list of tags. It filters the list to flags that have all of the tags in the list. | `filter=tags:beta+test` |
| `type`                  | A string, either `temporary` or `permanent`. It filters the list to flags with the specified type. | `filter=type:permanent` |

The documented values for the `filter` query are prior to URL encoding. For example, the `+` in `filter=tags:beta+test` must be encoded to `%2B`.

By default, this endpoint returns all flags. You can page through the list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the returned `_links` field. These links will not be present if the pages they refer to don't exist. For example, the `first` and `prev` links will be missing from the response on the first page.

### Sorting flags

You can sort flags based on the following fields:

- `creationDate` sorts by the creation date of the flag.
- `key` sorts by the key of the flag.
- `maintainerId` sorts by the flag maintainer.
- `name` sorts by flag name.
- `tags` sorts by tags.
- `targetingModifiedDate` sorts by the date that the flag's targeting rules were last modified in a given environment. It must be used with `env` parameter and it can not be combined with any other sort. If multiple `env` values are provided, it will perform sort using the first one. For example, `sort=-targetingModifiedDate&env=production&env=staging` returns results sorted by `targetingModifiedDate` for the `production` environment.
- `type` sorts by flag type

All fields are sorted in ascending order by default. To sort in descending order, prefix the field with a dash ( - ). For example, `sort=-name` sorts the response by flag name in descending order.

### Expanding response

LaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields:

- `codeReferences` includes code references for the feature flag
- `evaluation` includes evaluation information within returned environments, including which context kinds the flag has been evaluated for in the past 30 days
- `migrationSettings` includes migration settings information within the flag and within returned environments. These settings are only included for migration flags, that is, where `purpose` is `migration`.

For example, `expand=evaluation` includes the `evaluation` field in the response.

### Migration flags
For migration flags, the cohort information is included in the `rules` property of a flag's response, and default cohort information is included in the `fallthrough` property of a flag's response.
To learn more, read [Migration Flags](https://launchdarkly.com/docs/home/flags/migration).

## Path parameters

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

## Query parameters

- `env` string, string — Filter configurations by environment
- `tag` string, string — Filter feature flags by tag
- `limit` integer — The number of feature flags to return. Defaults to 20.
- `offset` integer — Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.
- `archived` boolean — Deprecated, use `filter=archived:true` instead. A boolean to filter the list to archived flags. When this is absent, only unarchived flags will be returned
- `summary` boolean — By default, flags do _not_ include their lists of prerequisites, targets, or rules for each environment. Set `summary=0` and include the `env` query parameter to include these fields for each flag returned.
- `filter` string, string — A comma-separated list of filters. Each filter is of the form field:value. Read the endpoint description for a full list of available filter fields.
- `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.
- `compare` boolean — Deprecated, unavailable in API version `20240415`. A boolean to filter results by only flags that have differences between environments.
- `expand` string, string — A comma-separated list of fields to expand in the response. Supported fields are explained above.

## Response `200`

Global flags collection response

- FeatureFlags
  - `items` FeatureFlag[], required — An array of feature flags
    - `name` string, required — A human-friendly name for the feature flag
    - `kind` 'boolean' | 'multivariate', required — Kind of feature flag
    - `description` string — Description of the feature flag
    - `key` string, required — A unique key used to reference the flag in your code
    - `_version` integer, required — Version of the feature flag
    - `creationDate` integer, required
    - `includeInSnippet` boolean — Deprecated, use <code>clientSideAvailability</code>. Whether this flag should be made available to the client-side JavaScript SDK
    - `clientSideAvailability` ClientSideAvailability
      - `usingMobileKey` boolean
      - `usingEnvironmentId` boolean
    - `variations` Variation[], required — An array of possible variations for the flag
      - `_id` string — The ID of the variation. Leave empty when you are creating a flag.
      - `value` unknown, required
      - `description` string — Description of the variation. Defaults to an empty string, but is omitted from the response if not set.
      - `name` string — A human-friendly name for the variation. Defaults to an empty string, but is omitted from the response if not set.
    - `temporary` boolean, required — Whether the flag is a temporary flag
    - `tags` string[], required — Tags for the feature flag
    - `_links` object, required — The location and content type of related resources
    - `maintainerId` string — Associated maintainerId for the feature flag
    - `_maintainer` 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
    - `maintainerTeamKey` string — The key of the associated team that maintains this feature flag
    - `_maintainerTeam` MaintainerTeam
      - `key` string, required — The key of the maintainer team
      - `name` string, required — A human-friendly name for the maintainer team
      - `_links` object — The location and content type of related resources
    - `goalIds` string[] — Deprecated, use <code>experiments</code> instead
    - `experiments` ExperimentInfoRep, required
      - `baselineIdx` integer, required
      - `items` LegacyExperimentRep[], required
        - `metricKey` string
        - `_metric` MetricListingRep
          - `experimentCount` integer — The number of experiments using this metric
          - `metricGroupCount` integer — The number of metric groups using this metric
          - `activeExperimentCount` integer — The number of active experiments using this metric
          - `activeGuardedRolloutCount` integer — The number of active guarded rollouts using this metric
          - `_id` string, required — The ID of this metric
          - `_versionId` string, required — The version ID of the metric
          - `_version` integer — Version of the metric
          - `key` string, required — A unique key to reference the metric
          - `name` string, required — A human-friendly name for the metric
          - `kind` 'pageview' | 'click' | 'custom', required — The kind of event the metric tracks
          - `_attachedFlagCount` integer — The number of feature flags currently attached to this metric
          - `_links` object, required — The location and content type of related resources
          - `_site` Link
            - `href` string
            - `type` string
          - `_access` Access
            - `denied` AccessDenied[], required
              - …
            - `allowed` AccessAllowedRep[], required
              - …
          - `tags` string[], required — Tags for the metric
          - `_creationDate` integer, required
          - `lastModified` Modification
            - `date` string, date-time
          - `maintainerId` string — The ID of the member who maintains this metric
          - `_maintainer` 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
          - `description` string — Description of the metric
          - `category` string — The category of the metric
          - `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>).
          - `successCriteria` 'HigherThanBaseline' | 'LowerThanBaseline' — For custom metrics, the success criteria
          - `unit` string — For numeric custom metrics, the unit of measure
          - `eventKey` string — For custom metrics, the event key to use in your code
          - `randomizationUnits` string[] — An array of randomization units allowed for this metric
          - `filters` Filter
            - `type` 'group' | 'contextAttribute' | 'eventProperty', required — Filter type. One of [contextAttribute, eventProperty, group]
            - `attribute` string — If not a group node, the context attribute name or event property name to filter on
            - `op` string, required
            - `values` unknown[], required — The context attribute / event property values or group member nodes
              - …
            - `contextKind` string — For context attribute filters, the context kind.
            - `negate` boolean, required — If set, then take the inverse of the operator. 'in' becomes 'not in'.
          - `unitAggregationType` 'average' | 'sum' — The method by which multiple unit event values are aggregated
          - `analysisType` 'mean' | 'percentile' — The method for analyzing metric events
          - `percentileValue` integer — The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when <code>analysisType</code> is <code>percentile</code>.
          - `eventDefault` MetricEventDefaultRep
            - `disabled` boolean — Whether to disable defaulting missing unit events when calculating results. Defaults to false
            - `value` number — The default value applied to missing unit events. Set to 0 when <code>disabled</code> is false. No other values are currently supported.
          - `dataSource` MetricDataSourceRefRep, required
            - `key` string, required
            - `environmentKey` string
            - `_name` string
            - `_integrationKey` string
          - `lastSeen` integer
          - `archived` boolean — Whether the metric version is archived
          - `archivedAt` integer
          - `selector` string — For click metrics, the CSS selectors
          - `urls` UrlMatcher[]
        - `environments` string[]
        - `_environmentSettings` object
    - `customProperties` CustomProperties, required
    - `archived` boolean, required — Boolean indicating if the feature flag is archived
    - `archivedDate` integer
    - `deprecated` boolean — Boolean indicating if the feature flag is deprecated
    - `deprecatedDate` integer
    - `defaults` Defaults
      - `onVariation` integer, required — The index, from the array of variations for this flag, of the variation to serve by default when targeting is on.
      - `offVariation` integer, required — The index, from the array of variations for this flag, of the variation to serve by default when targeting is off.
    - `_purpose` string
    - `migrationSettings` FlagMigrationSettingsRep
      - `contextKind` string — The context kind targeted by this migration flag. Only applicable for six-stage migrations.
      - `stageCount` integer — The number of stages for this migration flag
    - `environments` object — Details on the environments for this flag. Only returned if the request is filtered by environment, using the <code>filterEnv</code> query parameter.
  - `_links` object, required — The location and content type of related resources
  - `totalCount` integer — The total number of flags
  - `totalCountWithDifferences` integer — The number of flags that have differences between environments. Only shown when query parameter <code>compare</code> is <code>true</code>.

## Other responses

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

## Changes

- **2026-02-28** `69c5c9aafe78` — 10 info
  - added the optional property `items/items/environments/additionalProperties/rules/items/disabled` to the response with the `200` status
  - added the optional property `items/items/experiments/items/items/_metric/_version` to the response with the `200` status
  - added the optional property `items/items/experiments/items/items/_metric/activeExperimentCount` to the response with the `200` status
  - added the optional property `items/items/experiments/items/items/_metric/activeGuardedRolloutCount` to the response with the `200` status
  - …6 more

[Change history](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api/changes/api/v2/flags/:projectKey/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)
