Client

Get all flags (SDK)

Changed on

Returns the SDK configuration for all feature flags that are available to the provided API key. Used by SDKs to configure local evaluation

get/api/client/features

Request

  • Base URL
    https://app.unleash-instance.example.com
  • URL
    https://app.unleash-instance.example.com/api/client/features
  • Auth
    • API key in header Authorization
    • or HTTP bearer

Response

clientFeaturesSchema

versionnumber required

A version number for the format used in the response. Most Unleash instances now return version 2, which includes segments as a separate array

Example response

{
  "version": 2,
  "features": [
    {
      "name": "new.payment.flow.stripe",
      "type": "release",
      "description": "No variants here",
      "enabled": true,
      "project": "new.payment.flow",
      "strategies": [
        {
          "id": "6b5157cb-343a-41e7-bfa3-7b4ec3044840",
          "name": "flexibleRollout",
          "title": "Gradual Rollout 25-Prod",
          "featureName": "myAwesomeFeature",
          "sortOrder": 9999,
          "segments": [
            1,
            2
          ],
          "constraints": [
            {
              "contextName": "appName",
              "operator": "IN",
              "values": [
                "my-app",
                "my-other-app"
              ],
              "value": "my-app"
            }
          ],
          "variants": [
            {
              "name": "blue_group",
              "weightType": "fix",
              "stickiness": "custom.context.field",
              "payload": {
                "type": "json",
                "value": "{\"color\": \"red\"}"
              }
            }
          ]
        }
      ],
      "variants": [
        {
          "name": "blue_group",
          "weightType": "variable",
          "stickiness": "custom.context.field",
          "payload": {
            "type": "json",
            "value": "{\"color\": \"red\"}"
          },
          "overrides": [
            {
              "contextName": "userId",
              "values": [
                "red",
                "blue"
              ]
            }
          ]
        }
      ],
      "dependencies": [
        {
          "feature": "parent_feature",
          "variants": [
            "variantA",
            "variantB"
          ]
        }
      ]
    }
  ],
  "segments": [
    {
      "name": "segment A",
      "constraints": [
        {
          "contextName": "appName",
          "operator": "IN",
          "values": [
            "my-app",
            "my-other-app"
          ],
          "value": "my-app"
        }
      ]
    }
  ],
  "query": {
    "tag": [
      [
        "simple:payment",
        "simple:stripejourney"
      ]
    ],
    "project": [
      "new.payment.flow"
    ],
    "namePrefix": "payment",
    "inlineSegmentConstraints": true
  }
}

Changes

    • warning

      added the new SEMVER_GTE enum value to the ////// response property for the response status

    • warning

      added the new SEMVER_GTE enum value to the //// response property for the response status

    • warning

      added the new SEMVER_LTE enum value to the ////// response property for the response status

    • warning

      added the new SEMVER_LTE enum value to the //// response property for the response status

    • warning

      added the new REGEX enum value to the ////// response property for the response status

    • warning

      added the new REGEX enum value to the //// response property for the response status