For the complete documentation index, see llms.txt. For the full documentation snapshot, see llms-full.txt.
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.
LaunchDarkly supports the expand query param to include additional fields in the response, with the following fields:
evaluation 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.
curl --request GET \
--url https://app.launchdarkly.com/api/v2/flags/{projectKey}/{featureFlagKey} \
--header 'Authorization: <api-key>'{
"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
}
}
}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.
The project key
The feature flag key
Filter configurations by environment
A comma-separated list of fields to expand in the response. Supported fields are explained above.
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
Show child attributes
[
{
"_id": "e432f62b-55f6-49dd-a02f-eb24acf39d05",
"value": true
},
{
"_id": "a00bf58d-d252-476c-b915-15a74becacb4",
"value": false
}
]Whether the flag is a temporary flag
true
Tags for the feature flag
["example-tag"]The location and content type of related resources
Show child attributes
{
"parent": {
"href": "/api/v2/flags/my-project",
"type": "application/json"
},
"self": {
"href": "/api/v2/flags/my-project/my-flag",
"type": "application/json"
}
}Experimentation data for the feature flag
Show child attributes
"{\"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.
Show child attributes
"{\"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
Show child attributes
"{\"usingMobileKey\":true,\"usingEnvironmentId\":false}"
Associated maintainerId for the feature flag
"569f183514f4432160000007"
Associated maintainer member info for the feature flag
Show child attributes
The key of the associated team that maintains this feature flag
"team-1"
Associated maintainer team info for the feature flag
Show child attributes
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.
Show child attributes
"{\"onVariation\":0,\"offVariation\":1}"
Migration-related settings for the flag
Show child attributes
Details on the environments for this flag. Only returned if the request is filtered by environment, using the filterEnv query parameter.
Show child attributes
{
"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
}
}curl --request GET \
--url https://app.launchdarkly.com/api/v2/flags/{projectKey}/{featureFlagKey} \
--header 'Authorization: <api-key>'{
"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
}
}
}