You can create an approval request that prevents a flag change from being applied without approval from a team member. Select up to ten members as reviewers. Reviewers receive an email notification, but anyone with sufficient permissions can review a pending approval request. A change needs at least one approval before you can apply it. To learn more, read Approvals.
Changes that conflict will fail if approved and applied, and the flag will not be updated.
Several of the endpoints in the approvals API require a flag approval request ID. The flag approval request ID is returned as part of the Create approval request and List approval requests for a flag responses. It is the _id
field, or the _id
field of each element in the items
array. If you created the approval request as part of a workflow, you can also use a workflow ID as the approval request ID. The workflow ID is returned as part of the Create workflow and Get workflows responses. It is the _id
field, or the _id
field of each element in the items
array.
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,
- "autoApplyApprovedChanges": true,
- "serviceKind": "launchdarkly",
- "serviceConfig": { },
- "requiredApprovalTags": [
- "require-approval"
], - "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
}, - "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",
- "_access": {
- "denied": [
- {
- "action": "string",
- "reason": {
- "resources": [ ],
- "notResources": [ ],
- "actions": [ ],
- "notActions": [ ],
- "effect": null,
- "role_name": null
}
}
], - "allowed": [
- {
- "action": "string",
- "reason": {
- "resources": [ ],
- "notResources": [ ],
- "actions": [ ],
- "notActions": [ ],
- "effect": null,
- "role_name": null
}
}
]
}, - "tags": [
- "ops"
], - "defaultReleasePipelineKey": "string",
- "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": "sdk-xxx",
- "mobileKey": "mob-xxx",
- "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,
- "autoApplyApprovedChanges": null,
- "serviceKind": null,
- "serviceConfig": { },
- "requiredApprovalTags": [ ],
- "serviceKindConfigurationId": null
}, - "resourceApprovalSettings": {
- "property1": null,
- "property2": null
}, - "critical": true
}
]
}
}, - "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": "sdk-xxx",
- "mobileKey": "mob-xxx",
- "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,
- "autoApplyApprovedChanges": true,
- "serviceKind": "launchdarkly",
- "serviceConfig": { },
- "requiredApprovalTags": [
- "require-approval"
], - "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
}, - "resourceApprovalSettings": {
- "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"
}
}, - "critical": true
}
], - "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
}
}, - "resource": {
- "kind": "flag",
- "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
}
}, - "segment": {
- "name": "Example segment",
- "description": "Bundle our sample customers together",
- "tags": [
- "testing"
], - "creationDate": 0,
- "lastModifiedDate": 0,
- "key": "segment-key-123abc",
- "included": [
- "user-key-123abc"
], - "excluded": [
- "user-key-123abc"
], - "includedContexts": [
- {
- "values": [
- null
], - "contextKind": "string"
}
], - "excludedContexts": [
- {
- "values": [
- null
], - "contextKind": "string"
}
], - "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "rules": [
- {
- "_id": "1234a56b7c89d012345e678f",
- "clauses": [
- {
- "_id": "12ab3c45de678910fab12345",
- "attribute": "email",
- "negate": false,
- "op": "endsWith",
- "values": [
- ".edu"
]
}
]
}
], - "version": 1,
- "deleted": false,
- "_access": {
- "denied": [
- {
- "action": null,
- "reason": null
}
], - "allowed": [
- {
- "action": null,
- "reason": null
}
]
}, - "_flags": [
- {
- "name": "Example flag",
- "key": "flag-key-123abc",
- "_links": {
- "property1": null,
- "property2": null
}, - "_site": {
- "href": null,
- "type": null
}
}
], - "unbounded": false,
- "unboundedContextKind": "string",
- "generation": 0,
- "_unboundedMetadata": {
- "envId": "string",
- "segmentId": "string",
- "version": 0,
- "includedCount": 0,
- "excludedCount": 0,
- "lastModified": 0,
- "deleted": true
}, - "_external": "amplitude",
- "_importInProgress": false
}
}
}
], - "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": "proj/projKey:env/envKey:flag/flagKey",
- "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,
- "autoApplyApprovedChanges": true,
- "serviceKind": "launchdarkly",
- "serviceConfig": { },
- "requiredApprovalTags": [
- "require-approval"
], - "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
}
}
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,
- "autoApplyApprovedChanges": true,
- "serviceKind": "launchdarkly",
- "serviceConfig": { },
- "requiredApprovalTags": [
- "require-approval"
], - "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
}, - "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",
- "_access": {
- "denied": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- "string"
], - "actions": [
- "*"
], - "notActions": [
- "string"
], - "effect": "allow",
- "role_name": "string"
}
}
], - "allowed": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- "string"
], - "actions": [
- "*"
], - "notActions": [
- "string"
], - "effect": "allow",
- "role_name": "string"
}
}
]
}, - "tags": [
- "ops"
], - "defaultReleasePipelineKey": "string",
- "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": "sdk-xxx",
- "mobileKey": "mob-xxx",
- "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,
- "autoApplyApprovedChanges": true,
- "serviceKind": "launchdarkly",
- "serviceConfig": { },
- "requiredApprovalTags": [
- "require-approval"
], - "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
}, - "resourceApprovalSettings": {
- "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"
}
}, - "critical": true
}
]
}
}, - "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": "sdk-xxx",
- "mobileKey": "mob-xxx",
- "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,
- "autoApplyApprovedChanges": true,
- "serviceKind": "launchdarkly",
- "serviceConfig": { },
- "requiredApprovalTags": [
- "require-approval"
], - "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
}, - "resourceApprovalSettings": {
- "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"
}
}, - "critical": true
}
], - "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
}
}, - "resource": {
- "kind": "flag",
- "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
}
}, - "segment": {
- "name": "Example segment",
- "description": "Bundle our sample customers together",
- "tags": [
- "testing"
], - "creationDate": 0,
- "lastModifiedDate": 0,
- "key": "segment-key-123abc",
- "included": [
- "user-key-123abc"
], - "excluded": [
- "user-key-123abc"
], - "includedContexts": [
- {
- "values": [
- "string"
], - "contextKind": "string"
}
], - "excludedContexts": [
- {
- "values": [
- "string"
], - "contextKind": "string"
}
], - "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "rules": [
- {
- "_id": "1234a56b7c89d012345e678f",
- "clauses": [
- {
- "_id": "12ab3c45de678910fab12345",
- "attribute": "email",
- "negate": false,
- "op": "endsWith",
- "values": [
- ".edu"
]
}
]
}
], - "version": 1,
- "deleted": false,
- "_access": {
- "denied": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- null
], - "actions": [
- "*"
], - "notActions": [
- null
], - "effect": "allow",
- "role_name": "string"
}
}
], - "allowed": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- null
], - "actions": [
- "*"
], - "notActions": [
- null
], - "effect": "allow",
- "role_name": "string"
}
}
]
}, - "_flags": [
- {
- "name": "Example flag",
- "key": "flag-key-123abc",
- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "_site": {
- "href": "string",
- "type": "string"
}
}
], - "unbounded": false,
- "unboundedContextKind": "string",
- "generation": 0,
- "_unboundedMetadata": {
- "envId": "string",
- "segmentId": "string",
- "version": 0,
- "includedCount": 0,
- "excludedCount": 0,
- "lastModified": 0,
- "deleted": true
}, - "_external": "amplitude",
- "_importInProgress": false
}
}
}
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,
- "autoApplyApprovedChanges": true,
- "serviceKind": "launchdarkly",
- "serviceConfig": { },
- "requiredApprovalTags": [
- "require-approval"
], - "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
}
}
Review an approval request by approving or denying changes.
Approval request review response
Invalid request
Invalid access token
Invalid resource identifier
Method not allowed
Status conflict
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,
- "autoApplyApprovedChanges": true,
- "serviceKind": "launchdarkly",
- "serviceConfig": { },
- "requiredApprovalTags": [
- "require-approval"
], - "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
}
}
Get all approval requests for a feature flag.
Approval request collection response
Invalid access token
Forbidden
Invalid resource identifier
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"
}
}
}
], - "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}
}
Create an approval request for a feature flag.
Approval request response
Invalid request
Invalid access token
Forbidden
Rate limited
{- "comment": "optional comment",
- "description": "Requesting to update targeting",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "notifyMemberIds": [
- "1234a56b7c89d012345e678f"
], - "notifyTeamKeys": [
- "example-reviewer-team"
], - "executionDate": 0,
- "operatingOnId": "6297ed79dee7dc14e1f9a80c",
- "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"
}
}
}
Create an approval request to copy a feature flag's configuration across environments.
Approval request response
Invalid request
Invalid access token
Forbidden
Status conflict
Rate limited
{- "comment": "optional comment",
- "description": "copy flag settings to another environment",
- "notifyMemberIds": [
- "1234a56b7c89d012345e678f"
], - "notifyTeamKeys": [
- "example-reviewer-team"
], - "source": {
- "key": "environment-key-123abc",
- "version": 1
}, - "includedActions": [
- "updateOn"
], - "excludedActions": [
- "updateOn"
]
}
{- "_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"
}
}
}
Get a single approval request for a feature flag.
Approval request response
Invalid access token
Forbidden
Invalid resource identifier
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"
}
}
}
Delete an approval request for a feature flag.
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"
}
}
}
Review an approval request by approving or denying changes.
Approval request review response
Invalid request
Invalid access token
Forbidden
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"
}
}
}