Scheduled changes

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.

List scheduled changes

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

Request
Security:
ApiKey (readwrite)
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag's 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.

Request
Security:
ApiKey (readwrite)
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag's 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

Request
Security:
ApiKey (readwrite)
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag's 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.

Requires a semantic patch representation of the desired changes to the resource. To learn more about semantic patches, read Updates

Request
Security:
ApiKey (readwrite)
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag's 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

Request
Security:
ApiKey (readwrite)
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag's 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"
}