Approvals (beta)

This feature is in beta

To use this feature, pass in a header including the LD-API-Version key with value set to beta. Use this header with each call. To learn more, read Beta resources.

Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.

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.

Here's an example:

{
  "instructions": [{
    "kind": "addReviewers",
    "notifyMemberIds": [ "user-key-123abc", "user-key-456def" ],
    "notifyTeamKeys": [ "team-key-789abc"]
  }]
}
Request
path Parameters
id
required
string <string>

The approval ID

Responses
200

Approval request response

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

patch/api/v2/approval-requests/{id}
Request samples
Response samples
application/json
{
  • "_id": "12ab3c45de678910abc12345",
  • "_version": 1,
  • "creationDate": 0,
  • "serviceKind": "string",
  • "requestorId": "12ab3c45de678910abc12345",
  • "description": "example: request approval from someone",
  • "reviewStatus": "pending",
  • "allReviews": [
    ],
  • "notifyMemberIds": [
    ],
  • "appliedDate": 0,
  • "appliedByMemberId": "1234a56b7c89d012345e678f",
  • "appliedByServiceTokenId": "1234a56b7c89d012345e678f",
  • "status": "pending",
  • "instructions": [
    ],
  • "conflicts": [
    ],
  • "_links": {
    },
  • "executionDate": 0,
  • "operatingOnId": "12ab3c45de678910abc12345",
  • "integrationMetadata": {
    },
  • "source": {
    },
  • "customWorkflowMetadata": {
    }
}

Update flag 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.
Request
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag key

environmentKey
required
string <string>

The environment key

id
required
string <string>

The approval ID

Responses
200

Approval request response

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

patch/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}
Request samples
Response samples
application/json
{
  • "_id": "12ab3c45de678910abc12345",
  • "_version": 1,
  • "creationDate": 0,
  • "serviceKind": "string",
  • "requestorId": "12ab3c45de678910abc12345",
  • "description": "example: request approval from someone",
  • "reviewStatus": "pending",
  • "allReviews": [
    ],
  • "notifyMemberIds": [
    ],
  • "appliedDate": 0,
  • "appliedByMemberId": "1234a56b7c89d012345e678f",
  • "appliedByServiceTokenId": "1234a56b7c89d012345e678f",
  • "status": "pending",
  • "instructions": [
    ],
  • "conflicts": [
    ],
  • "_links": {
    },
  • "executionDate": 0,
  • "operatingOnId": "12ab3c45de678910abc12345",
  • "integrationMetadata": {
    },
  • "source": {
    },
  • "customWorkflowMetadata": {
    }
}