For the complete documentation index, see llms.txt. For the full documentation snapshot, see llms-full.txt.
Reset an environment’s SDK key with an optional expiry time for the old key.
curl --request POST \
--url https://app.launchdarkly.com/api/v2/projects/{projectKey}/environments/{environmentKey}/apiKey \
--header 'Authorization: <api-key>'{
"_links": {
"self": {
"href": "/api/v2/projects/my-project/environments/my-environment",
"type": "application/json"
}
},
"_id": "57be1db38b75bf0772d11384",
"key": "environment-key-123abc",
"name": "My Environment",
"apiKey": "sdk-xxx",
"mobileKey": "mob-xxx",
"color": "F5A623",
"defaultTtl": 5,
"secureMode": true,
"defaultTrackEvents": false,
"requireComments": true,
"confirmChanges": true,
"tags": [
"ops"
],
"critical": true,
"_access": {
"denied": [
{
"action": "<string>",
"reason": {
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"notResources": [
"<string>"
],
"actions": [
"*"
],
"notActions": [
"<string>"
],
"role_name": "<string>"
}
}
],
"allowed": [
{
"action": "<string>",
"reason": {
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"notResources": [
"<string>"
],
"actions": [
"*"
],
"notActions": [
"<string>"
],
"role_name": "<string>"
}
}
]
},
"approvalSettings": {
"required": true,
"bypassApprovalsForPendingChanges": false,
"minNumApprovals": 1,
"canReviewOwnRequest": false,
"canApplyDeclinedChanges": true,
"serviceKind": "launchdarkly",
"serviceConfig": {},
"requiredApprovalTags": [
"require-approval"
],
"autoApplyApprovedChanges": true,
"serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
},
"resourceApprovalSettings": {}
}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 environment key
The time at which you want the old SDK key to expire, in UNIX milliseconds. By default, the key expires immediately. During the period between this call and the time when the old SDK key expires, both the old SDK key and the new SDK key will work.
Environment response
The location and content type of related resources
Show child attributes
{
"self": {
"href": "/api/v2/projects/my-project/environments/my-environment",
"type": "application/json"
}
}The ID for the environment. Use this as the client-side ID for authorization in some client-side SDKs, and to associate LaunchDarkly environments with CDN integrations in edge SDKs.
"57be1db38b75bf0772d11384"
A project-unique key for the new environment
"environment-key-123abc"
A human-friendly name for the new environment
"My Environment"
The SDK key for the environment. Use this for authorization in server-side SDKs.
"sdk-xxx"
The mobile key for the environment. Use this for authorization in mobile SDKs.
"mob-xxx"
The color used to indicate this environment in the UI
"F5A623"
The default time (in minutes) that the PHP SDK can cache feature flag rules locally
5
Ensures that one end user of the client-side SDK cannot inspect the variations for another end user
true
Enables tracking detailed information for new flags by default
false
Whether members who modify flags and segments through the LaunchDarkly user interface are required to add a comment
true
Whether members who modify flags and segments through the LaunchDarkly user interface are required to confirm those changes
true
A list of tags for this environment
["ops"]Whether the environment is critical
true
Show child attributes
Details about the approval settings for flags in this environment
Show child attributes
Details about the approval settings for other resources in this environment, organized by resource kind (for example, "aiconfig" and "segment")
Show child attributes
curl --request POST \
--url https://app.launchdarkly.com/api/v2/projects/{projectKey}/environments/{environmentKey}/apiKey \
--header 'Authorization: <api-key>'{
"_links": {
"self": {
"href": "/api/v2/projects/my-project/environments/my-environment",
"type": "application/json"
}
},
"_id": "57be1db38b75bf0772d11384",
"key": "environment-key-123abc",
"name": "My Environment",
"apiKey": "sdk-xxx",
"mobileKey": "mob-xxx",
"color": "F5A623",
"defaultTtl": 5,
"secureMode": true,
"defaultTrackEvents": false,
"requireComments": true,
"confirmChanges": true,
"tags": [
"ops"
],
"critical": true,
"_access": {
"denied": [
{
"action": "<string>",
"reason": {
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"notResources": [
"<string>"
],
"actions": [
"*"
],
"notActions": [
"<string>"
],
"role_name": "<string>"
}
}
],
"allowed": [
{
"action": "<string>",
"reason": {
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"notResources": [
"<string>"
],
"actions": [
"*"
],
"notActions": [
"<string>"
],
"role_name": "<string>"
}
}
]
},
"approvalSettings": {
"required": true,
"bypassApprovalsForPendingChanges": false,
"minNumApprovals": 1,
"canReviewOwnRequest": false,
"canApplyDeclinedChanges": true,
"serviceKind": "launchdarkly",
"serviceConfig": {},
"requiredApprovalTags": [
"require-approval"
],
"autoApplyApprovedChanges": true,
"serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
},
"resourceApprovalSettings": {}
}