Get feature flag
Get a single feature flag by key. By default, this returns the configurations for all environments. You can filter environments with the env query parameter. For example, setting env=production restricts the returned configurations to just the production environment.
Recommended use
This endpoint can return a large amount of information. Specifying one or multiple environments with the
envparameter can decrease response time and overall payload size. We recommend using this parameter to return only the environments relevant to your query.
Expanding response
LaunchDarkly supports the expand query param to include additional fields in the response, with the following fields:
evaluationincludes evaluation information within returned environments, including which context kinds the flag has been evaluated for in the past 30 daysmigrationSettingsincludes migration settings information within the flag and within returned environments. These settings are only included for migration flags, that is, wherepurposeismigration.
For example, expand=evaluation includes the evaluation field in the response.
Path Parameters
Query Parameters
Response
Global flag response
Metadata attached to the feature flag, in the form of the property key associated with a name and array of values for the metadata to associate with this flag. Typically used to store data related to an integration.
"{\"jira.issues\":{\"name\":\"Jira issues\",\"value\":[\"is-123\",\"is-456\"]}}"
The indices, from the array of variations, for the variations to serve by default when targeting is on and when targeting is off. These variations will be used for this flag in new environments. If omitted, the first and last variation will be used.
"{\"onVariation\":0,\"offVariation\":1}"