REST API


Introduction

To start using the WebTuna REST API go to https://my.webtuna.com/rest.

This is the root node of the REST API. All output is in JSON format. The REST API is organised as a hierarchical tree. The non-leaf nodes list the next level of API calls available. The leaf nodes allow you to interact with WebTuna.

Authorisation

The non-leaf nodes do not require any special privileges to access them. However, the leaf nodes require an API key that is unique to the API user. This controls access, so the user only sees their own data. You can generate your own API key in the WebTuna user interface, in the change password screen, within the administration tab. Go to https://my.webtuna.com/password.jsp. The REST API uses HTTP basic authentication, where the username is the WebTuna username and the password is the API key.

If the tool you are using to query the REST API does not prompt you for a username and password then you will need to add a header to your HTTP request:

Authorization: Basic <base-64-encoded username:password>

The username and password (API key) need to be concatenated with a ‘:’ separator and then base-64 encoded. There are many libraries that can do the base-64 encoding depending on the language you are using.