Create A Feature Flag
Create a feature flag with the given name, key, and variations.
Parameters
Parameter | Description |
---|---|
Availability for Client-Side SDKs | Whether to enable availability for client-side SDKs. |
Availability for Mobile SDKs | Whether to enable availability for mobile SDKs. |
Description | Description of the feature flag. |
Feature Flag to Copy | The key of the feature flag to be cloned. The key identifies the flag in your code. For example, setting clone=flagKey copies the full targeting configuration for all environments, including on/off state, from the original flag to the new flag. |
Key | A unique key used to reference the flag in your code. |
Name | A human-friendly name for the feature flag. |
Project Key | The project key. |
Temporary | Whether the flag is a temporary flag. Defaults to true. |
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
Create a Feature Flag with Launchdarkly and Send Results Via Email
Preview this Workflow on desktop