Get a list of all feature flags in the given project. By default, each flag includes configurations for each environment. You can filter environments with the env
query parameter. For example, setting env=production
restricts the returned configurations to just your production environment. 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
, andfilter=creationDate
.
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:
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.
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 typeAll 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.
LaunchDarkly supports the expand
query param to include additional fields in the response, with the following fields:
codeReferences
includes code references for the feature flagevaluation
includes evaluation information within returned environments, including which context kinds the flag has been evaluated for in the past 30 daysmigrationSettings
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.
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.
The project key
Filter configurations by environment
Filter feature flags by tag
The number of feature flags to return. Defaults to 20.
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
.
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
By default, flags do not include their lists of prerequisites, targets, or rules for each environment. Set summary=0
to include these fields for each flag returned.
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.
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.
Deprecated, unavailable in API version 20240415
. A boolean to filter results by only flags that have differences between environments.
A comma-separated list of fields to expand in the response. Supported fields are explained above.
Global flags collection response
An array of feature flags
The location and content type of related resources
The total number of flags
The number of flags that have differences between environments. Only shown when query parameter compare
is true
.