> ## Documentation Index
> Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting all flags

> This topic explains how the all flags feature works in the LaunchDarkly SDKs that support it.

> For the complete documentation index, see [llms.txt](/llms.txt). For the full documentation snapshot, see [llms-full.txt](/llms-full.txt).

## Overview

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.

## About the all flags feature

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](/sdk/client-side/javascript).

You can find the expected flag values for a specific context on its details page:

<Frame caption="The &#x22;Expected variations&#x22; on the details page for a context.">
  ![The "Expected variations" on the details page for a context.](https://files.buildwithfern.com/https://launchdarkly.docs.buildwithfern.com/docs/7804faf72b892040a68775af9477576ed28563051e37baf519cae0f881f6854c/assets/images/auto/context-details-expected-variations.auto.png)
</Frame>

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](/sdk/concepts/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](/sdk/client-side/javascript). To learn more about bootstrapping from a client-side SDK, read [Bootstrapping](/sdk/features/bootstrapping).

Details about each SDK's configuration are available in the SDK-specific sections below:

* [Client-side SDKs](#client-side-sdks)
* [Server-side SDKs](#server-side-sdks)
* [Edge SDKs](#edge-sdks)

<Note title="Newer versions of LaunchDarkly SDKs replace users with contexts">
  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](/sdk). For these SDKs, the code samples on this page include the two most recent versions.
</Note>

## Client-side SDKs

Before you implement this feature, read [About the all flags feature](#about-the-all-flags-feature).

This feature is available in the following client-side SDKs:

* [.NET (client-side)](#net-client-side)
* [Android](#android)
* [C++ (client-side)](#c-client-side)
* [Electron](#electron)
* [Flutter](#flutter)
* [iOS](#ios)
* [JavaScript](#javascript)
* [Node.js (client-side)](#nodejs-client-side)
* [React Native](#react-native)
* [React Web](#react-web)
* [Roku](#roku)

### .NET (client-side)

<Accordion title="Expand .NET (client-side) code sample">
  The `AllFlags` method produces a map of feature flag keys to their values for a context object:

  <CodeGroup>
    ```csharp title="C#" theme={null}
          client.AllFlags();
    ```
  </CodeGroup>

  To learn more, read the [API documentation](https://launchdarkly.github.io/dotnet-core/pkgs/sdk/client/api/LaunchDarkly.Sdk.Client.LdClient.html#LaunchDarkly_Sdk_Client_LdClient_AllFlags).
</Accordion>

### Android

<Accordion title="Expand Android code sample">
  The `allFlags` method produces a map of feature flag keys to their values for a context object:

  <CodeGroup>
    ```java title="Java" theme={null}
          client.allFlags();
    ```

    ```kotlin title="Kotlin" theme={null}
          client.allFlags()
    ```
  </CodeGroup>

  To learn more, read the [API documentation](https://launchdarkly.github.io/android-client-sdk/).
</Accordion>

### C++ (client-side)

<Accordion title="Expand C++ (client-side) code sample">
  The `AllFlags` method produces a map of feature flag keys to their values for a context object:

  <CodeGroup>
    ```cpp title="C++ SDK v3.0 (native)" theme={null}
          for (auto [flag_key, flag_value] : client.AllFlags()) {
              std::cout << flag_key << ": " << flag_value << std::endl;
          }
    ```

    ```c title="C++ SDK v3.0 (C binding)" theme={null}
          LDValue all_flags = LDClientSDK_AllFlags(client);

          LDValue_ObjectIter it;

          for (it = LDValue_CreateObjectIter(all_flags); !LDValue_ObjectIter_End(it); LDValue_ObjectIter_Next(it)) {

            char const* flag_key = LDValue_ObjectIter_Key(it);
            LDValue flag_val_ref = LDValue_ObjectIter_Value(it);

            if (LDValue_Type(flag_val_ref) == LDValueType_Bool) {
                printf("%s: %d\n", flag_key, LDValue_GetBool(flag_val_ref));
            }
          }
    ```

    ```c title="C SDK v2.x (native)" theme={null}
          struct LDJSON *allFlagsObject = LDAllFlags(client);

          const struct LDJSON *iter;
          for (iter = LDGetIter(allFlagsObject); iter; iter = LDIterNext(iter)) {
             char *serialized_value = LDJSONSerialize(iter);
             printf("%s: %s\n", LDIterKey(iter), serialized_value);
             LDFree(serialized_value);
          }

          LDJSONFree(allFlagsObject);
    ```

    ```cpp title="C SDK v2.x (C++ binding)" theme={null}
          LDJSON *allFlagsObject = client->getAllFlags();

          const LDJSON *iter;
          for (iter = LDGetIter(allFlagsObject); iter; iter = LDIterNext(iter)) {
             char *serialized_value = LDJSONSerialize(iter);
             std::cout << LDIterKey(iter) << ": " << serialized_value << std::endl;
             LDFree(serialized_value);
          }

          LDJSONFree(allFlagsObject);
    ```
  </CodeGroup>

  To learn more, read `AllFlags` in the [`LDClient` documentation](https://launchdarkly.github.io/js-client-sdk/interfaces/LDClient.html#allFlags).
</Accordion>

### Electron

<Accordion title="Expand Electron code sample">
  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`](https://launchdarkly.github.io/node-client-sdk/interfaces/LDOptions.html#sendEventsOnlyForVariation) to `true`.

  To use the all flags feature:

  <CodeGroup>
    ```js title="JavaScript" theme={null}
          let allFlagsResult = client.allFlags();
    ```
  </CodeGroup>

  To learn more, read the [API documentation](https://launchdarkly.github.io/electron-client-sdk/interfaces/_launchdarkly_electron_client_sdk_.ldelectronmainclient.html#allflags).
</Accordion>

### Flutter

<Accordion title="Expand Flutter code sample">
  The `allFlags` method produces a map of feature flag keys to their values for a context object:

  <CodeGroup>
    ```dart title="Flutter SDK v4" theme={null}
          Map<String, LDValue> flagValues = client.allFlags();
    ```

    ```dart title="Flutter SDK v3.x" theme={null}
          Map<String, LDValue> flagValues = await client.allFlags();
    ```
  </CodeGroup>

  To learn more, read [`allFlags`](https://pub.dev/documentation/launchdarkly_flutter_client_sdk/latest/launchdarkly_flutter_client_sdk/LDClient/allFlags.html).
</Accordion>

### iOS

<Accordion title="Expand iOS code sample">
  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:

  <CodeGroup>
    ```swift title="Swift" theme={null}
          let allFlags: [String: LDValue] = LDClient.get()!.allFlags
    ```

    ```objectivec title="Objective-C" theme={null}
          NSDictionary<NSString*, LDValue*> * allFlags = [LDClient get].allFlags;
    ```
  </CodeGroup>

  To learn more, read the API documentation for [Swift](https://launchdarkly.github.io/ios-client-sdk/Classes/LDClient.html#/s:12LaunchDarkly8LDClientC8allFlagsSDySSypGSgvp) or [Objective-C](https://launchdarkly.github.io/ios-client-sdk/Classes/ObjcLDClient.html#/c:@M@LaunchDarkly@objc\(cs\)LDClient\(py\)allFlags).
</Accordion>

### Java

Script

<Accordion title="Expand JavaScript code sample">
  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](/sdk/concepts/events) to LaunchDarkly. You can turn this off by setting the configuration option [`sendEventsOnlyForVariation`](https://launchdarkly.github.io/js-client-sdk/interfaces/LDOptions.html#sendEventsOnlyForVariation) to `true`.

  In the JavaScript SDK v4.x, the `allFlags` method no longer sends [analytics events](/sdk/concepts/events) to LaunchDarkly.

  To use the all flags feature:

  <CodeGroup>
    ```js title="JavaScript SDK" theme={null}
          let allFlagsResult = client.allFlags();
    ```
  </CodeGroup>

  The metadata includes information on flag keys, variations, and prerequisites. To learn more, read [`allFlags`](https://launchdarkly.github.io/js-core/packages/sdk/browser/docs/interfaces/LDClient.html#allFlags).
</Accordion>

### Node.js (client-side)

<Accordion title="Expand Node.js (client-side) code sample">
  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`](https://launchdarkly.github.io/node-client-sdk/interfaces/LDOptions.html#sendEventsOnlyForVariation) option to `true`.

  To use the all flags feature:

  <CodeGroup>
    ```js title="JavaScript" theme={null}
          let allFlagsResult = client.allFlags();
    ```
  </CodeGroup>

  To learn more, read the [API documentation](https://launchdarkly.github.io/node-client-sdk/interfaces/LDClient.html#allFlags).
</Accordion>

### React Web

<Accordion title="Expand React Web code sample">
  The `allFlags()` method produces a map of feature flag keys to their values for a context object.

  Here is an example:

  <CodeGroup>
    ```js title="React Web SDK" theme={null}
          const allFlags = ldClient.allFlags();
    ```
  </CodeGroup>

  The React Web SDK relies on the [JavaScript SDK](#javascript) 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](#about-the-all-flags-feature), above.
</Accordion>

### React Native

<Accordion title="Expand React Native code sample">
  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:

  <CodeGroup>
    ```js title="React Native SDK, v10" theme={null}
          let allFlagsResult = client.allFlags()
    ```
  </CodeGroup>

  To learn more, read [`allFlags`](https://launchdarkly.github.io/js-core/packages/sdk/react-native/docs/classes/LDClientImpl.html#allFlags).
</Accordion>

### Roku

<Accordion title="Expand Roku code sample">
  The all flags method produces a map of feature flag keys to their values for a context object:

  <CodeGroup>
    ```brightscript title="BrightScript" theme={null}
          allFlags = launchDarkly.allFlagsState()

    ```
  </CodeGroup>
</Accordion>

## Server-side SDKs

Before you implement this feature, read [About the all flags feature](#about-the-all-flags-feature).

This feature is available in the following server-side SDKs:

* [.NET (server-side)](#net-server-side)
* [Apex](#apex)
* [C++ (server-side)](#c-server-side)
* [Erlang](#erlang)
* [Go](#go)
* [Haskell](#haskell)
* [Java](#java)
* [Lua](#lua)
* [Node.js (server-side)](#nodejs-server-side)
* [PHP](#php)
* [Python](#python)
* [Ruby](#ruby)
* [Rust](#rust)

### .NET (server-side)

<Accordion title="Expand .NET (server-side) code sample">
  The [`AllFlagsState`](https://launchdarkly.github.io/dotnet-core/pkgs/sdk/server/api/LaunchDarkly.Sdk.Server.LdClient.html#LaunchDarkly_Sdk_Server_LdClient_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:

  <CodeGroup>
    ```csharp title=".NET SDK v7.0 (C#)" theme={null}
          var state = client.AllFlagsState(context);
    ```
  </CodeGroup>

  The metadata includes information on flag keys, variations, and prerequisites. To learn more, read the [API documentation](https://launchdarkly.github.io/dotnet-core/pkgs/sdk/server/api/LaunchDarkly.Sdk.Server.LdClient.html#LaunchDarkly_Sdk_Server_LdClient_AllFlagsState_LaunchDarkly_Sdk_User_LaunchDarkly_Sdk_Server_FlagsStateOption___).
</Accordion>

### Apex

<Accordion title="Expand Apex code sample">
  The `allFlags` method produces a map of feature flag keys to their values for a specific user object:

  <CodeGroup>
    ```java title="Apex" theme={null}
          Map<String, LDValue> values = client.allFlags(user);
    ```
  </CodeGroup>

  To learn more, read the [API documentation](https://github.com/launchdarkly/apex-server-sdk/blob/master/doc.md#other-methods-1).
</Accordion>

### C++ (server-side)

<Accordion title="Expand C++ (server-side) code sample">
  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:

  <CodeGroup>
    ```cpp title="C++ SDK v3.0 (native)" theme={null}
          auto const all_flags = client.AllFlagsState(context);
          if (all_flags.Valid() {
             for (auto const& [flag_key, flag_value] : all_flags.Values()) {
                 std::cout << flag_key << ": " << flag_value << std::endl;
             }
          }  else {
             /* error evaluating all flags! */
          }
    ```

    ```c title="C++ SDK v3.0 (C binding)" theme={null}
          LDAllFlagsState state = LDServerSDK_AllFlagsState(client, context, LD_ALLFLAGSSTATE_DEFAULT);

          if (LDAllFlagsState_Valid(state)) {
              /* all flags were evaluated successfully! */
          } else {
              /* there was an issue, but it's still possible to serialize the (empty) state. */
          }

          /* Retrieve a specific flag's value */
          LDValue bool_value_reference = LDAllFlagsState_Value(state, "my-bool-flag");
          if (LDValue_GetBool(bool_value_reference)) {
              /* value is true! */
          }

          /* Serialize the state, suitable for bootstrapping a client-side SDK e.g. JavaScript */
          char* json = LDAllFlagsState_SerializeJSON(state);

          LDMemory_FreeString(json);

          LDAllFlagsState_Free(state);

    ```

    ```c title="C SDK v2.x (native)" theme={null}
          struct LDJSON *allFlags = LDAllFlags(client, user);
    ```
  </CodeGroup>

  The metadata includes information on flag keys, variations, and prerequisites. To learn more, read the [API documentation](https://launchdarkly.github.io/c-server-sdk/variations_8h.html#a51ba0df725bdcd4a005e6efe7bb4f944).
</Accordion>

### Erlang

<Accordion title="Expand Erlang code sample">
  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:

  <CodeGroup>
    ```title="Erlang v2.0+" theme={null}
          ldclient:all_flags_state(#{key => <<"example-context-key">>})
    ```

    ```title="Erlang SDK v1.x" theme={null}
          ldclient:all_flags_state(#{key => <<"example-user-key">>})
    ```
  </CodeGroup>

  The metadata includes information on flag keys, variations, and prerequisites. To learn more, read the [API documentation](https://hexdocs.pm/launchdarkly_server_sdk/).
</Accordion>

### Go

<Accordion title="Expand Go code sample">
  The [`AllFlagsState`](https://pkg.go.dev/github.com/launchdarkly/go-server-sdk/v7#LDClient.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:

  <CodeGroup>
    ```go title="Go SDK v7.13.4+, using LDScopedClient" theme={null}
          import (
              "github.com/launchdarkly/go-server-sdk/v7/interfaces/flagstate"
          )

          // There is not an AllFlagsState method in the LDScopedClient,
          // so you need to access the method from the LDClient.
          // Then, pass in the scoped client's current context.
          // LDScopedClient is in beta and may change without notice.

          state := scopedClient.Client().AllFlagsState(scopedClient.CurrentContext(), flagstate.OptionClientSideOnly())
    ```

    ```go title="Go SDK v6+, using LDClient" theme={null}
          import (
              "github.com/launchdarkly/go-server-sdk/v6/interfaces/flagstate"
          )

          state := client.AllFlagsState(context, flagstate.OptionClientSideOnly())
    ```
  </CodeGroup>

  The metadata includes information on flag keys, variations, and prerequisites. To learn more, read the [API documentation](https://pkg.go.dev/github.com/launchdarkly/go-server-sdk/v7#LDClient.AllFlagsState).
</Accordion>

### Haskell

<Accordion title="Expand Haskell code sample">
  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:

  <CodeGroup>
    ```haskell title="Haskell SDK v4.0" theme={null}
          state = allFlagsState client context False False False
    ```

    ```haskell title="Haskell SDK v3.x" theme={null}
          state = allFlags client user
    ```
  </CodeGroup>

  The metadata includes information on flag keys, variations, and prerequisites. To learn more, read the [API documentation](https://launchdarkly.github.io/haskell-server-sdk/LaunchDarkly-Server-Client.html#v:allFlags).
</Accordion>

### Java

<Accordion title="Expand Java code sample">
  The [`allFlagsState`](https://launchdarkly.github.io/java-core/lib/sdk/server/com/launchdarkly/sdk/server/LDClient.html#allFlagsState-com.launchdarkly.sdk.LDContext-com.launchdarkly.sdk.server.FlagsStateOption...-) method produces a map of feature flag keys to their values and other metadata for a specific context object:

  <CodeGroup>
    ```java title="Java SDK v6.0" theme={null}
          FeatureFlagsState state = client.allFlagsState(context);
    ```
  </CodeGroup>

  To learn more, read [`allFlagsState`](https://launchdarkly.github.io/java-core/lib/sdk/server/com/launchdarkly/sdk/server/LDClient.html#allFlagsState-com.launchdarkly.sdk.LDContext-com.launchdarkly.sdk.server.FlagsStateOption...-).
</Accordion>

### Lua

<Accordion title="Expand Lua code sample">
  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:

  <CodeGroup>
    ```lua title="Lua SDK v2" theme={null}
          local allFlags = client:allFlags(context)
          for flag, value in pairs(allFlags) do
              print(flag, value)
          end
    ```

    ```lua title="Lua SDK v1.x" theme={null}
          local allFlags = client:allFlags(user)
          for flag, value in pairs(allFlags) do
              print(flag, value)
          end
          --

    ```
  </CodeGroup>

  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](https://launchdarkly.github.io/lua-server-sdk/modules/launchdarkly-server-sdk.html#allFlags)).
</Accordion>

### Node.js (server-side)

<Accordion title="Expand Node.js (server-side) code sample">
  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:

  <CodeGroup>
    ```js title="Node.js SDK v7.x and later" theme={null}
          client.allFlagsState(context, options, (err, flagsState) => {
            // this object can be converted to JSON using toJSON()
            // or can be queried for flag values using allValues() or getFlagValue(flag-key)
          });
    ```
  </CodeGroup>

  The metadata includes information on flag keys, variations, and prerequisites. To learn more, read the [API documentation](https://launchdarkly.github.io/js-core/packages/sdk/server-node/docs/interfaces/LDClient.html#allFlagsState).
</Accordion>

### PHP

<Accordion title="Expand PHP code sample">
  The `allFlagsState` method produces a map of feature flag keys to their values and other metadata for a specific context object:

  <CodeGroup>
    ```php title="PHP SDK v5.0" theme={null}
          $state  = $client->allFlagsState($context);
    ```
  </CodeGroup>

  The metadata includes information on flag keys, variations, and prerequisites. To learn more, read the [API documentation](https://launchdarkly.github.io/php-server-sdk/classes/LaunchDarkly-LDClient.html#method_allFlagsState).
</Accordion>

### Python

<Accordion title="Expand Python code sample">
  The `all_flags_state` method produces a map of feature flag keys to their values and other metadata for a specific context object:

  <CodeGroup>
    ```python title="Python SDK v8.0" theme={null}
          state = ldclient.get().all_flags_state(context)
    ```
  </CodeGroup>

  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](https://launchdarkly-python-sdk.readthedocs.io/en/latest/api-main.html#ldclient.client.LDClient.all_flags).
</Accordion>

### Ruby

<Accordion title="Expand Ruby code sample">
  The `all_flags_state` method produces a map of feature flag keys to their values and other metadata for a specific context object:

  <CodeGroup>
    ```ruby title="Ruby SDK v7.0" theme={null}
          state = client.all_flags_state(context)
    ```
  </CodeGroup>

  The metadata includes information on flag keys, variations, and prerequisites. To learn more, read the [API documentation](https://launchdarkly.github.io/ruby-server-sdk/LaunchDarkly/LDClient.html#all_flags_state-instance_method).
</Accordion>

### Rust

<Accordion title="Expand Rust code sample">
  The `all_flags_detail` method produces a map of feature flag keys to their values and other metadata for a specific context object:

  <CodeGroup>
    ```rust title="Rust SDK v1" theme={null}
          let state = ldclient.all_flags_detail(&context, FlagDetailConfig::new());
    ```
  </CodeGroup>

  The metadata includes information on flag keys, variations, and prerequisites. To learn more, read the [API documentation](https://docs.rs/launchdarkly-server-sdk/latest/launchdarkly_server_sdk/struct.Client.html#method.all_flags_detail).
</Accordion>

## Edge SDKs

Before you implement this feature, read [About the all flags feature](#about-the-all-flags-feature).

This feature is available for the following edge SDKs:

* [Akamai](#akamai)
* [Cloudflare](#cloudflare)
* [Fastly](#fastly)
* [Vercel](#vercel)

### Akamai

<Accordion title="Expand Akamai code sample">
  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:

  <CodeGroup>
    ```js title="Akamai SDK" theme={null}
          const allFlags = await client.allFlagsState(context);
    ```
  </CodeGroup>

  To learn more, read the [API documentation](https://launchdarkly.github.io/js-core/packages/sdk/akamai-edgekv/docs/interfaces/LDClient.html#allFlagsState).

  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](/sdk/edge/akamai#understand-resource-limits-and-caching-options).
</Accordion>

### Cloudflare

<Accordion title="Expand Cloudflare code sample">
  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:

  <CodeGroup>
    ```js title="TypeScript" theme={null}
          const allFlags = await client.allFlagsState(context);
    ```
  </CodeGroup>

  To learn more, read the [API documentation](https://launchdarkly.github.io/js-core/packages/sdk/cloudflare/docs/classes/LDClient.html#allFlagsState).

  <Note
    title="<code>

allFlagsState</code> does not generate events"
  >
    The Cloudflare SDK supports [sending events](/sdk/features/events#edge-sdks). However, the `allFlagsState` method does not generate events in edge SDKs. Use the `variation` method instead. To learn more, read [Evaluating flags](/sdk/features/evaluating#cloudflare).
  </Note>
</Accordion>

### Fastly

<Accordion title="Expand Fastly code sample">
  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:

  <CodeGroup>
    ```ts title="TypeScript" theme={null}
          const allFlags = await client.allFlagsState(context);
    ```
  </CodeGroup>

  To learn more, read [`allFlagsState`](https://launchdarkly.github.io/js-core/packages/sdk/fastly/docs/classes/LDClient.html#allFlagsState).

  <Note
    title="<code>

allFlagsState</code> does not generate events"
  >
    The Fastly SDK supports [sending events](/sdk/features/events#edge-sdks). However, the `allFlagsState` method does not generate events in edge SDKs. Use the `variation` method instead. To learn more, read [Evaluating flags](/sdk/features/evaluating#fastly).
  </Note>
</Accordion>

### Vercel

<Accordion title="Expand Vercel code sample">
  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:

  <CodeGroup>
    ```js title="TypeScript" theme={null}
          const allFlags = await client.allFlagsState(context);
    ```
  </CodeGroup>

  To learn more, read [`allFlagsState`](https://launchdarkly.github.io/js-core/packages/sdk/vercel/docs/classes/LDClient.html#allFlagsState).

  <Note
    title="<code>

allFlagsState</code> does not generate events"
  >
    The Vercel SDK supports [sending events](/sdk/features/events#edge-sdks). However, the `allFlagsState` method does not generate events in edge SDKs. Use the `variation` method instead. To learn more, read [Evaluating flags](/sdk/features/evaluating#vercel).
  </Note>
</Accordion>
