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.
Authorizations
Path Parameters
The project key
The feature flag key
Query Parameters
Filter configurations by environment
A comma-separated list of fields to expand in the response. Supported fields are explained above.
Response
Global flag response
A human-friendly name for the feature flag
"My Flag"
Kind of feature flag
boolean, multivariate "boolean"
A unique key used to reference the flag in your code
"flag-key-123abc"
Version of the feature flag
1
Timestamp of flag creation date
"1494437420312"
An array of possible variations for the flag
Whether the flag is a temporary flag
true
Tags for the feature flag
The location and content type of related resources
Experimentation data for the feature flag
"{\"baselineIdx\": 0,\"items\": []}"
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\"]}}"
Boolean indicating if the feature flag is archived
false
Description of the feature flag
"This flag controls the example widgets"
Deprecated, use clientSideAvailability. Whether this flag should be made available to the client-side JavaScript SDK
true
Which type of client-side SDKs the feature flag is available to
"{\"usingMobileKey\":true,\"usingEnvironmentId\":false}"
Associated maintainerId for the feature flag
"569f183514f4432160000007"
Associated maintainer member info for the feature flag
The key of the associated team that maintains this feature flag
"team-1"
Associated maintainer team info for the feature flag
Deprecated, use experiments instead
If archived is true, date of archive
"1494437420312"
Boolean indicating if the feature flag is deprecated
false
If deprecated is true, date of deprecation
"1494437420312"
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}"
Migration-related settings for the flag
Information about a flag's stale states
Details on the environments for this flag. Only returned if the request is filtered by environment, using the filterEnv query parameter.