Skip to content

Code Samples

This section is devoted to providing some basic examples of how to interact with the BTQ API using various popular programming languages. These samples are meant for information purposes only. Please consult the OpenAPI documentation for the BTQ APIs that you intend to use as the available endpoints, available parameters, and response body structure is subject to change.

Style Notes

Any language features and coding styles present in these examples are not presented as the only proper way of calling the BTQ API. As the APIs are all RESTful HTTP APIs, developers are encouraged to use the language and tools that best fit their preferences and needs.

Layout

All the samples have been built to perform the same steps against the BTQ API:

  1. Log in using a provided email address and password using the Authentication process.
  2. Retrieve the users that have access to a given tenant using an access token.
  3. Log out to release the access token and end the session.

Each sample will be split into two parts. The first part will represent the objects we will use to handle the request and response bodies in the HTTP requests. The second part will outline the code that invokes the APIs. The third will provide a fully functioning program based on the first two sections.