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 |
{ [key: string]: ApprovalRequestSettingWithEnvs; } getApprovalRequestSettings()
Get the approval request settings for the given project, optionally filtered by environment and resource kind.
import {
ApprovalsBetaApi,
Configuration
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new ApprovalsBetaApi(configuration);
let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined)
let projectKey: string; // (default to undefined)
let environmentKey: string; //An environment key filter to apply to the approval request settings. (optional) (default to undefined)
let resourceKind: string; //A resource kind filter to apply to the approval request settings. (optional) (default to undefined)
let expand: string; //A comma-separated list of fields to expand in the response. Options include \'default\' and \'strict\'. (optional) (default to undefined)
const { status, data } = await apiInstance.getApprovalRequestSettings(
lDAPIVersion,
projectKey,
environmentKey,
resourceKind,
expand
);| Name | Type | Description | Notes |
|---|---|---|---|
| lDAPIVersion | ['beta']Array<'beta'> | Version of the endpoint. | defaults to undefined |
| projectKey | [string] | defaults to undefined | |
| environmentKey | [string] | An environment key filter to apply to the approval request settings. | (optional) defaults to undefined |
| resourceKind | [string] | A resource kind filter to apply to the approval request settings. | (optional) defaults to undefined |
| expand | [string] | A comma-separated list of fields to expand in the response. Options include 'default' and 'strict'. | (optional) defaults to undefined |
{ [key: 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FlagConfigApprovalRequestResponse patchApprovalRequest(approvalRequestPatchInput)
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 {
ApprovalsBetaApi,
Configuration,
ApprovalRequestPatchInput
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new ApprovalsBetaApi(configuration);
let id: string; //The approval ID (default to undefined)
let approvalRequestPatchInput: ApprovalRequestPatchInput; //
const { status, data } = await apiInstance.patchApprovalRequest(
id,
approvalRequestPatchInput
);| Name | Type | Description | Notes |
|---|---|---|---|
| approvalRequestPatchInput | ApprovalRequestPatchInput | ||
| id | [string] | The approval ID | defaults to undefined |
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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
{ [key: string]: ApprovalRequestSettingWithEnvs; } patchApprovalRequestSettings()
Perform a partial update to approval request settings
import {
ApprovalsBetaApi,
Configuration,
ApprovalRequestSettingsPatch
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new ApprovalsBetaApi(configuration);
let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined)
let projectKey: string; // (default to undefined)
let approvalRequestSettingsPatch: ApprovalRequestSettingsPatch; //Approval request settings to update (optional)
const { status, data } = await apiInstance.patchApprovalRequestSettings(
lDAPIVersion,
projectKey,
approvalRequestSettingsPatch
);| Name | Type | Description | Notes |
|---|---|---|---|
| approvalRequestSettingsPatch | ApprovalRequestSettingsPatch | Approval request settings to update | |
| lDAPIVersion | ['beta']Array<'beta'> | Version of the endpoint. | defaults to undefined |
| projectKey | [string] | defaults to undefined |
{ [key: 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FlagConfigApprovalRequestResponse patchFlagConfigApprovalRequest()
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 {
ApprovalsBetaApi,
Configuration
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new ApprovalsBetaApi(configuration);
let projectKey: string; //The project key (default to undefined)
let featureFlagKey: string; //The feature flag key (default to undefined)
let environmentKey: string; //The environment key (default to undefined)
let id: string; //The approval ID (default to undefined)
const { status, data } = await apiInstance.patchFlagConfigApprovalRequest(
projectKey,
featureFlagKey,
environmentKey,
id
);| Name | Type | Description | Notes |
|---|---|---|---|
| projectKey | [string] | The project key | defaults to undefined |
| featureFlagKey | [string] | The feature flag key | defaults to undefined |
| environmentKey | [string] | The environment key | defaults to undefined |
| id | [string] | The approval ID | defaults to undefined |
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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]