Scheduled flag changes is an add-on feature
Scheduled flag changes is available to customers on an Enterprise plan. To learn more, read about our pricing. To upgrade your plan, contact Sales.
Schedule the specified flag targeting changes to take effect at the selected time. You may schedule multiple changes for a flag each with a different ExecutionDate
. To learn more, read Scheduled flag changes.
Get a list of scheduled changes that will be applied to the feature flag.
Scheduled changes collection response
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
curl -i -X GET \ 'https://app.launchdarkly.com/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes' \ -H 'Authorization: YOUR_API_KEY_HERE'
{- "items": [
- {
- "_id": "string",
- "_creationDate": 0,
- "_maintainerId": "string",
- "_version": 0,
- "executionDate": 0,
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "conflicts": null,
- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}
}
], - "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}
}
Create scheduled changes for a feature flag. If the ignoreConficts
query parameter is false and the new instructions would conflict with the current state of the feature flag or any existing scheduled changes, the request will fail. If the parameter is true and there are conflicts, the request will succeed as normal.
Successful scheduled changes response
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
Method not allowed
Status conflict
Rate limited
{- "comment": "string",
- "executionDate": 0,
- "instructions": [
- {
- "property1": null,
- "property2": null
}
]
}
{- "_id": "string",
- "_creationDate": 0,
- "_maintainerId": "string",
- "_version": 0,
- "executionDate": 0,
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "conflicts": null,
- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}
}
Get a scheduled change that will be applied to the feature flag by ID.
Scheduled change response
Invalid access token
Invalid resource identifier
Rate limited
curl -i -X GET \ 'https://app.launchdarkly.com/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id}' \ -H 'Authorization: YOUR_API_KEY_HERE'
{- "_id": "string",
- "_creationDate": 0,
- "_maintainerId": "string",
- "_version": 0,
- "executionDate": 0,
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "conflicts": null,
- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}
}
Update a scheduled change, overriding existing instructions with the new ones. Updating a scheduled change uses the semantic patch format.
To make a semantic patch request, you must append domain-model=launchdarkly.semanticpatch
to your Content-Type
header. To learn more, read Updates using semantic patch.
Semantic patch requests support the following kind
instructions for updating scheduled changes.
Removes the scheduled change.
Removes the existing scheduled changes and replaces them with the new instructions.
value
: An array of the new actions to perform when the execution date for these scheduled changes arrives. Supported scheduled actions are turnFlagOn
and turnFlagOff
.For example, to replace the scheduled changes, use this request body:
{
"comment": "optional comment",
"instructions": [
{
"kind": "replaceScheduledChangesInstructions",
"value": [ {"kind": "turnFlagOff"} ]
}
]
}
Updates the execution date for the scheduled changes.
value
: the new execution date, in Unix milliseconds.Successful scheduled changes response
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
Method not allowed
Status conflict
Rate limited
{- "comment": "string",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
]
}
{- "_id": "string",
- "_creationDate": 0,
- "_maintainerId": "string",
- "_version": 0,
- "executionDate": 0,
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "conflicts": null,
- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}
}
Delete a scheduled changes workflow.
Action succeeded
Invalid access token
Forbidden
Invalid resource identifier
Method not allowed
Status conflict
Rate limited
curl -i -X DELETE \ 'https://app.launchdarkly.com/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id}' \ -H 'Authorization: YOUR_API_KEY_HERE'
{- "code": "unauthorized",
- "message": "invalid key"
}