Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

API Documentation

Darren Oakley edited this page Oct 18, 2021 · 1 revision

Bandiera has a very simple JSON/JSONP API for interacting with the service. Here you shall find a quick overview of how the service works and it's endpoints.

API Versioning

The current API version is v2. This is the version you should use in production.

All calls need to be versioned to avoid future API releases breaking client code. You can specify which version of the API to use by changing the base URL for your calls e.g. to use v2 it should be:

http://example.com/api/v2/

and your actual calls should look like:

http://example.com/api/v2/all
http://example.com/api/v2/groups/pubserv/features
http://example.com/api/v2/groups/pubserv/features/show-article-metrics

Response Codes

By design, Bandiera will always respond with a 200 (OK) HTTP status code. This is obvious for the /all endpoint, this is a valid and static endpoint, but it is particularly important on the last two (more dynamic) endpoint examples listed above. Even if you request a group/feature that doesn't exist within the Bandiera database, you will still receive a 200 response. More details on this functionallity and what it means can be found on the API endpoint detail pages below.

Obviously, if there is a server error, you will get a 500 HTTP status - your client library should/will handle this eventuality for you.

API Endpoints

Deprecated API Endpoints

These API endpoints are still available from the service, but they will be removed soon. If you, or your client libraries are using these endpoints we suggest you update to use the latest API version as soon as possible.