Client HTTP API
This api can be used by your applications to get the latest feature values, it is recommended you use one of the SDKs over the HTTP API directly.
Method | Path |
---|---|
GET | /effective?audiences= |
GET | /all |
GET /effective?audiences=
Returns a list of the effective feature values for the set of audiences in a environment.
Query Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
audiences | string | True | CSV of the audiences you want to receive effective feature values for |
Request Headers:
Header | Type | Required | Description |
---|---|---|---|
x-environment-key | string | True | FeatureBoard environment key |
if-none-match | string | False | ETag value of earlier retrieved feature values |
Note:
The x-environment-key
header is required for authentication.
If if-none-match
header is set, the request will return 200 (OK) together with the effective features if change has occurred. Otherwise it will return 304 (Not Modified).
Responses
Response Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Success. The response describes the list of effective feature values. |
304 (Not Modified) | Success. The response describes the list of effective feature values has not changed since last if-none-match request header value. |
Response Headers:
Header | Type | Description |
---|---|---|
etag | string | ETag value for the version of effective feature values. |
x-api-warnings | string | Provide warning messages, including notifications about an impending API key expiration in case of a canceled subscription. |
x-api-errors | string | Communicates error messages or notifications related to encountered issues or faults during API operations. |
Example
Request
Note: The format of the etag
value may change in the feature. Do not relay on it being timestamp in ISO 8601 format.
Response
GET /all
Returns a list of all feature values and audience exceptions for a environment.
Request Headers:
Header | Type | Required | Description |
---|---|---|---|
x-environment-key | string | True | FeatureBoard environment key. |
if-none-match | string | False | ETag value of earlier retrieved feature values. |
Note:
The x-environment-key
header is required for authentication.
If if-none-match
header is set, the request will return 200 (OK) together with features values if change has occurred. Otherwise it will return 304 (Not Modified).
Responses
Response Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Success. The response describes the list of feature values and audience exceptions. |
304 (Not Modified) | Success. The response describes the list of feature values and audience exceptions has not changed since last if-none-match request header value. |
401 (Unauthorized) | Failure. |
Response Headers:
Header | Type | Description |
---|---|---|
etag | string | ETag value for the version of feature values and audience exceptions. |
x-api-warnings | string | Provide warning messages, including notifications about an impending API key expiration in case of a canceled subscription. |
x-api-errors | string | Communicates error messages or notifications related to encountered issues or faults during API operations. |
Example
Request
Note: The format of the etag
value may change in the feature. Do not relay on it being a timestamp in ISO 8601 format.
Response
Rate limiting
In order to prevent overuse of resources, our API enforces rate limits. If the rate limit is exceeded, an HTTP status code 429 (Too Many Requests) is returned, indicating the request cannot be processed due to excessive requests. The API response header, retry-after
includes a recommend wait time for the next attempt.
We recommend API users to implement error handling to detect HTTP error code 429 and wait the number of seconds specified in the retry-after
header before retrying the request.
Example response
When a rate limit has been exceeded a response similar to the one below is returned. In this case, the suggested wait time before initiating the next request is 10 seconds.