LaunchDarkly Developer Documentation

Get started in under 30 minutes.
LaunchDarkly provides feature flags as a service for Java · Python · Ruby · Go · Node.js · PHP · .NET. Control feature launches -- who sees what and when -- without multiple code deploys. Easy dashboard for phased rollouts, targeting and segmenting.
Need more help? write us at support@launchdarkly.com

Get Started    

Prerequisites

Prerequisites allow you to control feature dependencies in LaunchDarkly. In other words, you can add a list of flags and their expected values as prerequisites to enable a feature.

Let's say we have two flags that control an API: api_reads and api_writes. In this case, it makes no sense to have write access to the API if you do not have read access.

With prerequisites, you can make sure that api_reads is On with the user receiving true before api_writes is evaluated for that user.

You can manage your prerequisites in the feature flag's Targeting tab:

To meet a prerequisite, the prerequisite flag must be On, and the current user must receive the specified variation.

Circular Dependencies

LaunchDarkly will automatically detect circular dependencies when you add a prerequisite.

Attributes

Note that if flag A has flag B as a prerequisite, then callers relying on flag A need to also include all user attributes needed to evaluate flag B, in addition to any user attributes normally supplied for flag A.

Deleting Flags With Prerequisites

You cannot remove a flag that other flags are dependent on. You must first remove the dependency before the flag can be deleted.

Prerequisites