Skip to main content
GET
/
api
/
v2
/
flags
/
{projectKey}
List feature flags
curl --request GET \
  --url https://app.launchdarkly.com/api/v2/flags/{projectKey} \
  --header 'Authorization: <api-key>'
{
  "items": [
    {
      "name": "My Flag",
      "kind": "boolean",
      "key": "flag-key-123abc",
      "_version": 1,
      "creationDate": "1494437420312",
      "variations": [
        {
          "_id": "e432f62b-55f6-49dd-a02f-eb24acf39d05",
          "value": true
        },
        {
          "_id": "a00bf58d-d252-476c-b915-15a74becacb4",
          "value": false
        }
      ],
      "temporary": true,
      "tags": [
        "example-tag"
      ],
      "_links": {
        "parent": {
          "href": "/api/v2/flags/my-project",
          "type": "application/json"
        },
        "self": {
          "href": "/api/v2/flags/my-project/my-flag",
          "type": "application/json"
        }
      },
      "experiments": "{\"baselineIdx\": 0,\"items\": []}",
      "customProperties": "{\"jira.issues\":{\"name\":\"Jira issues\",\"value\":[\"is-123\",\"is-456\"]}}",
      "archived": false,
      "description": "This flag controls the example widgets",
      "includeInSnippet": true,
      "clientSideAvailability": "{\"usingMobileKey\":true,\"usingEnvironmentId\":false}",
      "maintainerId": "569f183514f4432160000007",
      "_maintainer": {
        "_links": {
          "self": {
            "href": "/api/v2/members/569f183514f4432160000007",
            "type": "application/json"
          }
        },
        "_id": "569f183514f4432160000007",
        "role": "admin",
        "email": "ariel@acme.com",
        "firstName": "Ariel",
        "lastName": "Flores"
      },
      "maintainerTeamKey": "team-1",
      "_maintainerTeam": {
        "key": "team-key-123abc",
        "name": "Example team",
        "_links": {
          "parent": {
            "href": "/api/v2/teams",
            "type": "application/json"
          },
          "roles": {
            "href": "/api/v2/teams/example-team/roles",
            "type": "application/json"
          },
          "self": {
            "href": "/api/v2/teams/example-team",
            "type": "application/json"
          }
        }
      },
      "goalIds": [],
      "archivedDate": "1494437420312",
      "deprecated": false,
      "deprecatedDate": "1494437420312",
      "defaults": "{\"onVariation\":0,\"offVariation\":1}",
      "_purpose": "<string>",
      "migrationSettings": {
        "contextKind": "device",
        "stageCount": 6
      },
      "environments": {
        "my-environment": {
          "_environmentName": "My Environment",
          "_site": {
            "href": "/default/my-environment/features/client-side-flag",
            "type": "text/html"
          },
          "_summary": {
            "prerequisites": 0,
            "variations": {
              "0": {
                "contextTargets": 1,
                "isFallthrough": true,
                "nullRules": 0,
                "rules": 0,
                "targets": 1
              },
              "1": {
                "isOff": true,
                "nullRules": 0,
                "rules": 0,
                "targets": 0
              }
            }
          },
          "archived": false,
          "contextTargets": [
            {
              "contextKind": "device",
              "values": [
                "device-key-123abc"
              ],
              "variation": 0
            }
          ],
          "fallthrough": {
            "variation": 0
          },
          "lastModified": 1627071171347,
          "offVariation": 1,
          "on": false,
          "prerequisites": [],
          "rules": [],
          "salt": "61eddeadbeef4da1facecafe3a60a397",
          "sel": "810edeadbeef4844facecafe438f2999492",
          "targets": [
            {
              "contextKind": "user",
              "values": [
                "user-key-123abc"
              ],
              "variation": 0
            }
          ],
          "trackEvents": false,
          "trackEventsFallthrough": false,
          "version": 1
        }
      }
    }
  ],
  "_links": {
    "self": {
      "href": "/api/v2/flags/default",
      "type": "application/json"
    }
  },
  "totalCount": 1,
  "totalCountWithDifferences": 0
}

Documentation Index

Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

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<int64>

The number of feature flags to return. Defaults to 20.

offset
integer<int64>

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

Global flags collection response

items
object[]
required

An array of feature flags

The location and content type of related resources

Example:
{
"self": {
"href": "/api/v2/flags/default",
"type": "application/json"
}
}
totalCount
integer

The total number of flags

Example:

1

totalCountWithDifferences
integer

The number of flags that have differences between environments. Only shown when query parameter compare is true.

Example:

0