Procedures

Automation procedures in the LaunchDarkly BDK Book.

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

the flag object containing the configuration for the new feature flag

launch darkly flag

Yes

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

the environment in which to check the flag's status

launch darkly environment

Yes

Output Concepts

Concept
Description
Type

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

launch darkly flag status

Examples

get the test project's environment whose name is "test"
use the above as the environment
get the test project's flag whose key is "new-test-flag"
use the above as the test flag
>>>
get the test flag's status where
    the environment is the environment

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

Output Concepts

Concept
Description
Type

a list of retrieved environments

launch darkly environment

Examples

get a project whose name is "Kognitos - Test Project"
use the above as the test project
get the test project's environments

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

...
get the test project's environment whose name is "Test"

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

Output Concepts

Concept
Description
Type

a list of retrieved flags

launch darkly flag

Examples

get a project whose name is "Kognitos - Test Project"
use the above as the test project
get the test project's flags

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

...
get the test project's flag whose key is "new-test-flag"

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 some projects

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

get some projects whose name is "Kognitos - Test Project"

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

the environment in which to toggle the flag

launch darkly environment

Yes

on

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

boolean

Yes

Output Concepts

Concept
Description
Type

the updated status of the feature flag

launch darkly flag status

Examples

toggle the test flag with
    the environment is the environment
    the on is 'true'

Last updated

Was this helpful?