This topic explains how the all flags feature works in the LaunchDarkly SDKs that support it. The all flags feature is available for client-side, server-side, and edge SDKs.
The all flags feature returns an object containing the variation values of all the feature flags targeted to a specific context object or user object.
Server-side SDKs also return metadata for use on the front end, including information on flag keys, variations, and prerequisites. You can use this metadata to provide bootstrap flag settings for LaunchDarkly’s JavaScript-based SDKs. To learn more, read the JavaScript SDK reference.
You can find the expected flag values for a specific context on its details page:

The allFlags method does not send analytics events to LaunchDarkly by default for most SDKs. The exceptions to this are Electron, Node.js (client-side), Vue, and older versions of the JavaScript SDKs, which do send analytics events by default. For these SDKs, you can disable sending analytics events when calling the all flags method if needed. To learn more about what analytics events do in LaunchDarkly, read Analytics events.
For client-side SDKs, the all flags feature may return a null value in cases where a flag’s fallback value would be served to the end user.
For server-side SDKs, you can use the all flags feature to pass feature flags to your front end. In particular, you can use it to provide bootstrap flag settings for the JavaScript SDK. To learn more about bootstrapping from a client-side SDK, read Bootstrapping.
Details about each SDK’s configuration are available in the SDK-specific sections below:
A context is a generalized way of referring to the people, services, machines, or other resources that encounter feature flags in your product. Contexts replace another data object in LaunchDarkly: “users.”
Creating contexts and evaluating flags based on them is supported in the latest major versions of most of our SDKs. For these SDKs, the code samples on this page include the two most recent versions.
Before you implement this feature, read About the all flags feature.
This feature is available in the following client-side SDKs:
The AllFlags method produces a map of feature flag keys to their values for a context object:
To learn more, read the API documentation.
The allFlags method produces a map of feature flag keys to their values for a context object:
To learn more, read the API documentation.
The AllFlags method produces a map of feature flag keys to their values for a context object:
To learn more, read AllFlags in the LDClient documentation.
The allFlags() method produces a map of feature flag keys to their values for a user object. The map contains null values for any flags that would return the fallback value. The fallback value is the second argument that you normally pass to variation.
Unlike most of our SDKs, our Electron SDK’s allFlags() method sends analytics events to LaunchDarkly. If you do not want allFlags() to generate any analytics events, you can turn this off by setting the configuration option sendEventsOnlyForVariation to true.
To use the all flags feature:
To learn more, read the API documentation.
The allFlags method produces a map of feature flag keys to their values for a context object:
To learn more, read allFlags.
The all flags method produces a dictionary of feature flag keys to their values for a context object. If the LDClient is not started, it returns nil.
To use the all flags feature:
To learn more, read the API documentation for Swift or Objective-C.
The allFlags() method produces a map of feature flag keys to their values for a context object.
The map contains null values for any flags that would return the fallback value. The fallback value is the second argument that you normally pass to variation.
In the JavaScript SDK v3.x and earlier, the allFlags method sends analytics events to LaunchDarkly. You can turn this off by setting the configuration option sendEventsOnlyForVariation to true.
In the JavaScript SDK v4.x, the allFlags method no longer sends analytics events to LaunchDarkly.
To use the all flags feature:
The metadata includes information on flag keys, variations, and prerequisites. To learn more, read allFlags.
The allFlags method produces a map of feature flag keys to their values for a context object.
The map contains null values for any flags that would return the fallback value. The fallback value is the second argument that you normally pass to variation.
Unlike most of our SDKs, our Node.js (client-side) SDK’s allFlags method sends analytics events to LaunchDarkly. If you do not want allFlags to generate any analytics events, you can turn this off by setting the sendEventsOnlyForVariation option to true.
To use the all flags feature:
To learn more, read the API documentation.
The allFlags() method produces a map of feature flag keys to their values for a context object.
Here is an example:
The React Web SDK relies on the JavaScript SDK for its allFlags functionality. However, unlike JavaScript, the React Web SDK does not send analytics events for allFlags by default. It only sends analytics events for variation or useFlags calls. This behavior matches the behavior of most of our other SDKs, besides the JavaScript SDK.
If you do need to generate analytics events for the allFlags method, you can set the sendEventsOnlyForVariation configuration option to false. We do not recommend this, because then you will receive events for all flags. You will have no way to differentiate events for flags that are in use from events for flags that are not in use.
Analytics events include feature events, debug events, and evaluation events. To learn more, read About the all flags feature, above.
The allFlags method returns a map of feature flag keys to their values for a context, or an empty object if flags cannot be evaluated.
To use the all flags feature:
To learn more, read allFlags.
The all flags method produces a map of feature flag keys to their values for a context object:
Before you implement this feature, read About the all flags feature.
This feature is available in the following server-side SDKs:
The AllFlagsState method produces a map of feature flag keys to their values and other metadata for a specific context object.
To use the all flags feature:
The metadata includes information on flag keys, variations, and prerequisites. To learn more, read the API documentation.
The allFlags method produces a map of feature flag keys to their values for a specific user object:
To learn more, read the API documentation.
The AllFlagsState method produces a map of feature flag keys to their values and other metadata for a specific context. Here’s how to call it and output the result:
The metadata includes information on flag keys, variations, and prerequisites. To learn more, read the API documentation.
The all_flags_state method produces a map of feature flag keys to their values and other metadata for a specific context object.
To use the all flags feature:
The metadata includes information on flag keys, variations, and prerequisites. To learn more, read the API documentation.
The AllFlagsState method produces a map of feature flag keys to their values and other metadata for a specific context object.
This example specifies the extra ClientSideOnly option so that only the feature flags designated for client-side use are included in the result.
To use the all flags feature:
The metadata includes information on flag keys, variations, and prerequisites. To learn more, read the API documentation.
The allFlags method produces a map of feature flag keys to their values and other metadata for a specific context object.
To use the all flags feature:
The metadata includes information on flag keys, variations, and prerequisites. To learn more, read the API documentation.
The allFlagsState method produces a map of feature flag keys to their values and other metadata for a specific context object:
To learn more, read allFlagsState.
The allFlags method produces a map of feature flag keys to their values and other metadata for a specific context.
Here’s how to call it and output the result:
The metadata includes information on flag keys, variations, and prerequisites. To learn more, read [allFlags]](https://launchdarkly.github.io/lua-server-sdk/modules/launchdarkly-server-sdk.html#allFlags).
The allFlagsState method produces a map of feature flag keys to their values and other metadata for a specific context object.
To use the all flags feature:
The metadata includes information on flag keys, variations, and prerequisites. To learn more, read the API documentation.
The allFlagsState method produces a map of feature flag keys to their values and other metadata for a specific context object:
The metadata includes information on flag keys, variations, and prerequisites. To learn more, read the API documentation.
The all_flags_state method produces a map of feature flag keys to their values and other metadata for a specific context object:
The metadata includes information on flag keys, variations, and prerequisites. The metadata includes information on flag keys, variations, and prerequisites. To learn more, read the API documentation.
The all_flags_state method produces a map of feature flag keys to their values and other metadata for a specific context object:
The metadata includes information on flag keys, variations, and prerequisites. To learn more, read the API documentation.
The all_flags_detail method produces a map of feature flag keys to their values and other metadata for a specific context object:
The metadata includes information on flag keys, variations, and prerequisites. To learn more, read the API documentation.
Before you implement this feature, read About the all flags feature.
This feature is available for the following edge SDKs:
The allFlagsState method produces an object that encapsulates the state of all feature flags for a given context. This method does not send analytics events back to LaunchDarkly.
To use the all flags feature:
To learn more, read the API documentation.
Every time you call allFlagsState, the SDK fetches the flag data from the EdgeKV store. Your Akamai resource tier may limit how many of these queries you can make while a single worker handler is being executed. Using the Akamai SDK cache can help alleviate this limit. To learn more, read Understand resource limits and caching options.
The allFlagsState method produces a map of feature flag keys to their values and other metadata for a specific context object.
To use the all flags feature:
To learn more, read the API documentation.
allFlagsState does not generate events
The Cloudflare SDK supports sending events. However, the allFlagsState method does not generate events in edge SDKs. Use the variation method instead. To learn more, read Evaluating flags.
The allFlagsState method produces a map of feature flag keys to their values and other metadata for a specific context object.
To use the all flags feature:
To learn more, read allFlagsState.
allFlagsState does not generate events
The Fastly SDK supports sending events. However, the allFlagsState method does not generate events in edge SDKs. Use the variation method instead. To learn more, read Evaluating flags.
The allFlagsState method produces a map of feature flag keys to their values and other metadata for a specific context object.
To use the all flags feature:
To learn more, read allFlagsState.
allFlagsState does not generate events
The Vercel SDK supports sending events. However, the allFlagsState method does not generate events in edge SDKs. Use the variation method instead. To learn more, read Evaluating flags.