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

# Getting all flags

<View title="Developer" />

<View title="Federal docs" />

<View title="EU docs" />

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](/docs/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.">
  <img src="https://mintcdn.com/launchdarkly/-b7nPh0oyigf6iW7/images/auto/context-details-expected-variations.auto.png?fit=max&auto=format&n=-b7nPh0oyigf6iW7&q=85&s=6066dad0888929cf23e9474fd8e3edf6" alt="The &#x22;Expected variations&#x22; on the details page for a context." width="1556" height="666" data-path="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 SDK 2.x, 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](/docs/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](/docs/sdk/client-side/javascript). To learn more about bootstrapping from a client-side SDK, read [Bootstrapping](/docs/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>
  **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](/docs/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)](#node-js-client-side)
* [React Native](#react-native)
* [React Web](#react-web)
* [Roku](#roku)
* [Vue](#vue)

### .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#" lines wrap 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" lines wrap theme={null}
    client.allFlags();
    ```

    ```kotlin title="Kotlin" lines wrap 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)" lines wrap 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)" lines wrap theme={null}
    LDValue all_flags = LDClientSDK_AllFlags(client);

    LDValue_ObjectIter it;

    for (it = LDValue_ObjectIter_New(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));
      }
    }
    ```
  </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" lines wrap 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" lines wrap theme={null}
    Map<String, LDValue> flagValues = 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" lines wrap theme={null}
    let allFlags: [String: LDValue]? = LDClient.get()!.allFlags
    ```

    ```objectivec title="Objective-C" lines wrap 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>

### JavaScript

<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](/docs/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](/docs/sdk/concepts/events) to LaunchDarkly.

  To use the all flags feature:

  <CodeGroup>
    ```js title="JavaScript SDK" lines wrap 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/types/LDClient.html).
</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" lines wrap 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" lines wrap 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" lines wrap 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" lines wrap theme={null}
    allFlags = launchDarkly.allFlagsState()

    ```
  </CodeGroup>
</Accordion>

### Vue

<Accordion title="Expand Vue code sample">
  The Vue SDK does not provide a composable for getting all flags. To get all flag values, retrieve the client with `useLDClient()` and call the underlying JavaScript SDK's `allFlags()` method.

  To evaluate individual flags reactively, use the variation composables instead. To learn more, read [Retrieve flag values for the context](/docs/sdk/client-side/vue#retrieve-flag-values-for-the-context).

  `allFlags()` returns a snapshot. It does not update when flag values change. Read it after the client is ready, including when the initialization status is `timeout`. When the status is `timeout`, the client did not finish initializing within the configured limit, but you can still retrieve flag values.

  `allFlags()` does not send analytics events.

  Here is an example:

  <CodeGroup>
    ```html title="Vue SDK v3.0" lines wrap theme={null}
    <script setup>
    import { useInitializationStatus, useLDClient } from '@launchdarkly/vue-client-sdk'

    const status = useInitializationStatus()
    const ldClient = useLDClient()

    function logAllFlags() {
      if (status.value.status === 'complete' || status.value.status === 'timeout') {
        const allFlagsResult = ldClient.allFlags()
        console.log(allFlagsResult)
      }
    }
    </script>

    <template>
      <button type="button" @click="logAllFlags">Log all flags</button>
    </template>
    ```
  </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)](#node-js-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#)" lines wrap 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" lines wrap 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)" lines wrap 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)" maxLines=0 expandable lines wrap 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);

    ```
  </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>
    ```text title="Erlang v2.0+" lines wrap theme={null}
    ldclient:all_flags_state(#{key => <<"example-context-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" lines wrap 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" lines wrap 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" lines wrap theme={null}
    state = allFlagsState client context False False False
    ```
  </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+" lines wrap 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" lines wrap theme={null}
    local allFlags = client:allFlags(context)
    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" lines wrap 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+" lines wrap 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+" lines wrap 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+" lines wrap 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+" lines wrap 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" lines wrap 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](/docs/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" lines wrap 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>
    **<code>allFlagsState</code> does not generate events**

    The Cloudflare SDK supports [sending events](/docs/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 [Flag variation evaluation](/docs/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" lines wrap 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>
    **<code>allFlagsState</code> does not generate events**

    The Fastly SDK supports [sending events](/docs/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 [Flag variation evaluation](/docs/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" lines wrap 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>
    **<code>allFlagsState</code> does not generate events**

    The Vercel SDK supports [sending events](/docs/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 [Flag variation evaluation](/docs/sdk/features/evaluating#vercel).
  </Note>
</Accordion>
