Skip to main content

Retrieve enabled feature flags for the provided context.

GET 

<your-unleash-url>/api/frontend

This endpoint returns the list of feature flags that the frontend API evaluates to enabled for the given context. Context values are provided as query parameters. If the Frontend API is disabled 404 is returned.

Responses

frontendApiFeaturesSchema

Schema
    toggles object[]required

    The actual features returned to the Frontend SDK

  • Array [
  • namestringrequired

    Unique feature name.

    Example: disable-comments
    enabledbooleanrequired

    Always set to true.

    Example: true
    impressionDatabooleanrequired

    true if the impression data collection is enabled for the feature, otherwise false.

    Example: false
    variant object

    Variant details

    namestringrequired

    The variants name. Is unique for this feature flag

    Example: blue_group
    enabledbooleanrequired

    Whether the variant is enabled or not.

    Example: true
    payload object

    Extra data configured for this variant

    typestringrequired

    The format of the payload.

    Possible values: [json, csv, string, number]

    valuestringrequired

    The payload value stringified.

    feature_enabledboolean

    Whether the feature is enabled or not.

    Example: true
    featureEnabledbooleandeprecated

    Use feature_enabled instead.

    Example: true
  • ]

Authorization: Authorization

name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API
curl -L '<your-unleash-url>/api/frontend' \
-H 'Accept: application/json' \
-H 'Authorization: <Authorization>'
Request Collapse all
Base URL
<your-unleash-url>
Auth
ResponseClear

Click the Send API Request button above and see the response here!