All URIs are relative to https://app.launchdarkly.com
| Method | HTTP request | Description |
|---|---|---|
| getApprovalRequestSettings | GET /api/v2/approval-requests/projects/{projectKey}/settings | Get approval request settings |
| patchApprovalRequest | PATCH /api/v2/approval-requests/{id} | Update approval request |
| patchApprovalRequestSettings | PATCH /api/v2/approval-requests/projects/{projectKey}/settings | Update approval request settings |
| patchFlagConfigApprovalRequest | PATCH /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id} | Update flag approval request |
Map<String, ApprovalRequestSettingWithEnvs> getApprovalRequestSettings(ldAPIVersion, projectKey, environmentKey, resourceKind, expand)
Get approval request settings
Get the approval request settings for the given project, optionally filtered by environment and resource kind.
// 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.ApprovalsBetaApi;
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");
ApprovalsBetaApi apiInstance = new ApprovalsBetaApi(defaultClient);
String ldAPIVersion = "beta"; // String | Version of the endpoint.
String projectKey = "default"; // String |
String environmentKey = "environmentKey_example"; // String | An environment key filter to apply to the approval request settings.
String resourceKind = "resourceKind_example"; // String | A resource kind filter to apply to the approval request settings.
String expand = "default,strict"; // String | A comma-separated list of fields to expand in the response. Options include 'default' and 'strict'.
try {
Map<String, ApprovalRequestSettingWithEnvs> result = apiInstance.getApprovalRequestSettings(ldAPIVersion, projectKey, environmentKey, resourceKind, expand);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ApprovalsBetaApi#getApprovalRequestSettings");
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 |
|---|---|---|---|
| ldAPIVersion | String | Version of the endpoint. | [enum: beta] |
| projectKey | String | ||
| environmentKey | String | An environment key filter to apply to the approval request settings. | [optional] |
| resourceKind | String | A resource kind filter to apply to the approval request settings. | [optional] |
| expand | String | A comma-separated list of fields to expand in the response. Options include 'default' and 'strict'. | [optional] |
Map<String, ApprovalRequestSettingWithEnvs>
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful response | - |
| 400 | Bad request | - |
| 403 | Forbidden | - |
| 404 | Not found | - |
| 500 | Internal server error | - |
FlagConfigApprovalRequestResponse patchApprovalRequest(id, approvalRequestPatchInput)
Update approval request
Perform a partial update to an approval request. Updating an approval request uses the semantic patch format. This endpoint works with any approval requests. 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 an approval request. #### addReviewers Adds the specified members and teams to the existing list of reviewers. You must include at least one of `notifyMemberIds` and `notifyTeamKeys`. ##### Parameters - `notifyMemberIds`: (Optional) List of member IDs. - `notifyTeamKeys`: (Optional) List of team keys. Here's an example: ```json { "instructions": [{ "kind": "addReviewers", "notifyMemberIds": [ "user-key-123abc", "user-key-456def" ], "notifyTeamKeys": [ "team-key-789abc"] }] } ``` #### updateDescription Updates the description (title) of the approval request. ##### Parameters - `value`: (Required) The new description for the approval request. Must be non-empty and no more than 5000 characters. Here's an example: ```json { "instructions": [{ "kind": "updateDescription", "value": "Updated approval request title" }] } ```
// 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.ApprovalsBetaApi;
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");
ApprovalsBetaApi apiInstance = new ApprovalsBetaApi(defaultClient);
String id = "id_example"; // String | The approval ID
ApprovalRequestPatchInput approvalRequestPatchInput = new ApprovalRequestPatchInput(); // ApprovalRequestPatchInput |
try {
FlagConfigApprovalRequestResponse result = apiInstance.patchApprovalRequest(id, approvalRequestPatchInput);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ApprovalsBetaApi#patchApprovalRequest");
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 |
|---|---|---|---|
| id | String | The approval ID | |
| approvalRequestPatchInput | ApprovalRequestPatchInput |
FlagConfigApprovalRequestResponse
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Approval request response | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |
Map<String, ApprovalRequestSettingWithEnvs> patchApprovalRequestSettings(ldAPIVersion, projectKey, approvalRequestSettingsPatch)
Update approval request settings
Perform a partial update to approval request settings
// 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.ApprovalsBetaApi;
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");
ApprovalsBetaApi apiInstance = new ApprovalsBetaApi(defaultClient);
String ldAPIVersion = "beta"; // String | Version of the endpoint.
String projectKey = "default"; // String |
ApprovalRequestSettingsPatch approvalRequestSettingsPatch = new ApprovalRequestSettingsPatch(); // ApprovalRequestSettingsPatch | Approval request settings to update
try {
Map<String, ApprovalRequestSettingWithEnvs> result = apiInstance.patchApprovalRequestSettings(ldAPIVersion, projectKey, approvalRequestSettingsPatch);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ApprovalsBetaApi#patchApprovalRequestSettings");
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 |
|---|---|---|---|
| ldAPIVersion | String | Version of the endpoint. | [enum: beta] |
| projectKey | String | ||
| approvalRequestSettingsPatch | ApprovalRequestSettingsPatch | Approval request settings to update | [optional] |
Map<String, ApprovalRequestSettingWithEnvs>
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful response | - |
| 400 | Bad request | - |
| 403 | Forbidden | - |
| 404 | Not found | - |
| 500 | Internal server error | - |
FlagConfigApprovalRequestResponse patchFlagConfigApprovalRequest(projectKey, featureFlagKey, environmentKey, id)
Update flag approval request
Perform a partial update to an approval request. Updating an approval request uses the semantic patch format. This endpoint requires a feature flag key, and can only be used for updating approval requests for flags. 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 an approval request. #### addReviewers Adds the specified members and teams to the existing list of reviewers. You must include at least one of `notifyMemberIds` and `notifyTeamKeys`. ##### Parameters - `notifyMemberIds`: (Optional) List of member IDs. - `notifyTeamKeys`: (Optional) List of team keys. #### updateDescription Updates the description (title) of the approval request. ##### Parameters - `value`: (Required) The new description for the approval request. Must be non-empty and no more than 5000 characters.
// 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.ApprovalsBetaApi;
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");
ApprovalsBetaApi apiInstance = new ApprovalsBetaApi(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 approval ID
try {
FlagConfigApprovalRequestResponse result = apiInstance.patchFlagConfigApprovalRequest(projectKey, featureFlagKey, environmentKey, id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ApprovalsBetaApi#patchFlagConfigApprovalRequest");
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 approval ID |
FlagConfigApprovalRequestResponse
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Approval request response | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |