All URIs are relative to https://app.launchdarkly.com
Method | HTTP request | Description |
---|---|---|
deleteFlagConfigScheduledChanges | DELETE /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id} | Delete scheduled changes workflow |
getFeatureFlagScheduledChange | GET /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id} | Get a scheduled change |
getFlagConfigScheduledChanges | GET /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes | List scheduled changes |
patchFlagConfigScheduledChange | PATCH /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id} | Update scheduled changes workflow |
postFlagConfigScheduledChanges | POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes | Create scheduled changes workflow |
deleteFlagConfigScheduledChanges(projectKey, featureFlagKey, environmentKey, id)
Delete scheduled changes workflow
Delete a scheduled changes workflow.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.ScheduledChangesApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
ScheduledChangesApi apiInstance = new ScheduledChangesApi(defaultClient);
String projectKey = "projectKey_example"; // String | The project key
String featureFlagKey = "featureFlagKey_example"; // String | The feature flag key
String environmentKey = "environmentKey_example"; // String | The environment key
String id = "id_example"; // String | The scheduled change id
try {
apiInstance.deleteFlagConfigScheduledChanges(projectKey, featureFlagKey, environmentKey, id);
} catch (ApiException e) {
System.err.println("Exception when calling ScheduledChangesApi#deleteFlagConfigScheduledChanges");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
projectKey | String | The project key | |
featureFlagKey | String | The feature flag key | |
environmentKey | String | The environment key | |
id | String | The scheduled change id |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | Action succeeded | - |
401 | Invalid access token | - |
403 | Forbidden | - |
404 | Invalid resource identifier | - |
405 | Method not allowed | - |
409 | Status conflict | - |
429 | Rate limited | - |
FeatureFlagScheduledChange getFeatureFlagScheduledChange(projectKey, featureFlagKey, environmentKey, id)
Get a scheduled change
Get a scheduled change that will be applied to the feature flag by ID.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.ScheduledChangesApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
ScheduledChangesApi apiInstance = new ScheduledChangesApi(defaultClient);
String projectKey = "projectKey_example"; // String | The project key
String featureFlagKey = "featureFlagKey_example"; // String | The feature flag key
String environmentKey = "environmentKey_example"; // String | The environment key
String id = "id_example"; // String | The scheduled change id
try {
FeatureFlagScheduledChange result = apiInstance.getFeatureFlagScheduledChange(projectKey, featureFlagKey, environmentKey, id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ScheduledChangesApi#getFeatureFlagScheduledChange");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
projectKey | String | The project key | |
featureFlagKey | String | The feature flag key | |
environmentKey | String | The environment key | |
id | String | The scheduled change id |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Scheduled changes response | - |
401 | Invalid access token | - |
404 | Invalid resource identifier | - |
429 | Rate limited | - |
FeatureFlagScheduledChanges getFlagConfigScheduledChanges(projectKey, featureFlagKey, environmentKey)
List scheduled changes
Get a list of scheduled changes that will be applied to the feature flag.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.ScheduledChangesApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
ScheduledChangesApi apiInstance = new ScheduledChangesApi(defaultClient);
String projectKey = "projectKey_example"; // String | The project key
String featureFlagKey = "featureFlagKey_example"; // String | The feature flag key
String environmentKey = "environmentKey_example"; // String | The environment key
try {
FeatureFlagScheduledChanges result = apiInstance.getFlagConfigScheduledChanges(projectKey, featureFlagKey, environmentKey);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ScheduledChangesApi#getFlagConfigScheduledChanges");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
projectKey | String | The project key | |
featureFlagKey | String | The feature flag key | |
environmentKey | String | The environment key |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Scheduled changes collection response | - |
400 | Invalid request | - |
401 | Invalid access token | - |
403 | Forbidden | - |
404 | Invalid resource identifier | - |
FeatureFlagScheduledChange patchFlagConfigScheduledChange(projectKey, featureFlagKey, environmentKey, id, flagScheduledChangesInput, ignoreConflicts)
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. <details> <summary>Click to expand instructions for <strong>updating scheduled changes</strong></summary> #### deleteScheduledChange Removes the scheduled change. Here's an example: ```json { "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 are `turnFlagOn` and `turnFlagOff`. Here's an example that replaces the scheduled changes with new instructions to turn flag targeting off: ```json { "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: ```json { "instructions": [ { "kind": "updateScheduledChangesExecutionDate", "value": 1754092860000 } ] } ``` </details>
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.ScheduledChangesApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
ScheduledChangesApi apiInstance = new ScheduledChangesApi(defaultClient);
String projectKey = "projectKey_example"; // String | The project key
String featureFlagKey = "featureFlagKey_example"; // String | The feature flag key
String environmentKey = "environmentKey_example"; // String | The environment key
String id = "id_example"; // String | The scheduled change ID
FlagScheduledChangesInput flagScheduledChangesInput = new FlagScheduledChangesInput(); // FlagScheduledChangesInput |
Boolean ignoreConflicts = true; // Boolean | Whether to succeed (`true`) or fail (`false`) when these new instructions conflict with existing scheduled changes
try {
FeatureFlagScheduledChange result = apiInstance.patchFlagConfigScheduledChange(projectKey, featureFlagKey, environmentKey, id, flagScheduledChangesInput, ignoreConflicts);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ScheduledChangesApi#patchFlagConfigScheduledChange");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
projectKey | String | The project key | |
featureFlagKey | String | The feature flag key | |
environmentKey | String | The environment key | |
id | String | The scheduled change ID | |
flagScheduledChangesInput | FlagScheduledChangesInput | ||
ignoreConflicts | Boolean | Whether to succeed (`true`) or fail (`false`) when these new instructions conflict with existing scheduled changes | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | 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 | - |
FeatureFlagScheduledChange postFlagConfigScheduledChanges(projectKey, featureFlagKey, environmentKey, postFlagScheduledChangesInput, ignoreConflicts)
Create scheduled changes workflow
Create scheduled changes for a feature flag. If the `ignoreConficts` query parameter is false and there are conflicts between these instructions and existing scheduled changes, the request will fail. If the parameter is true and there are conflicts, the request will succeed.
// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.ScheduledChangesApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app.launchdarkly.com");
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
ScheduledChangesApi apiInstance = new ScheduledChangesApi(defaultClient);
String projectKey = "projectKey_example"; // String | The project key
String featureFlagKey = "featureFlagKey_example"; // String | The feature flag key
String environmentKey = "environmentKey_example"; // String | The environment key
PostFlagScheduledChangesInput postFlagScheduledChangesInput = new PostFlagScheduledChangesInput(); // PostFlagScheduledChangesInput |
Boolean ignoreConflicts = true; // Boolean | Whether to succeed (`true`) or fail (`false`) when these instructions conflict with existing scheduled changes
try {
FeatureFlagScheduledChange result = apiInstance.postFlagConfigScheduledChanges(projectKey, featureFlagKey, environmentKey, postFlagScheduledChangesInput, ignoreConflicts);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ScheduledChangesApi#postFlagConfigScheduledChanges");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
projectKey | String | The project key | |
featureFlagKey | String | The feature flag key | |
environmentKey | String | The environment key | |
postFlagScheduledChangesInput | PostFlagScheduledChangesInput | ||
ignoreConflicts | Boolean | Whether to succeed (`true`) or fail (`false`) when these instructions conflict with existing scheduled changes | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | 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 | - |