All URIs are relative to https://app.launchdarkly.com
Method | HTTP request | Description |
---|---|---|
patchApprovalRequest | PATCH /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id} | Update approval request |
FlagConfigApprovalRequestResponse patchApprovalRequest(projectKey, featureFlagKey, environmentKey, id)
Update approval request
Perform a partial update to an approval request. Updating an approval request 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` instruction 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.
// 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.patchApprovalRequest(projectKey, featureFlagKey, environmentKey, id);
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 |
---|---|---|---|
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 | - |