This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
API v2 Get the Enabled Status for All Features
Darren Oakley edited this page Oct 18, 2021
·
1 revision
GET /v2/all
http://example.com/api/v2/all
http://example.com/api/v2/all?user_group={a_user_group}&user_id={user_id}
This endpoint returns the enabled/disabled status (based on the passed URL parameters) for all feature flags within Bandiera.
The following curl requests would show the enabled/disabled status for all the feature flags (with the second example passing through a user_group
value of 'admin', and a user_id
value of '12345' to be considered when setting the status of a feature flag):
curl 'http://example.com/api/v2/all'
curl 'http://example.com/api/v2/all?user_group=admin&user_id=12345'
{
"response": {
"pubserv": {
"show-article-metrics": true,
"show-new-search": false
},
"shunter": {
"themes": false
}
}
}
If any of the flags within Bandiera are configured to use User Groups or Percentage options, and you have not passed the required user_group
or user_id
params, these flags will most likely return false
(unless you provided one of the options, then this will be considered for the enabled
state), but it will also return a detailed warning.
{
"response": {
"pubserv": {
"show-article-metrics": false,
"show-new-search": false,
"show-subject-pages": false
},
"shunter": {
"themes": false
}
},
"warning": "The following warnings were raised on this request:\n * these features have user groups configured and require a `user_group` param:\n - pubserv: show-new-search\n\n * these features have user percentages configured and require a `user_id` param:\n - pubserv: show-article-metrics\n\n"
}
- Home
- How Feature Flags Work
- Dos and Donts of Feature Flagging
- Client Libraries
- Developing Bandiera
- API Documentation
- API v2
- API v1 (deprecated)