Update scheduled changes workflow

PATCH
/api/v2/projects/:projectKey/flags/:featureFlagKey/environments/:environmentKey/scheduled-changes/:id

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.

Click to expand instructions for updating scheduled changes

deleteScheduledChange

Removes the scheduled change.

Here’s an example:

1{
2 "instructions": [{ "kind": "deleteScheduledChange" }]
3}

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 are turnFlagOn and turnFlagOff.

Here’s an example that replaces the scheduled changes with new instructions to turn flag targeting off:

1{
2 "instructions": [
3 {
4 "kind": "replaceScheduledChangesInstructions",
5 "value": [ {"kind": "turnFlagOff"} ]
6 }
7 ]
8}

updateScheduledChangesExecutionDate

Updates the execution date for the scheduled changes.

Parameters
  • value: the new execution date, in Unix milliseconds.

Here’s an example:

1{
2 "instructions": [
3 {
4 "kind": "updateScheduledChangesExecutionDate",
5 "value": 1754092860000
6 }
7 ]
8}

Path parameters

projectKeystringRequired

The project key

featureFlagKeystringRequired

The feature flag key

environmentKeystringRequired

The environment key

idstringRequired

The scheduled change ID

Query parameters

ignoreConflictsbooleanOptional

Whether to succeed (true) or fail (false) when these new instructions conflict with existing scheduled changes

Request

This endpoint expects an object.
instructionslist of maps from strings to anyRequired

The instructions to perform when updating. This should be an array with objects that look like <code>{“kind”: “update_action”}</code>. Some instructions also require a <code>value</code> field in the array element.

commentstringOptional

Optional comment describing the update to the scheduled changes

Response

Scheduled changes response

_idstring

The ID of this scheduled change

_creationDatelong

Timestamp of when the scheduled change was created

_maintainerIdstring

The ID of the scheduled change maintainer

_versioninteger

Version of the scheduled change

executionDatelong

When the scheduled changes should be executed

instructionslist of maps from strings to any

The actions to perform on the execution date for these scheduled changes

conflictsanyOptional

Errors

Built with