Get all flags (SDK)
GET <your-unleash-url>/api/client/features
Authorization
name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API
Returns the SDK configuration for all feature flags that are available to the provided API key. Used by SDKs to configure local evaluation
Request
Responses
- 200
clientFeaturesSchema
- application/json
- Schema
- Example (from schema)
Schema
- version number 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
features object[]required
segments object[]
query object
{
"version": 2,
"features": [
{
"name": "new.payment.flow.stripe",
"type": "release",
"description": "No variants here",
"enabled": true,
"stale": false,
"impressionData": false,
"project": "new.payment.flow",
"strategies": [
{
"id": "6b5157cb-343a-41e7-bfa3-7b4ec3044840",
"name": "flexibleRollout",
"title": "Gradual Rollout 25-Prod",
"disabled": false,
"featureName": "myAwesomeFeature",
"sortOrder": 9999,
"segments": [
1,
2
],
"constraints": [
{
"contextName": "appName",
"operator": "IN",
"caseInsensitive": false,
"inverted": false,
"values": [
"my-app",
"my-other-app"
],
"value": "my-app"
}
],
"variants": [
{
"name": "blue_group",
"weight": 0,
"weightType": "fix",
"stickiness": "custom.context.field",
"payload": {
"type": "json",
"value": "{\"color\": \"red\"}"
}
}
],
"parameters": {}
}
],
"variants": [
{
"name": "blue_group",
"weight": 0,
"weightType": "variable",
"stickiness": "custom.context.field",
"payload": {
"type": "json",
"value": "{\"color\": \"red\"}"
},
"overrides": [
{
"contextName": "userId",
"values": [
"red",
"blue"
]
}
]
}
],
"dependencies": [
{
"feature": "parent_feature",
"enabled": false,
"variants": [
"variantA",
"variantB"
]
}
]
}
],
"segments": [
{
"id": 0,
"name": "segment A",
"constraints": [
{
"contextName": "appName",
"operator": "IN",
"caseInsensitive": false,
"inverted": false,
"values": [
"my-app",
"my-other-app"
],
"value": "my-app"
}
]
}
],
"query": {
"tag": [
[
"simple:payment",
"simple:stripejourney"
]
],
"namePrefix": "payment",
"inlineSegmentConstraints": true
}
}
Authorization
name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API
Request
Request
curl / cURL
curl -L -X GET '<your-unleash-url>/api/client/features' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
python / requests
curl -L -X GET '<your-unleash-url>/api/client/features' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
go / native
curl -L -X GET '<your-unleash-url>/api/client/features' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
nodejs / native
curl -L -X GET '<your-unleash-url>/api/client/features' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
ruby / Net::HTTP
curl -L -X GET '<your-unleash-url>/api/client/features' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
csharp / httpclient
curl -L -X GET '<your-unleash-url>/api/client/features' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
php / cURL
curl -L -X GET '<your-unleash-url>/api/client/features' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
java / OkHttp
curl -L -X GET '<your-unleash-url>/api/client/features' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
powershell / RestMethod
curl -L -X GET '<your-unleash-url>/api/client/features' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'