curl --request PATCH \
--url https://app.launchdarkly.com/api/v2/approval-requests/projects/{projectKey}/settings \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'LD-API-Version: <ld-api-version>' \
--data '
{
"resourceKind": "resourceKind",
"serviceKind": "launchdarkly",
"canReviewOwnRequest": false,
"requiredApprovalTags": [
"require-approval"
],
"serviceConfig": {},
"serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258",
"bypassApprovalsForPendingChanges": false,
"canApplyDeclinedChanges": true,
"minNumApprovals": 1,
"autoApplyApprovedChanges": true,
"required": true,
"environmentKey": "environmentKey"
}
'import requests
url = "https://app.launchdarkly.com/api/v2/approval-requests/projects/{projectKey}/settings"
payload = {
"resourceKind": "resourceKind",
"serviceKind": "launchdarkly",
"canReviewOwnRequest": False,
"requiredApprovalTags": ["require-approval"],
"serviceConfig": {},
"serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258",
"bypassApprovalsForPendingChanges": False,
"canApplyDeclinedChanges": True,
"minNumApprovals": 1,
"autoApplyApprovedChanges": True,
"required": True,
"environmentKey": "environmentKey"
}
headers = {
"LD-API-Version": "<ld-api-version>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'LD-API-Version': '<ld-api-version>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
resourceKind: 'resourceKind',
serviceKind: 'launchdarkly',
canReviewOwnRequest: false,
requiredApprovalTags: ['require-approval'],
serviceConfig: {},
serviceKindConfigurationId: '1ef45a85-218f-4428-a8b2-a97e5f56c258',
bypassApprovalsForPendingChanges: false,
canApplyDeclinedChanges: true,
minNumApprovals: 1,
autoApplyApprovedChanges: true,
required: true,
environmentKey: 'environmentKey'
})
};
fetch('https://app.launchdarkly.com/api/v2/approval-requests/projects/{projectKey}/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.launchdarkly.com/api/v2/approval-requests/projects/{projectKey}/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'resourceKind' => 'resourceKind',
'serviceKind' => 'launchdarkly',
'canReviewOwnRequest' => false,
'requiredApprovalTags' => [
'require-approval'
],
'serviceConfig' => [
],
'serviceKindConfigurationId' => '1ef45a85-218f-4428-a8b2-a97e5f56c258',
'bypassApprovalsForPendingChanges' => false,
'canApplyDeclinedChanges' => true,
'minNumApprovals' => 1,
'autoApplyApprovedChanges' => true,
'required' => true,
'environmentKey' => 'environmentKey'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"LD-API-Version: <ld-api-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.launchdarkly.com/api/v2/approval-requests/projects/{projectKey}/settings"
payload := strings.NewReader("{\n \"resourceKind\": \"resourceKind\",\n \"serviceKind\": \"launchdarkly\",\n \"canReviewOwnRequest\": false,\n \"requiredApprovalTags\": [\n \"require-approval\"\n ],\n \"serviceConfig\": {},\n \"serviceKindConfigurationId\": \"1ef45a85-218f-4428-a8b2-a97e5f56c258\",\n \"bypassApprovalsForPendingChanges\": false,\n \"canApplyDeclinedChanges\": true,\n \"minNumApprovals\": 1,\n \"autoApplyApprovedChanges\": true,\n \"required\": true,\n \"environmentKey\": \"environmentKey\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("LD-API-Version", "<ld-api-version>")
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.launchdarkly.com/api/v2/approval-requests/projects/{projectKey}/settings")
.header("LD-API-Version", "<ld-api-version>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"resourceKind\": \"resourceKind\",\n \"serviceKind\": \"launchdarkly\",\n \"canReviewOwnRequest\": false,\n \"requiredApprovalTags\": [\n \"require-approval\"\n ],\n \"serviceConfig\": {},\n \"serviceKindConfigurationId\": \"1ef45a85-218f-4428-a8b2-a97e5f56c258\",\n \"bypassApprovalsForPendingChanges\": false,\n \"canApplyDeclinedChanges\": true,\n \"minNumApprovals\": 1,\n \"autoApplyApprovedChanges\": true,\n \"required\": true,\n \"environmentKey\": \"environmentKey\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.launchdarkly.com/api/v2/approval-requests/projects/{projectKey}/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["LD-API-Version"] = '<ld-api-version>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"resourceKind\": \"resourceKind\",\n \"serviceKind\": \"launchdarkly\",\n \"canReviewOwnRequest\": false,\n \"requiredApprovalTags\": [\n \"require-approval\"\n ],\n \"serviceConfig\": {},\n \"serviceKindConfigurationId\": \"1ef45a85-218f-4428-a8b2-a97e5f56c258\",\n \"bypassApprovalsForPendingChanges\": false,\n \"canApplyDeclinedChanges\": true,\n \"minNumApprovals\": 1,\n \"autoApplyApprovedChanges\": true,\n \"required\": true,\n \"environmentKey\": \"environmentKey\"\n}"
response = http.request(request)
puts response.read_body{}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}Update approval request settings
Perform a partial update to approval request settings
curl --request PATCH \
--url https://app.launchdarkly.com/api/v2/approval-requests/projects/{projectKey}/settings \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'LD-API-Version: <ld-api-version>' \
--data '
{
"resourceKind": "resourceKind",
"serviceKind": "launchdarkly",
"canReviewOwnRequest": false,
"requiredApprovalTags": [
"require-approval"
],
"serviceConfig": {},
"serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258",
"bypassApprovalsForPendingChanges": false,
"canApplyDeclinedChanges": true,
"minNumApprovals": 1,
"autoApplyApprovedChanges": true,
"required": true,
"environmentKey": "environmentKey"
}
'import requests
url = "https://app.launchdarkly.com/api/v2/approval-requests/projects/{projectKey}/settings"
payload = {
"resourceKind": "resourceKind",
"serviceKind": "launchdarkly",
"canReviewOwnRequest": False,
"requiredApprovalTags": ["require-approval"],
"serviceConfig": {},
"serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258",
"bypassApprovalsForPendingChanges": False,
"canApplyDeclinedChanges": True,
"minNumApprovals": 1,
"autoApplyApprovedChanges": True,
"required": True,
"environmentKey": "environmentKey"
}
headers = {
"LD-API-Version": "<ld-api-version>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'LD-API-Version': '<ld-api-version>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
resourceKind: 'resourceKind',
serviceKind: 'launchdarkly',
canReviewOwnRequest: false,
requiredApprovalTags: ['require-approval'],
serviceConfig: {},
serviceKindConfigurationId: '1ef45a85-218f-4428-a8b2-a97e5f56c258',
bypassApprovalsForPendingChanges: false,
canApplyDeclinedChanges: true,
minNumApprovals: 1,
autoApplyApprovedChanges: true,
required: true,
environmentKey: 'environmentKey'
})
};
fetch('https://app.launchdarkly.com/api/v2/approval-requests/projects/{projectKey}/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.launchdarkly.com/api/v2/approval-requests/projects/{projectKey}/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'resourceKind' => 'resourceKind',
'serviceKind' => 'launchdarkly',
'canReviewOwnRequest' => false,
'requiredApprovalTags' => [
'require-approval'
],
'serviceConfig' => [
],
'serviceKindConfigurationId' => '1ef45a85-218f-4428-a8b2-a97e5f56c258',
'bypassApprovalsForPendingChanges' => false,
'canApplyDeclinedChanges' => true,
'minNumApprovals' => 1,
'autoApplyApprovedChanges' => true,
'required' => true,
'environmentKey' => 'environmentKey'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"LD-API-Version: <ld-api-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.launchdarkly.com/api/v2/approval-requests/projects/{projectKey}/settings"
payload := strings.NewReader("{\n \"resourceKind\": \"resourceKind\",\n \"serviceKind\": \"launchdarkly\",\n \"canReviewOwnRequest\": false,\n \"requiredApprovalTags\": [\n \"require-approval\"\n ],\n \"serviceConfig\": {},\n \"serviceKindConfigurationId\": \"1ef45a85-218f-4428-a8b2-a97e5f56c258\",\n \"bypassApprovalsForPendingChanges\": false,\n \"canApplyDeclinedChanges\": true,\n \"minNumApprovals\": 1,\n \"autoApplyApprovedChanges\": true,\n \"required\": true,\n \"environmentKey\": \"environmentKey\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("LD-API-Version", "<ld-api-version>")
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.launchdarkly.com/api/v2/approval-requests/projects/{projectKey}/settings")
.header("LD-API-Version", "<ld-api-version>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"resourceKind\": \"resourceKind\",\n \"serviceKind\": \"launchdarkly\",\n \"canReviewOwnRequest\": false,\n \"requiredApprovalTags\": [\n \"require-approval\"\n ],\n \"serviceConfig\": {},\n \"serviceKindConfigurationId\": \"1ef45a85-218f-4428-a8b2-a97e5f56c258\",\n \"bypassApprovalsForPendingChanges\": false,\n \"canApplyDeclinedChanges\": true,\n \"minNumApprovals\": 1,\n \"autoApplyApprovedChanges\": true,\n \"required\": true,\n \"environmentKey\": \"environmentKey\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.launchdarkly.com/api/v2/approval-requests/projects/{projectKey}/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["LD-API-Version"] = '<ld-api-version>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"resourceKind\": \"resourceKind\",\n \"serviceKind\": \"launchdarkly\",\n \"canReviewOwnRequest\": false,\n \"requiredApprovalTags\": [\n \"require-approval\"\n ],\n \"serviceConfig\": {},\n \"serviceKindConfigurationId\": \"1ef45a85-218f-4428-a8b2-a97e5f56c258\",\n \"bypassApprovalsForPendingChanges\": false,\n \"canApplyDeclinedChanges\": true,\n \"minNumApprovals\": 1,\n \"autoApplyApprovedChanges\": true,\n \"required\": true,\n \"environmentKey\": \"environmentKey\"\n}"
response = http.request(request)
puts response.read_body{}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}Authorizations
Headers
Version of the endpoint.
beta Path Parameters
Body
Approval request settings to update
Automatically apply changes that have been approved by all reviewers. This field is only applicable for approval services other than LaunchDarkly.
true
Whether to skip approvals for pending changes
false
Allow applying the change as long as at least one person has approved
true
Allow someone who makes an approval request to apply their own change
false
Sets the amount of approvals required before a member can apply a change. The minimum is one and the maximum is five.
1
If approvals are required for this environment
true
Require approval only on flags with the provided tags. Otherwise all flags will require approval.
["require-approval"]
Arbitrary service-specific configuration
{}
Which service to use for managing approvals
"launchdarkly"
Optional integration configuration ID of a custom approval integration. This is an Enterprise-only feature.
"1ef45a85-218f-4428-a8b2-a97e5f56c258"
Response
Successful response
Show child attributes
Show child attributes