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:
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.