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:457034721476302714390214
.projectKey
filters for only approvals that correspond to the specified project key. For example: filter=projectKey:my-project
.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
, and completed
. For example: filter=status:{"anyOf":["pending", "scheduled"]}
.You can also apply multiple filters at once. For example, setting filter=projectKey: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 toenvironment
includes the environment the approval request belongs 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"
}
], - "notifyMemberIds": [
- "1234a56b7c89d012345e678f"
], - "appliedDate": 0,
- "appliedByMemberId": "1234a56b7c89d012345e678f",
- "status": "pending",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "conflicts": [
- {
- "instruction": {
- "property1": null,
- "property2": null
}, - "reason": "string"
}
], - "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "executionDate": 0,
- "operatingOnId": "12ab3c45de678910abc12345",
- "integrationMetadata": {
- "externalId": "string",
- "externalStatus": {
- "display": "string",
- "value": "string"
}, - "externalUrl": "string",
- "lastChecked": 0
}, - "source": {
- "key": "example-source-feature-flag",
- "version": 1
}, - "customWorkflowMetadata": {
- "name": "Example workflow name",
- "stage": {
- "index": 0,
- "name": "Stage 1"
}
}, - "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": "my-project",
- "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": "my-environment",
- "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": [ ]
}
}
]
}
}, - "environment": {
- "_links": {
- "self": {
- "href": "/api/v2/projects/my-project/environments/my-environment",
- "type": "application/json"
}
}, - "_id": "57be1db38b75bf0772d11384",
- "key": "my-environment",
- "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": "my-flag",
- "_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": "An",
- "lastName": "Example",
- "role": "admin",
- "email": "a.example@example.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"
}
}
}
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 toenvironment
includes the environment the approval request belongs 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"
}
], - "notifyMemberIds": [
- "1234a56b7c89d012345e678f"
], - "appliedDate": 0,
- "appliedByMemberId": "1234a56b7c89d012345e678f",
- "status": "pending",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "conflicts": [
- {
- "instruction": {
- "property1": null,
- "property2": null
}, - "reason": "string"
}
], - "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "executionDate": 0,
- "operatingOnId": "12ab3c45de678910abc12345",
- "integrationMetadata": {
- "externalId": "string",
- "externalStatus": {
- "display": "string",
- "value": "string"
}, - "externalUrl": "string",
- "lastChecked": 0
}, - "source": {
- "key": "example-source-feature-flag",
- "version": 1
}, - "customWorkflowMetadata": {
- "name": "Example workflow name",
- "stage": {
- "index": 0,
- "name": "Stage 1"
}
}, - "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": "my-project",
- "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": "my-environment",
- "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"
]
}
}
]
}
}, - "environment": {
- "_links": {
- "self": {
- "href": "/api/v2/projects/my-project/environments/my-environment",
- "type": "application/json"
}
}, - "_id": "57be1db38b75bf0772d11384",
- "key": "my-environment",
- "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": "my-flag",
- "_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": "An",
- "lastName": "Example",
- "role": "admin",
- "email": "a.example@example.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
}
}
}