Procedures

Automation procedures in the LaunchDarkly book.

circle-info

The following documentation is for LaunchDarkly v1.0.3 (BDK).

circle-exclamation

to create a flag in a project

Create a new feature flag within a given project.

Input Concepts

Concept
Description
Type
Required
Default Value

the project in which the new flag will be created

launch darkly project

Yes

(no default)

the flag object containing the configuration for the new feature flag

launch darkly flag

Yes

(no default)

Output Concepts

Concept
Description
Type

the newly created feature flag

launch darkly flag

Examples

the string is '{"name":"New Flag from Playground 2", "key":"new-flag-from-playground-2", "description":"A flag created from the playground"}'
get the string as json
use the above as the new flag
>>>
create the new flag in the test project

to get some (flag's status)

Get the status of a feature flag in a specific environment.

Input Concepts

Concept
Description
Type
Required
Default Value

the feature flag whose status will be retrieved

launch darkly flag

Yes

(no default)

the environment in which to check the flag's status

launch darkly environment

Yes

(no default)

Output Concepts

Concept
Description
Type

a flag status indicating whether the flag is enabled (on) or disabled (off)

launch darkly flag status

Examples

to get some (project's environments)

FILTER - CAPABLE

Get the environments of a project

Input Concepts

Concept
Description
Type
Required
Default Value

a Launch Darkly project

launch darkly project

Yes

(no default)

Output Concepts

Concept
Description
Type

a list of retrieved environments

launch darkly environment

Examples

Get a single environment with name Test. It can also be filtered by environment key.

to get some (project's flags)

FILTER - CAPABLE

Get the flags of a project

Input Concepts

Concept
Description
Type
Required
Default Value

a Launch Darkly project

launch darkly project

Yes

(no default)

Output Concepts

Concept
Description
Type

a list of retrieved flags

launch darkly flag

Examples

Get a single flag with key new-test-flag. It can also be filtered by flag name.

to get some (projects)

FILTER - CAPABLE

Get the projects in Launch Darkly

Output Concepts

Concept
Description
Type

a list of retrieved projects

launch darkly project

Examples

Get a single project with name "Kognitos - Test Project". It can also be filtered by project key.

to toggle some flag

Toggle the state of a feature flag in a specific environment.

Input Concepts

Concept
Description
Type
Required
Default Value

the feature flag to be toggled

launch darkly flag

Yes

(no default)

the environment in which to toggle the flag

launch darkly environment

Yes

(no default)

on

a boolean indicating the desired state; True to enable the flag, False to disable it

boolean

Yes

(no default)

Output Concepts

Concept
Description
Type

the updated status of the feature flag

launch darkly flag status

Examples

Last updated

Was this helpful?