This feature is in beta
To use this feature, pass in a header including the
LD-API-Version
key with value set tobeta
. 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.
Get all approval requests.
LaunchDarkly supports the filter
query param for filtering, with the following fields:
notifyMemberIds
filters for only approvals that are assigned to a member in the specified list. For example: filter=notifyMemberIds anyOf ["memberId1", "memberId2"]
.requestorId
filters for only approvals that correspond to the ID of the member who requested the approval. For example: filter=requestorId equals 457034721476302714390214
.resourceId
filters for only approvals that correspond to the the specified resource identifier. For example: filter=resourceId equals proj/my-project:env/my-environment:flag/my-flag
.reviewStatus
filters for only approvals which correspond to the review status in the specified list. The possible values are approved
, declined
, and pending
. For example: filter=reviewStatus anyOf ["pending", "approved"]
.status
filters for only approvals which correspond to the status in the specified list. The possible values are pending
, scheduled
, failed
, and completed
. For example: filter=status anyOf ["pending", "scheduled"]
.You can also apply multiple filters at once. For example, setting filter=projectKey equals my-project, reviewStatus anyOf ["pending","approved"]
matches approval requests which correspond to the my-project
project key, and a review status of either pending
or approved
.
LaunchDarkly supports the expand
query param to include additional fields in the response, with the following fields:
flag
includes the flag the approval request belongs toproject
includes the project the approval request belongs toenvironments
includes the environments the approval request relates toFor example, expand=project,flag
includes the project
and flag
fields in the response.
Approval request collection response
Unsupported filter field. Filter field must be one of: requestorId, projectKey, notifyMemberIds, reviewStatus, or status
Invalid access token
Forbidden
Rate limited
{- "items": [
- {
- "_id": "12ab3c45de678910abc12345",
- "_version": 1,
- "creationDate": 0,
- "serviceKind": "string",
- "requestorId": "12ab3c45de678910abc12345",
- "description": "example: request approval from someone",
- "reviewStatus": "pending",
- "allReviews": [
- {
- "_id": "12ab3c45de678910abc12345",
- "kind": "approve",
- "creationDate": 0,
- "comment": "Approved!",
- "memberId": "12ab3c45de678910abc12345",
- "serviceTokenId": "12ab3c45de678910abc12345"
}
], - "notifyMemberIds": [
- "1234a56b7c89d012345e678f"
], - "appliedDate": 0,
- "appliedByMemberId": "1234a56b7c89d012345e678f",
- "appliedByServiceTokenId": "1234a56b7c89d012345e678f",
- "status": "pending",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "conflicts": [
- {
- "instruction": {
- "property1": null,
- "property2": null
}, - "reason": "string"
}
], - "_links": {
- "property1": null,
- "property2": null
}, - "executionDate": 0,
- "operatingOnId": "12ab3c45de678910abc12345",
- "integrationMetadata": {
- "externalId": "string",
- "externalStatus": {
- "display": "string",
- "value": "string"
}, - "externalUrl": "string",
- "lastChecked": 0
}, - "source": {
- "key": "source-flag-key-123abc",
- "version": 1
}, - "customWorkflowMetadata": {
- "name": "Example workflow name",
- "stage": {
- "index": 0,
- "name": "Stage 1"
}
}, - "resourceId": "string",
- "approvalSettings": {
- "required": true,
- "bypassApprovalsForPendingChanges": false,
- "minNumApprovals": 1,
- "canReviewOwnRequest": false,
- "canApplyDeclinedChanges": true,
- "serviceKind": "launchdarkly",
- "serviceConfig": { },
- "requiredApprovalTags": [
- "require-approval"
]
}, - "project": {
- "_links": {
- "environments": {
- "href": "/api/v2/projects/my-project/environments",
- "type": "application/json"
}, - "self": {
- "href": "/api/v2/projects/my-project",
- "type": "application/json"
}
}, - "_id": "57be1db38b75bf0772d11383",
- "key": "project-key-123abc",
- "includeInSnippetByDefault": true,
- "defaultClientSideAvailability": {
- "usingMobileKey": true,
- "usingEnvironmentId": true
}, - "name": "My Project",
- "tags": [
- "ops"
], - "environments": {
- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "totalCount": 2,
- "items": [
- {
- "_links": {
- "self": {
- "href": "/api/v2/projects/my-project/environments/my-environment",
- "type": "application/json"
}
}, - "_id": "57be1db38b75bf0772d11384",
- "key": "environment-key-123abc",
- "name": "My Environment",
- "apiKey": "XYZ",
- "mobileKey": "XYZ",
- "color": "F5A623",
- "defaultTtl": 5,
- "secureMode": true,
- "defaultTrackEvents": false,
- "requireComments": true,
- "confirmChanges": true,
- "tags": [
- "ops"
], - "approvalSettings": {
- "required": null,
- "bypassApprovalsForPendingChanges": null,
- "minNumApprovals": null,
- "canReviewOwnRequest": null,
- "canApplyDeclinedChanges": null,
- "serviceKind": null,
- "serviceConfig": { },
- "requiredApprovalTags": [ ]
}
}
]
}
}, - "environments": [
- {
- "_links": {
- "self": {
- "href": "/api/v2/projects/my-project/environments/my-environment",
- "type": "application/json"
}
}, - "_id": "57be1db38b75bf0772d11384",
- "key": "environment-key-123abc",
- "name": "My Environment",
- "apiKey": "XYZ",
- "mobileKey": "XYZ",
- "color": "F5A623",
- "defaultTtl": 5,
- "secureMode": true,
- "defaultTrackEvents": false,
- "requireComments": true,
- "confirmChanges": true,
- "tags": [
- "ops"
], - "approvalSettings": {
- "required": true,
- "bypassApprovalsForPendingChanges": false,
- "minNumApprovals": 1,
- "canReviewOwnRequest": false,
- "canApplyDeclinedChanges": true,
- "serviceKind": "launchdarkly",
- "serviceConfig": { },
- "requiredApprovalTags": [
- "require-approval"
]
}
}
], - "flag": {
- "name": "My Flag",
- "kind": "boolean",
- "description": "This flag controls the example widgets",
- "key": "flag-key-123abc",
- "_version": 1,
- "creationDate": 0,
- "includeInSnippet": true,
- "clientSideAvailability": {
- "usingMobileKey": true,
- "usingEnvironmentId": true
}, - "variations": [
- {
- "_id": "e432f62b-55f6-49dd-a02f-eb24acf39d05",
- "value": true
}, - {
- "_id": "a00bf58d-d252-476c-b915-15a74becacb4",
- "value": false
}
], - "temporary": true,
- "tags": [
- "example-tag"
], - "_links": {
- "parent": {
- "href": "/api/v2/flags/my-project",
- "type": "application/json"
}, - "self": {
- "href": "/api/v2/flags/my-project/my-flag",
- "type": "application/json"
}
}, - "maintainerId": "569f183514f4432160000007",
- "_maintainer": {
- "_links": {
- "self": {
- "href": "/api/v2/members/569f183514f4432160000007",
- "type": "application/json"
}
}, - "_id": "569f183514f4432160000007",
- "firstName": "Ariel",
- "lastName": "Flores",
- "role": "admin",
- "email": "ariel@acme.com"
}, - "customProperties": {
- "property1": {
- "name": "Jira issues",
- "value": [
- "is-123",
- "is-456"
]
}, - "property2": {
- "name": "Jira issues",
- "value": [
- "is-123",
- "is-456"
]
}
}, - "archived": false,
- "archivedDate": 0,
- "defaults": {
- "onVariation": 0,
- "offVariation": 1
}
}
}
], - "totalCount": 1,
- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}
}
Create an approval request.
This endpoint currently supports creating an approval request for a flag across all environments with the following instructions:
addVariation
removeVariation
updateVariation
updateDefaultVariation
For details on using these instructions, read Update feature flag.
To create an approval for a flag specific to an environment, use Create approval request for a flag.
Approval request response
Invalid request
Invalid access token
Forbidden
Rate limited
{- "resourceId": "string",
- "comment": "optional comment",
- "description": "Requesting to update targeting",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "notifyMemberIds": [
- "1234a56b7c89d012345e678f"
], - "notifyTeamKeys": [
- "example-reviewer-team"
], - "integrationConfig": {
- "property1": null,
- "property2": null
}
}
{- "_id": "12ab3c45de678910abc12345",
- "_version": 1,
- "creationDate": 0,
- "serviceKind": "string",
- "requestorId": "12ab3c45de678910abc12345",
- "description": "example: request approval from someone",
- "reviewStatus": "pending",
- "allReviews": [
- {
- "_id": "12ab3c45de678910abc12345",
- "kind": "approve",
- "creationDate": 0,
- "comment": "Approved!",
- "memberId": "12ab3c45de678910abc12345",
- "serviceTokenId": "12ab3c45de678910abc12345"
}
], - "notifyMemberIds": [
- "1234a56b7c89d012345e678f"
], - "appliedDate": 0,
- "appliedByMemberId": "1234a56b7c89d012345e678f",
- "appliedByServiceTokenId": "1234a56b7c89d012345e678f",
- "status": "pending",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "conflicts": [
- {
- "instruction": {
- "property1": null,
- "property2": null
}, - "reason": "string"
}
], - "_links": {
- "property1": null,
- "property2": null
}, - "executionDate": 0,
- "operatingOnId": "12ab3c45de678910abc12345",
- "integrationMetadata": {
- "externalId": "string",
- "externalStatus": {
- "display": "string",
- "value": "string"
}, - "externalUrl": "string",
- "lastChecked": 0
}, - "source": {
- "key": "source-flag-key-123abc",
- "version": 1
}, - "customWorkflowMetadata": {
- "name": "Example workflow name",
- "stage": {
- "index": 0,
- "name": "Stage 1"
}
}, - "resourceId": "string",
- "approvalSettings": {
- "required": true,
- "bypassApprovalsForPendingChanges": false,
- "minNumApprovals": 1,
- "canReviewOwnRequest": false,
- "canApplyDeclinedChanges": true,
- "serviceKind": "launchdarkly",
- "serviceConfig": { },
- "requiredApprovalTags": [
- "require-approval"
]
}
}
Get an approval request by approval request ID.
LaunchDarkly supports the expand
query param to include additional fields in the response, with the following fields:
flag
includes the flag the approval request belongs toproject
includes the project the approval request belongs toenvironments
includes the environments the approval request relates toFor example, expand=project,flag
includes the project
and flag
fields in the response.
Approval request response
Invalid Request
Invalid access token
Forbidden
Unable to find approval request
Rate limited
{- "_id": "12ab3c45de678910abc12345",
- "_version": 1,
- "creationDate": 0,
- "serviceKind": "string",
- "requestorId": "12ab3c45de678910abc12345",
- "description": "example: request approval from someone",
- "reviewStatus": "pending",
- "allReviews": [
- {
- "_id": "12ab3c45de678910abc12345",
- "kind": "approve",
- "creationDate": 0,
- "comment": "Approved!",
- "memberId": "12ab3c45de678910abc12345",
- "serviceTokenId": "12ab3c45de678910abc12345"
}
], - "notifyMemberIds": [
- "1234a56b7c89d012345e678f"
], - "appliedDate": 0,
- "appliedByMemberId": "1234a56b7c89d012345e678f",
- "appliedByServiceTokenId": "1234a56b7c89d012345e678f",
- "status": "pending",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "conflicts": [
- {
- "instruction": {
- "property1": null,
- "property2": null
}, - "reason": "string"
}
], - "_links": {
- "property1": null,
- "property2": null
}, - "executionDate": 0,
- "operatingOnId": "12ab3c45de678910abc12345",
- "integrationMetadata": {
- "externalId": "string",
- "externalStatus": {
- "display": "string",
- "value": "string"
}, - "externalUrl": "string",
- "lastChecked": 0
}, - "source": {
- "key": "source-flag-key-123abc",
- "version": 1
}, - "customWorkflowMetadata": {
- "name": "Example workflow name",
- "stage": {
- "index": 0,
- "name": "Stage 1"
}
}, - "resourceId": "string",
- "approvalSettings": {
- "required": true,
- "bypassApprovalsForPendingChanges": false,
- "minNumApprovals": 1,
- "canReviewOwnRequest": false,
- "canApplyDeclinedChanges": true,
- "serviceKind": "launchdarkly",
- "serviceConfig": { },
- "requiredApprovalTags": [
- "require-approval"
]
}, - "project": {
- "_links": {
- "environments": {
- "href": "/api/v2/projects/my-project/environments",
- "type": "application/json"
}, - "self": {
- "href": "/api/v2/projects/my-project",
- "type": "application/json"
}
}, - "_id": "57be1db38b75bf0772d11383",
- "key": "project-key-123abc",
- "includeInSnippetByDefault": true,
- "defaultClientSideAvailability": {
- "usingMobileKey": true,
- "usingEnvironmentId": true
}, - "name": "My Project",
- "tags": [
- "ops"
], - "environments": {
- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "totalCount": 2,
- "items": [
- {
- "_links": {
- "self": {
- "href": "/api/v2/projects/my-project/environments/my-environment",
- "type": "application/json"
}
}, - "_id": "57be1db38b75bf0772d11384",
- "key": "environment-key-123abc",
- "name": "My Environment",
- "apiKey": "XYZ",
- "mobileKey": "XYZ",
- "color": "F5A623",
- "defaultTtl": 5,
- "secureMode": true,
- "defaultTrackEvents": false,
- "requireComments": true,
- "confirmChanges": true,
- "tags": [
- "ops"
], - "approvalSettings": {
- "required": true,
- "bypassApprovalsForPendingChanges": false,
- "minNumApprovals": 1,
- "canReviewOwnRequest": false,
- "canApplyDeclinedChanges": true,
- "serviceKind": "launchdarkly",
- "serviceConfig": { },
- "requiredApprovalTags": [
- "require-approval"
]
}
}
]
}
}, - "environments": [
- {
- "_links": {
- "self": {
- "href": "/api/v2/projects/my-project/environments/my-environment",
- "type": "application/json"
}
}, - "_id": "57be1db38b75bf0772d11384",
- "key": "environment-key-123abc",
- "name": "My Environment",
- "apiKey": "XYZ",
- "mobileKey": "XYZ",
- "color": "F5A623",
- "defaultTtl": 5,
- "secureMode": true,
- "defaultTrackEvents": false,
- "requireComments": true,
- "confirmChanges": true,
- "tags": [
- "ops"
], - "approvalSettings": {
- "required": true,
- "bypassApprovalsForPendingChanges": false,
- "minNumApprovals": 1,
- "canReviewOwnRequest": false,
- "canApplyDeclinedChanges": true,
- "serviceKind": "launchdarkly",
- "serviceConfig": { },
- "requiredApprovalTags": [
- "require-approval"
]
}
}
], - "flag": {
- "name": "My Flag",
- "kind": "boolean",
- "description": "This flag controls the example widgets",
- "key": "flag-key-123abc",
- "_version": 1,
- "creationDate": 0,
- "includeInSnippet": true,
- "clientSideAvailability": {
- "usingMobileKey": true,
- "usingEnvironmentId": true
}, - "variations": [
- {
- "_id": "e432f62b-55f6-49dd-a02f-eb24acf39d05",
- "value": true
}, - {
- "_id": "a00bf58d-d252-476c-b915-15a74becacb4",
- "value": false
}
], - "temporary": true,
- "tags": [
- "example-tag"
], - "_links": {
- "parent": {
- "href": "/api/v2/flags/my-project",
- "type": "application/json"
}, - "self": {
- "href": "/api/v2/flags/my-project/my-flag",
- "type": "application/json"
}
}, - "maintainerId": "569f183514f4432160000007",
- "_maintainer": {
- "_links": {
- "self": {
- "href": "/api/v2/members/569f183514f4432160000007",
- "type": "application/json"
}
}, - "_id": "569f183514f4432160000007",
- "firstName": "Ariel",
- "lastName": "Flores",
- "role": "admin",
- "email": "ariel@acme.com"
}, - "customProperties": {
- "property1": {
- "name": "Jira issues",
- "value": [
- "is-123",
- "is-456"
]
}, - "property2": {
- "name": "Jira issues",
- "value": [
- "is-123",
- "is-456"
]
}
}, - "archived": false,
- "archivedDate": 0,
- "defaults": {
- "onVariation": 0,
- "offVariation": 1
}
}
}
Delete an approval request.
Action succeeded
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
{- "code": "unauthorized",
- "message": "Invalid access token"
}
Apply an approval request that has been approved.
Approval request apply response
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
{- "comment": "Looks good, thanks for updating"
}
{- "_id": "12ab3c45de678910abc12345",
- "_version": 1,
- "creationDate": 0,
- "serviceKind": "string",
- "requestorId": "12ab3c45de678910abc12345",
- "description": "example: request approval from someone",
- "reviewStatus": "pending",
- "allReviews": [
- {
- "_id": "12ab3c45de678910abc12345",
- "kind": "approve",
- "creationDate": 0,
- "comment": "Approved!",
- "memberId": "12ab3c45de678910abc12345",
- "serviceTokenId": "12ab3c45de678910abc12345"
}
], - "notifyMemberIds": [
- "1234a56b7c89d012345e678f"
], - "appliedDate": 0,
- "appliedByMemberId": "1234a56b7c89d012345e678f",
- "appliedByServiceTokenId": "1234a56b7c89d012345e678f",
- "status": "pending",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "conflicts": [
- {
- "instruction": {
- "property1": null,
- "property2": null
}, - "reason": "string"
}
], - "_links": {
- "property1": null,
- "property2": null
}, - "executionDate": 0,
- "operatingOnId": "12ab3c45de678910abc12345",
- "integrationMetadata": {
- "externalId": "string",
- "externalStatus": {
- "display": "string",
- "value": "string"
}, - "externalUrl": "string",
- "lastChecked": 0
}, - "source": {
- "key": "source-flag-key-123abc",
- "version": 1
}, - "customWorkflowMetadata": {
- "name": "Example workflow name",
- "stage": {
- "index": 0,
- "name": "Stage 1"
}
}, - "resourceId": "string",
- "approvalSettings": {
- "required": true,
- "bypassApprovalsForPendingChanges": false,
- "minNumApprovals": 1,
- "canReviewOwnRequest": false,
- "canApplyDeclinedChanges": true,
- "serviceKind": "launchdarkly",
- "serviceConfig": { },
- "requiredApprovalTags": [
- "require-approval"
]
}
}
Review an approval request by approving or denying changes.
Approval request review response
Invalid request
Invalid access token
Invalid resource identifier
Rate limited
{- "kind": "approve",
- "comment": "Looks good, thanks for updating"
}
{- "_id": "12ab3c45de678910abc12345",
- "_version": 1,
- "creationDate": 0,
- "serviceKind": "string",
- "requestorId": "12ab3c45de678910abc12345",
- "description": "example: request approval from someone",
- "reviewStatus": "pending",
- "allReviews": [
- {
- "_id": "12ab3c45de678910abc12345",
- "kind": "approve",
- "creationDate": 0,
- "comment": "Approved!",
- "memberId": "12ab3c45de678910abc12345",
- "serviceTokenId": "12ab3c45de678910abc12345"
}
], - "notifyMemberIds": [
- "1234a56b7c89d012345e678f"
], - "appliedDate": 0,
- "appliedByMemberId": "1234a56b7c89d012345e678f",
- "appliedByServiceTokenId": "1234a56b7c89d012345e678f",
- "status": "pending",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "conflicts": [
- {
- "instruction": {
- "property1": null,
- "property2": null
}, - "reason": "string"
}
], - "_links": {
- "property1": null,
- "property2": null
}, - "executionDate": 0,
- "operatingOnId": "12ab3c45de678910abc12345",
- "integrationMetadata": {
- "externalId": "string",
- "externalStatus": {
- "display": "string",
- "value": "string"
}, - "externalUrl": "string",
- "lastChecked": 0
}, - "source": {
- "key": "source-flag-key-123abc",
- "version": 1
}, - "customWorkflowMetadata": {
- "name": "Example workflow name",
- "stage": {
- "index": 0,
- "name": "Stage 1"
}
}, - "resourceId": "string",
- "approvalSettings": {
- "required": true,
- "bypassApprovalsForPendingChanges": false,
- "minNumApprovals": 1,
- "canReviewOwnRequest": false,
- "canApplyDeclinedChanges": true,
- "serviceKind": "launchdarkly",
- "serviceConfig": { },
- "requiredApprovalTags": [
- "require-approval"
]
}
}