Environments
Reset environment SDK key
Reset an environment's SDK key with an optional expiry time for the old key.
post/api/v2/projects/{projectKey}/environments/{environmentKey}/apiKey
Path parameters
projectKeystring string required
The project key
The project key
environmentKeystring string required
The environment key
The environment key
Query parameters
expiryinteger
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.
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.
Response
Environment response
Example response
{
"_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,
"_access": {
"denied": [
{
"reason": {
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
],
"effect": "allow"
}
}
],
"allowed": [
{
"reason": {
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
],
"effect": "allow"
}
}
]
},
"requireComments": true,
"confirmChanges": true,
"tags": [
"ops"
],
"approvalSettings": {
"required": true,
"minNumApprovals": 1,
"canApplyDeclinedChanges": true,
"autoApplyApprovedChanges": true,
"serviceKind": "launchdarkly",
"serviceConfig": {},
"requiredApprovalTags": [
"require-approval"
],
"serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
},
"critical": true
}