For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • REST API overview
    • Access Tokens
    • Account Members
    • Account Usage Beta
    • AI Configs
    • Announcements
    • Applications Beta
    • Approvals
    • Approvals Beta
    • Audit Log
    • Code References
    • Contexts
    • Context Settings
    • Custom Roles
    • Data Export Destinations
    • Environments
    • Experiments
    • Feature Flags
    • Feature Flags Beta
    • Flag Import Configurations Beta
    • Flag Links Beta
    • Flag Triggers
    • Follow Flags
    • Holdouts Beta
    • Insights Charts Beta
    • Insights Deployments Beta
    • Insights Flag Events Beta
    • Insights Pull Requests Beta
    • Insights Repositories Beta
    • Insights Scores Beta
    • Integration Audit Log Subscriptions
    • Integration Delivery Configurations Beta
    • Integrations Beta
    • Layers
    • Metrics
    • Metrics Beta
    • OAuth2 Clients
    • Persistent Store Integrations Beta
    • Projects
    • Relay Proxy Configurations
    • Release Pipelines Beta
    • Releases Beta
    • Scheduled Changes
    • Segments
    • Tags
    • Teams
    • Teams Beta
    • Users
    • Users Beta
    • User Settings
    • Views Beta
    • Webhooks
    • Workflows
      • POSTCreate workflow
      • DELDelete workflow
      • GETGet custom workflow
      • GETGet workflows
    • Workflow Templates
    • Other
Sign inTry it free
LogoLogo
REST API overviewWorkflows

Get workflows

GET
/api/v2/projects/:projectKey/flags/:featureFlagKey/environments/:environmentKey/workflows
GET
/api/v2/projects/:projectKey/flags/:featureFlagKey/environments/:environmentKey/workflows
$curl https://app.launchdarkly.com/api/v2/projects/projectKey/flags/featureFlagKey/environments/environmentKey/workflows \
> -H "Authorization: <apiKey>"
1{
2 "items": [
3 {
4 "_id": "12ab3c4d5ef1a2345bcde67f",
5 "_version": 1,
6 "_conflicts": [
7 {
8 "stageId": "12ab3c4d5ef1a2345bcde67f",
9 "message": "string"
10 }
11 ],
12 "_creationDate": 1654104600000,
13 "_maintainerId": "12ab3c45de678910abc12345",
14 "_links": {},
15 "name": "Progressive rollout starting in two days",
16 "_execution": {
17 "status": "completed"
18 },
19 "description": "Turn flag on for 10% of customers each day",
20 "kind": "custom",
21 "stages": [
22 {
23 "_id": "12ab3c45de678910abc12345",
24 "conditions": [
25 {
26 "_id": "string",
27 "_execution": {
28 "status": "completed"
29 },
30 "description": "string",
31 "notifyMemberIds": [
32 "string"
33 ],
34 "allReviews": [
35 {
36 "_id": "string",
37 "kind": "string",
38 "creationDate": 1,
39 "comment": "string",
40 "memberId": "string",
41 "serviceTokenId": "string"
42 }
43 ],
44 "reviewStatus": "string",
45 "kind": "schedule",
46 "scheduleKind": "relative",
47 "waitDuration": 2,
48 "waitDurationUnit": "calendarDay",
49 "id": "12ab3c45de678910abc12345"
50 }
51 ],
52 "action": {
53 "kind": "patch",
54 "instructions": [
55 "[{\"kind\": \"turnFlagOn\"}]"
56 ]
57 },
58 "_execution": {
59 "status": "completed"
60 },
61 "name": "10% rollout on day 1"
62 }
63 ],
64 "meta": {
65 "parameters": [
66 {
67 "_id": "string",
68 "path": "string",
69 "default": {
70 "value": null,
71 "booleanVariationValue": true,
72 "ruleClause": {
73 "attribute": "string",
74 "op": "in",
75 "negate": true
76 }
77 },
78 "valid": true
79 }
80 ]
81 },
82 "templateKey": "example-workflow-template"
83 }
84 ],
85 "totalCount": 1,
86 "_links": {}
87}
Display workflows associated with a feature flag.
Was this page helpful?
Previous

Workflow Templates

Next
Built with

Authentication

Authorizationstring
API Key authentication via header

Path parameters

projectKeystringRequiredformat: "string"
The project key
featureFlagKeystringRequiredformat: "string"
The feature flag key
environmentKeystringRequiredformat: "string"
The environment key

Query parameters

statusstringOptionalformat: "string"

Filter results by workflow status. Valid status filters are active, completed, and failed.

sortstringOptionalformat: "string"

A field to sort the items by. Prefix field by a dash ( - ) to sort in descending order. This endpoint supports sorting by creationDate or stopDate.

limitlongOptional
The maximum number of workflows to return. Defaults to 20.
offsetlongOptional

Where to start in the list. Defaults to 0. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query limit.

Response

Workflows collection response
itemslist of objects
An array of workflows
totalCountinteger
Total number of workflows
_linksmap from strings to objects
The location and content type of related resources

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error