Scheduled changes

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.

List scheduled changes

Get a list of scheduled changes that will be applied to the feature flag.

SecurityApiKey
Request
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag key

environmentKey
required
string <string>

The environment key

Responses
200

Scheduled changes collection response

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

get/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes
Request samples
curl -i -X GET \
  'https://app.launchdarkly.com/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes' \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "items": [
    ],
  • "_links": {
    }
}

Create scheduled changes workflow

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.

SecurityApiKey
Request
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag key

environmentKey
required
string <string>

The environment key

query Parameters
ignoreConflicts
boolean <boolean>

Whether or not to succeed or fail when the new instructions conflict with existing scheduled changes

Request Body schema: application/json
comment
string
executionDate
required
integer <int64> (UnixMillis)
required
Array of objects (Instructions)
Responses
201

Successful scheduled changes response

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

405

Method not allowed

409

Status conflict

429

Rate limited

post/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes
Request samples
application/json
{
  • "comment": "string",
  • "executionDate": 0,
  • "instructions": [
    ]
}
Response samples
application/json
{
  • "_id": "string",
  • "_creationDate": 0,
  • "_maintainerId": "string",
  • "_version": 0,
  • "executionDate": 0,
  • "instructions": [
    ],
  • "conflicts": null,
  • "_links": {
    }
}

Get a scheduled change

Get a scheduled change that will be applied to the feature flag by ID.

SecurityApiKey
Request
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag key

environmentKey
required
string <string>

The environment key

id
required
string <string>

The scheduled change id

Responses
200

Scheduled change response

401

Invalid access token

404

Invalid resource identifier

429

Rate limited

get/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id}
Request samples
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'
Response samples
application/json
{
  • "_id": "string",
  • "_creationDate": 0,
  • "_maintainerId": "string",
  • "_version": 0,
  • "executionDate": 0,
  • "instructions": [
    ],
  • "conflicts": null,
  • "_links": {
    }
}

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.

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.

For example, to replace the scheduled changes, use this request body:

{
  "comment": "optional comment",
  "instructions": [
    {
      "kind": "replaceScheduledChangesInstructions",
      "value": [ {"kind": "turnFlagOff"} ]
    }
  ]
}

updateScheduledChangesExecutionDate

Updates the execution date for the scheduled changes.

Parameters
  • value: the new execution date, in Unix milliseconds.
SecurityApiKey
Request
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag key

environmentKey
required
string <string>

The environment key

id
required
string <string>

The scheduled change ID

query Parameters
ignoreConflicts
boolean <boolean>

Whether or not to succeed or fail when the new instructions conflict with existing scheduled changes

Request Body schema: application/json
comment
string
required
Array of objects (Instructions)
Responses
200

Successful scheduled changes response

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

405

Method not allowed

409

Status conflict

429

Rate limited

patch/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id}
Request samples
application/json
{
  • "comment": "string",
  • "instructions": [
    ]
}
Response samples
application/json
{
  • "_id": "string",
  • "_creationDate": 0,
  • "_maintainerId": "string",
  • "_version": 0,
  • "executionDate": 0,
  • "instructions": [
    ],
  • "conflicts": null,
  • "_links": {
    }
}

Delete scheduled changes workflow

Delete a scheduled changes workflow.

SecurityApiKey
Request
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag key

environmentKey
required
string <string>

The environment key

id
required
string <string>

The scheduled change id

Responses
204

Action succeeded

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

405

Method not allowed

409

Status conflict

429

Rate limited

delete/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id}
Request samples
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'
Response samples
application/json
{
  • "code": "unauthorized",
  • "message": "invalid key"
}