Workflows is an add-on feature
Workflows is available to customers on an Enterprise plan. To learn more, read about our pricing. To upgrade your plan, contact Sales.
A workflow is a set of actions that you can schedule in advance to make changes to a feature flag at a future date and time. You can also include approval requests at different stages of a workflow. To learn more, read Workflows.
The actions supported are as follows:
ON
or OFF
You can create multiple stages of a flag release workflow. Unique stages are defined by their conditions: either approvals and/or scheduled changes.
Display workflows associated with a feature flag.
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
curl -i -X GET \ 'https://app.launchdarkly.com/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows' \ -H 'Authorization: YOUR_API_KEY_HERE'
{- "items": [
- {
- "_id": "string",
- "_version": 0,
- "_conflicts": [
- {
- "stageId": "string",
- "message": "string"
}
], - "_creationDate": 0,
- "_maintainerId": "string",
- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "name": "string",
- "description": "string",
- "kind": "string",
- "stages": [
- {
- "_id": "string",
- "name": "string",
- "conditions": [
- {
- "_id": "string",
- "kind": "string",
- "_execution": {
- "status": null
}, - "scheduleKind": "string",
- "executionDate": 0,
- "waitDuration": 0,
- "waitDurationUnit": "string",
- "description": "string",
- "notifyMemberIds": [
- null
], - "allReviews": [
- null
], - "reviewStatus": "string",
- "appliedDate": 0
}
], - "action": {
- "kind": "string",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
]
}, - "_execution": {
- "status": "string"
}
}
], - "_execution": {
- "status": "string"
}
}
]
}
Create a workflow for a feature flag.
Successful workflow response
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
{- "maintainerId": "string",
- "name": "string",
- "description": "string",
- "stages": [
- {
- "name": "string",
- "executeConditionsInSequence": true,
- "conditions": [
- {
- "scheduleKind": "string",
- "executionDate": 0,
- "waitDuration": 0,
- "waitDurationUnit": "string",
- "executeNow": true,
- "description": "string",
- "notifyMemberIds": [
- "string"
], - "kind": "string"
}
], - "action": {
- "instructions": null
}
}
]
}
{- "_id": "string",
- "_version": 0,
- "_conflicts": [
- {
- "stageId": "string",
- "message": "string"
}
], - "_creationDate": 0,
- "_maintainerId": "string",
- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "name": "string",
- "description": "string",
- "kind": "string",
- "stages": [
- {
- "_id": "string",
- "name": "string",
- "conditions": [
- {
- "_id": "string",
- "kind": "string",
- "_execution": {
- "status": "string"
}, - "scheduleKind": "string",
- "executionDate": 0,
- "waitDuration": 0,
- "waitDurationUnit": "string",
- "description": "string",
- "notifyMemberIds": [
- "string"
], - "allReviews": [
- {
- "_id": "string",
- "kind": "string",
- "creationDate": 0,
- "comment": "string",
- "memberId": "string"
}
], - "reviewStatus": "string",
- "appliedDate": 0
}
], - "action": {
- "kind": "string",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
]
}, - "_execution": {
- "status": "string"
}
}
], - "_execution": {
- "status": "string"
}
}
Get a specific workflow by ID.
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
curl -i -X GET \ 'https://app.launchdarkly.com/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows/{workflowId}' \ -H 'Authorization: YOUR_API_KEY_HERE'
{- "_id": "string",
- "_version": 0,
- "_conflicts": [
- {
- "stageId": "string",
- "message": "string"
}
], - "_creationDate": 0,
- "_maintainerId": "string",
- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "name": "string",
- "description": "string",
- "kind": "string",
- "stages": [
- {
- "_id": "string",
- "name": "string",
- "conditions": [
- {
- "_id": "string",
- "kind": "string",
- "_execution": {
- "status": "string"
}, - "scheduleKind": "string",
- "executionDate": 0,
- "waitDuration": 0,
- "waitDurationUnit": "string",
- "description": "string",
- "notifyMemberIds": [
- "string"
], - "allReviews": [
- {
- "_id": "string",
- "kind": "string",
- "creationDate": 0,
- "comment": "string",
- "memberId": "string"
}
], - "reviewStatus": "string",
- "appliedDate": 0
}
], - "action": {
- "kind": "string",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
]
}, - "_execution": {
- "status": "string"
}
}
], - "_execution": {
- "status": "string"
}
}
Delete a workflow from a feature flag.
Action completed successfully
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
curl -i -X DELETE \ 'https://app.launchdarkly.com/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows/{workflowId}' \ -H 'Authorization: YOUR_API_KEY_HERE'
{- "code": "invalid_request",
- "message": "invalid request body"
}