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.

Parameters

ParameterDescription
EnvFilter configurations by environment.
Feature Flag KeyThe feature flag key.
Project KeyThe project key.

Example Output

{
	"_links": {
		"parent": {
			"href": "/api/v2/flags/my-project",
			"type": "application/json"
		},
		"self": {
			"href": "/api/v2/flags/my-project/my-flag",
			"type": "application/json"
		}
	},
	"_maintainer": {
		"_id": "569f183514f4432160000007",
		"_links": {
			"self": {
				"href": "/api/v2/members/569f183514f4432160000007",
				"type": "application/json"
			}
		},
		"email": "a.example@example.com",
		"firstName": "An",
		"lastName": "Example",
		"role": "owner"
	},
	"_version": 1,
	"archived": false,
	"archivedDate": 0,
	"clientSideAvailability": {
		"usingEnvironmentId": false,
		"usingMobileKey": false
	},
	"creationDate": 0,
	"customProperties": {},
	"defaults": {
		"offVariation": 1,
		"onVariation": 0
	},
	"description": "This flag controls the example widgets",
	"environments": {
		"my-environment": {
			"_environmentName": "My Environment",
			"_site": {
				"href": "/default/my-environment/features/client-side-flag",
				"type": "text/html"
			},
			"_summary": {
				"prerequisites": 0,
				"variations": {
					"0": {
						"isFallthrough": true,
						"nullRules": 0,
						"rules": 0,
						"targets": 0
					},
					"1": {
						"isOff": true,
						"nullRules": 0,
						"rules": 0,
						"targets": 0
					}
				}
			},
			"archived": false,
			"fallthrough": {
				"variation": 0
			},
			"lastModified": 1627071171347,
			"offVariation": 1,
			"on": false,
			"prerequisites": [],
			"rules": [],
			"salt": "61eddeadbeef4da1facecafe3a60a397",
			"sel": "810edeadbeef4844facecafe438f2999492",
			"targets": [],
			"trackEvents": false,
			"trackEventsFallthrough": false,
			"version": 1
		}
	},
	"experiments": {
		"baselineIdx": 0,
		"items": [
			{
				"_environmentSettings": {},
				"_metric": {
					"_access": {
						"allowed": [
							{
								"action": "string",
								"reason": {
									"actions": [
										"string"
									],
									"effect": "string",
									"notActions": [
										"string"
									],
									"notResources": [
										"string"
									],
									"resources": [
										"string"
									],
									"role_name": "string"
								}
							}
						],
						"denied": [
							{
								"action": "string",
								"reason": {
									"actions": [
										"string"
									],
									"effect": "string",
									"notActions": [
										"string"
									],
									"notResources": [
										"string"
									],
									"resources": [
										"string"
									],
									"role_name": "string"
								}
							}
						]
					},
					"_attachedFlagCount": 0,
					"_creationDate": 0,
					"_id": "5902deadbeef667524a01290",
					"_links": {
						"parent": {
							"href": "/api/v2/metrics/my-project",
							"type": "application/json"
						},
						"self": {
							"href": "/api/v2/metrics/my-project/my-metric",
							"type": "application/json"
						}
					},
					"_maintainer": {
						"_id": "569f183514f4432160000007",
						"_links": {
							"self": {
								"href": "/api/v2/members/569f183514f4432160000007",
								"type": "application/json"
							}
						},
						"email": "a.example@example.com",
						"firstName": "An",
						"lastName": "Example",
						"role": "owner"
					},
					"_site": {
						"href": "string",
						"type": "string"
					},
					"description": "string",
					"eventKey": "string",
					"isNumeric": false,
					"key": "my-metric",
					"kind": "string",
					"lastModified": {
						"date": "2021-08-05T19:46:31.148082Z"
					},
					"maintainerId": "569fdeadbeef1644facecafe",
					"name": "my-metric",
					"successCriteria": "string",
					"tags": [],
					"unit": "string"
				},
				"environments": [
					"production",
					"test",
					"my-environment"
				],
				"metricKey": "my-metric"
			}
		]
	},
	"goalIds": [],
	"includeInSnippet": true,
	"key": "my-flag",
	"kind": "boolean",
	"maintainerId": "569f183514f4432160000007",
	"name": "My Flag",
	"tags": [
		"example-tag"
	],
	"temporary": true,
	"variations": [
		{
			"_id": "e432f62b-55f6-49dd-a02f-eb24acf39d05",
			"value": true
		},
		{
			"_id": "a00bf58d-d252-476c-b915-15a74becacb4",
			"value": false
		}
	]
}

Workflow Library Example

Get Feature Flag with Launchdarkly and Send Results Via Email

Preview this Workflow on desktop