-
Notifications
You must be signed in to change notification settings - Fork 18
API Reference
Pratik Bhattacharya edited this page Dec 20, 2021
·
4 revisions
In this section we will show the APIs required for evaluating feature flags. Evaluation refers to the process of checking if a feature flag is active for the given context.
Evaluates the given features
GET api/v1/featureflags/Evaluate?featureNames={comma-separated list of feature names}
Header | Value | More Details |
---|---|---|
Authorization | Bearer {token}. Required | AAD bearer token for the configured Resource ID in your tenant |
X-Application | Name of the tenant. Required | Read more |
X-Environment | Name of the environment. Required | Read more |
X-FlightContext | Context information for evaluating the feature flag. Required | Read more |
Key-Value pair of the feature flag names and the evaluation result
Header | Value |
---|---|
200 | Success |
400 | Error in user input. Verify all the required headers |
401 | Unauthorized (Issue with the bearer token) |
500 | Unhandled failure |
GET api/v1/featureflags/Evaluate?featureNames=Demo-1,Demo-2
Headers:
- x-application: Demo_Tenant
- x-environment: Dev
- x-flightcontext: { "UserName": "pratik", "Location": "India" }
{
"Demo-1": false,
"Demo-2": true
}
Evaluates all the features configured in the given tenant against the given flighting context
GET api/v1/featureflags/Evaluate
Header | Value | More Details |
---|---|---|
Authorization | Bearer {token}. Required | AAD bearer token for the configured Resource ID in your tenant |
X-Application | Name of the tenant. Required | Read more |
X-Environment | Name of the environment. Required | Read more |
X-FlightContext | Context information for evaluating the feature flag. Required | Read more |
Key-Value pair of the feature flag names and the evaluation result
Header | Value |
---|---|
200 | Success |
400 | Error in user input. Verify all the required headers |
401 | Unauthorized (Issue with the bearer token) |
500 | Unhandled failure |
GET api/v1/featureflags/Evaluate
Headers:
- x-application: Demo_Tenant
- x-environment: Dev
- x-flightcontext: { "UserName": "pratik", "Location": "India" }
{
"Demo-1": false,
"Demo-2": true,
"Demo-3": true,
"Demo-4": false,
"Demo-5": false,
"Demo-6": true
}