Approvals (beta)

Update approval request settings

PATCH
/api/v2/approval-requests/projects/{projectKey}/settings

Perform a partial update to approval request settings

Authorization

ApiKey read, write
Authorization<token>

In: header

Scope: read, write

Path Parameters

projectKey*string

Header Parameters

LD-API-Version*"beta"

Version of the endpoint.

Value in

  • "beta"

Request Body

application/json

Approval request settings to update

autoApplyApprovedChanges?|

Automatically apply changes that have been approved by all reviewers. This field is only applicable for approval services other than LaunchDarkly.

bypassApprovalsForPendingChanges?boolean

Whether to skip approvals for pending changes

canApplyDeclinedChanges?boolean

Allow applying the change as long as at least one person has approved

canReviewOwnRequest?boolean

Allow someone who makes an approval request to apply their own change

environmentKey*string
minNumApprovals?integer

Sets the amount of approvals required before a member can apply a change. The minimum is one and the maximum is five.

Formatint
required?boolean

If approvals are required for this environment

requiredApprovalTags?array<string>

Require approval only on flags with the provided tags. Otherwise all flags will require approval.

resourceKind*string
serviceConfig?

Arbitrary service-specific configuration

serviceKind?string

Which service to use for managing approvals

serviceKindConfigurationId?|

Optional integration configuration ID of a custom approval integration. This is an Enterprise-only feature.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/api/v2/approval-requests/projects/default/settings" \  -H "LD-API-Version: beta" \  -H "Content-Type: application/json" \  -d '{    "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"  }'
{  "property1": {    "environments": {      "property1": {        "required": true,        "bypassApprovalsForPendingChanges": false,        "minNumApprovals": 1,        "canReviewOwnRequest": false,        "canApplyDeclinedChanges": true,        "autoApplyApprovedChanges": true,        "serviceKind": "launchdarkly",        "serviceConfig": {},        "requiredApprovalTags": [          "require-approval"        ],        "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"      },      "property2": {        "required": true,        "bypassApprovalsForPendingChanges": false,        "minNumApprovals": 1,        "canReviewOwnRequest": false,        "canApplyDeclinedChanges": true,        "autoApplyApprovedChanges": true,        "serviceKind": "launchdarkly",        "serviceConfig": {},        "requiredApprovalTags": [          "require-approval"        ],        "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"      }    },    "_default": {      "required": true,      "bypassApprovalsForPendingChanges": false,      "minNumApprovals": 1,      "canReviewOwnRequest": false,      "canApplyDeclinedChanges": true,      "autoApplyApprovedChanges": true,      "serviceKind": "launchdarkly",      "serviceConfig": {},      "requiredApprovalTags": [        "require-approval"      ],      "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"    },    "_strict": {      "required": true,      "bypassApprovalsForPendingChanges": false,      "minNumApprovals": 1,      "canReviewOwnRequest": false,      "canApplyDeclinedChanges": true,      "autoApplyApprovedChanges": true,      "serviceKind": "launchdarkly",      "serviceConfig": {},      "requiredApprovalTags": [        "require-approval"      ],      "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"    }  },  "property2": {    "environments": {      "property1": {        "required": true,        "bypassApprovalsForPendingChanges": false,        "minNumApprovals": 1,        "canReviewOwnRequest": false,        "canApplyDeclinedChanges": true,        "autoApplyApprovedChanges": true,        "serviceKind": "launchdarkly",        "serviceConfig": {},        "requiredApprovalTags": [          "require-approval"        ],        "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"      },      "property2": {        "required": true,        "bypassApprovalsForPendingChanges": false,        "minNumApprovals": 1,        "canReviewOwnRequest": false,        "canApplyDeclinedChanges": true,        "autoApplyApprovedChanges": true,        "serviceKind": "launchdarkly",        "serviceConfig": {},        "requiredApprovalTags": [          "require-approval"        ],        "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"      }    },    "_default": {      "required": true,      "bypassApprovalsForPendingChanges": false,      "minNumApprovals": 1,      "canReviewOwnRequest": false,      "canApplyDeclinedChanges": true,      "autoApplyApprovedChanges": true,      "serviceKind": "launchdarkly",      "serviceConfig": {},      "requiredApprovalTags": [        "require-approval"      ],      "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"    },    "_strict": {      "required": true,      "bypassApprovalsForPendingChanges": false,      "minNumApprovals": 1,      "canReviewOwnRequest": false,      "canApplyDeclinedChanges": true,      "autoApplyApprovedChanges": true,      "serviceKind": "launchdarkly",      "serviceConfig": {},      "requiredApprovalTags": [        "require-approval"      ],      "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"    }  }}