Get a single feature flag
GET <your-unleash-url>/api/client/features/:featureName
Authorization
name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API
Gets all the client data for a single flag. Contains the exact same information about a flag as the /api/client/features
endpoint does, but only contains data about the specified flag. All SDKs should use /api/client/features
Request
Path Parameters
- featureName string required
- 200
clientFeatureSchema
- application/json
- Schema
- Example (from schema)
Schema
- name string required
The unique name of a feature flag. Is validated to be URL safe on creation
- type string
What kind of feature flag is this. Refer to the documentation on feature flag types for more information
- description string nullable
A description of the flag
- enabled boolean required
Whether the feature flag is enabled for the current API key or not. This is ANDed with the evaluation results of the strategies list, so if this is false, the evaluation result will always be false
- stale boolean
If this is true Unleash believes this feature flag has been active longer than Unleash expects a flag of this type to be active
- impressionData boolean nullable
Set to true if SDKs should trigger impression events when this flag is evaluated
- project string
Which project this feature flag belongs to
strategies object[]
variants object[]nullable
dependencies object[]
{
"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"
]
}
]
}
Authorization
name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API
Request
Request
curl -L -X GET '<your-unleash-url>/api/client/features/:featureName' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
curl -L -X GET '<your-unleash-url>/api/client/features/:featureName' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
curl -L -X GET '<your-unleash-url>/api/client/features/:featureName' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
curl -L -X GET '<your-unleash-url>/api/client/features/:featureName' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
curl -L -X GET '<your-unleash-url>/api/client/features/:featureName' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
curl -L -X GET '<your-unleash-url>/api/client/features/:featureName' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
curl -L -X GET '<your-unleash-url>/api/client/features/:featureName' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
curl -L -X GET '<your-unleash-url>/api/client/features/:featureName' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
curl -L -X GET '<your-unleash-url>/api/client/features/:featureName' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'