The API is intended to be RESTful and supports multiple output formats. This means that to make a call to QBank all that is needed is a simple HTTP request. Almost all programming languages and platforms are able to do that and you can even test the calls directly in your browser. The API is designed to allow the consumer to perform all tasks available in QBank with ease. Simple and powerful is the keywords.
Base URL
All URLs referenced in the documentation are relative to the following:
http://[customer].qbank.se/api
About REST
REST has grown to be the de-facto standard of web-accessible APIs and has more or less replaced other standards, eg. SOAP. The key design principles of REST are:
- Uniform interface — Every resource is identified via a unique URL. The resource representation is separate from the implementation, easily understood and manipulated.
- Stateless interaction — No client context is stored on the server. All necessary information is included in each request.
- Cacheable — A client may cache a response if it is defined as cacheable.
- Client-Server — The separation increases the portability of client code and simplifies server implementation.
- Layered — The client can not tell if it is connected to the end server. This enables scalability and load balancing.
Authorization
Authorization is done via Open Authentication version 2. Currently we support the flows Authorization Code and Resource Owner Password Credentials. OAuth themselves has a (incomplete) list of client libraries. To use Authorization Code you must obtain a client identifier; please contact us and we will sort it out.
Response formats
The API supports responses in both JSON and XML interchangeably. To specify a response format append your API-endpoint with the format as the file extension or add an "Accept"-header with the formats mime-type.
Endpoints
All endpoints are documented and testable at the special endpoint /explorer
. From there you can browse all the available actions directly in your browser. If you want to, you can even use it live if you authorize it with your QBank account.
Libraries
We like to simplify your code as much as we can and that is why we have built a library so that you don't have to deal with as few of the implementation details as possible. The library is PHP-only and requires version 5.4 or uppward. It is available via composer.
Comments
0 comments
Please sign in to leave a comment.