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 |
{String: ApprovalRequestSettingWithEnvs} getApprovalRequestSettings(lDAPIVersion, projectKey, opts)
Get approval request settings
Get the approval request settings for the given project, optionally filtered by environment and resource kind.
import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';
let apiInstance = new LaunchDarklyApi.ApprovalsBetaApi();
let lDAPIVersion = "lDAPIVersion_example"; // String | Version of the endpoint.
let projectKey = "default"; // String |
let opts = {
'environmentKey': "environmentKey_example", // String | An environment key filter to apply to the approval request settings.
'resourceKind': "resourceKind_example", // String | A resource kind filter to apply to the approval request settings.
'expand': "default,strict" // String | A comma-separated list of fields to expand in the response. Options include 'default' and 'strict'.
};
apiInstance.getApprovalRequestSettings(lDAPIVersion, projectKey, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| lDAPIVersion | String | Version of the endpoint. | |
| 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] |
{String: ApprovalRequestSettingWithEnvs}
- Content-Type: Not defined
- Accept: application/json
FlagConfigApprovalRequestResponse patchApprovalRequest(id)
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` 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. Here's an example: ```json { "instructions": [{ "kind": "addReviewers", "notifyMemberIds": [ "user-key-123abc", "user-key-456def" ], "notifyTeamKeys": [ "team-key-789abc"] }] } ```
import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';
let apiInstance = new LaunchDarklyApi.ApprovalsBetaApi();
let id = "id_example"; // String | The approval ID
apiInstance.patchApprovalRequest(id, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | The approval ID |
FlagConfigApprovalRequestResponse
- Content-Type: Not defined
- Accept: application/json
{String: ApprovalRequestSettingWithEnvs} patchApprovalRequestSettings(lDAPIVersion, projectKey, opts)
Update approval request settings
Perform a partial update to approval request settings
import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';
let apiInstance = new LaunchDarklyApi.ApprovalsBetaApi();
let lDAPIVersion = "lDAPIVersion_example"; // String | Version of the endpoint.
let projectKey = "default"; // String |
let opts = {
'approvalRequestSettingsPatch': new LaunchDarklyApi.ApprovalRequestSettingsPatch() // ApprovalRequestSettingsPatch | Approval request settings to update
};
apiInstance.patchApprovalRequestSettings(lDAPIVersion, projectKey, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| lDAPIVersion | String | Version of the endpoint. | |
| projectKey | String | ||
| approvalRequestSettingsPatch | ApprovalRequestSettingsPatch | Approval request settings to update | [optional] |
{String: ApprovalRequestSettingWithEnvs}
- Content-Type: application/json
- Accept: application/json
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` 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 LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';
let apiInstance = new LaunchDarklyApi.ApprovalsBetaApi();
let projectKey = "projectKey_example"; // String | The project key
let featureFlagKey = "featureFlagKey_example"; // String | The feature flag key
let environmentKey = "environmentKey_example"; // String | The environment key
let id = "id_example"; // String | The approval ID
apiInstance.patchFlagConfigApprovalRequest(projectKey, featureFlagKey, environmentKey, id, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| 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