Update scheduled changes workflow
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.
Instructions
Semantic patch requests support the following kind instructions for updating scheduled changes.
deleteScheduledChange
Removes the scheduled change.
Here's an example:
{ "instructions": [{ "kind": "deleteScheduledChange" }]}replaceScheduledChangesInstructions
Removes the existing scheduled changes and replaces them with the new instructions.
Parameters
value: An array of the new actions to perform when the execution date for these scheduled changes arrives. Supported scheduled actions areturnFlagOnandturnFlagOff.
Here's an example that replaces the scheduled changes with new instructions to turn flag targeting off:
{ "instructions": [ { "kind": "replaceScheduledChangesInstructions", "value": [ {"kind": "turnFlagOff"} ] } ]}updateScheduledChangesExecutionDate
Updates the execution date for the scheduled changes.
Parameters
value: the new execution date, in Unix milliseconds.
Here's an example:
{ "instructions": [ { "kind": "updateScheduledChangesExecutionDate", "value": 1754092860000 } ]}Authorization
ApiKey read, writeIn: header
Scope: read, write
Path Parameters
The project key
stringThe feature flag key
stringThe environment key
stringThe scheduled change ID
stringQuery Parameters
Whether to succeed (true) or fail (false) when these new instructions conflict with existing scheduled changes
Request Body
application/json
Optional comment describing the update to the scheduled changes
The instructions to perform when updating. This should be an array with objects that look like {"kind": "update_action"}. Some instructions also require a value field in the array element.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/api/v2/projects/string/flags/string/environments/string/scheduled-changes/string" \ -H "Content-Type: application/json" \ -d '{ "comment": "Optional comment describing the update to the scheduled changes", "instructions": [ { "kind": "replaceScheduledChangesInstructions", "value": [ { "kind": "turnFlagOff" } ] } ] }'{ "_id": "12ab3c45de678910abc12345", "_creationDate": "1654123897062", "_maintainerId": "12ab3c45de678910abc12345", "_maintainerServiceTokenId": "string", "_version": 1, "executionDate": "1636558831870", "instructions": "[ { \"kind\": \"turnFlagOn\" }]", "conflicts": null, "_links": { "property1": { "href": "string", "type": "string" }, "property2": { "href": "string", "type": "string" } }}