Workflows (beta)

A workflow is a set of actions that you can schedule in advance to make changes to a feature flag. You can also include approval requests at different stages of a workflow.

The actions supported are as follows:

  • Turning targeting ON or OFF
  • Setting the default variation
  • Creating a rule to target a group of users by segment
  • Modifying the rollout percentage for rules

You can create multiple stages of a flag release workflow. Unique stages are defined by their conditions: either approvals and/or scheduled changes.

Get workflows

Get workflows from a feature flag

Request
Security:
ApiKey (readwrite)
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag's key

environmentKey
required
string <string>

The environment key

Responses
200
401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

get/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows
Request samples
curl -i -X GET \
  https://app.launchdarkly.com/api/v2/projects/:projectKey/flags/:featureFlagKey/environments/:environmentKey/workflows \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "items": [
    ]
}

Create workflow

Create a workflow for a feature flag

Request
Security:
ApiKey (readwrite)
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag's key

environmentKey
required
string <string>

The environment key

Request Body schema: application/json
maintainerId
string (ObjectId)
name
string
description
required
string
Array of objects (StageInputRep)
Responses
201

Successful workflow response

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

post/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows
Request samples
application/json
{
  • "maintainerId": "string",
  • "name": "string",
  • "description": "string",
  • "stages": [
    ]
}
Response samples
application/json
{
  • "_id": "string",
  • "_version": 0,
  • "_conflicts": [
    ],
  • "_creationDate": 0,
  • "_maintainerId": "string",
  • "_links": {
    },
  • "name": "string",
  • "description": "string",
  • "kind": "string",
  • "stages": [
    ],
  • "_execution": {
    }
}

Get custom workflow

Get a specific workflow by ID

Request
Security:
ApiKey (readwrite)
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag's key

environmentKey
required
string <string>

The environment key

workflowId
required
string <string>

The workflow ID

Responses
200
401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

get/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows/{workflowId}
Request samples
curl -i -X GET \
  https://app.launchdarkly.com/api/v2/projects/:projectKey/flags/:featureFlagKey/environments/:environmentKey/workflows/:workflowId \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "_id": "string",
  • "_version": 0,
  • "_conflicts": [
    ],
  • "_creationDate": 0,
  • "_maintainerId": "string",
  • "_links": {
    },
  • "name": "string",
  • "description": "string",
  • "kind": "string",
  • "stages": [
    ],
  • "_execution": {
    }
}

Delete workflow

Delete a workflow from a feature flag

Request
Security:
ApiKey (readwrite)
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag's key

environmentKey
required
string <string>

The environment key

workflowId
required
string <string>

The workflow id

Responses
204

Action completed successfully

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

delete/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows/{workflowId}
Request samples
curl -i -X DELETE \
  https://app.launchdarkly.com/api/v2/projects/:projectKey/flags/:featureFlagKey/environments/:environmentKey/workflows/:workflowId \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "code": "invalid_request",
  • "message": "invalid request body"
}