Glasscubes API Reference

Glasscubes offers a powerful web REST API, which our customers and other 3rd parties can use to develop applications making use of Glasscubes functionality. This API can be used to integrate with existing systems or as a combination of Glasscubes and other applications.

Use this reference API documentation to understand the options that are available to you, and at the same time send requests and view the responses so you can quickly integrate with Glasscubes. Please contact us if you require additional functionality and we'll be happy to add it.

Introduction to authentication

We provide you access to our API by registering your application and giving you a client_id and a client_secret authentication pair. These are used to call an Auth endpoint and obtain an access token for registered Glasscubes users. You can then call any of our endpoints on that user’s behalf using the user’s access token.

Requesting access-token:

NOTE: The /auth/code endpoint is not currently supported, however it can be implemented on request. The /auth/code authenticates a user from a code that is given to you through your redirect URL. This happens after the user has logged into Glasscubes and been granted access to your application.

Access Token {"access_token": "string", "refresh_token": "string", "expiresIn": 0}

The user’s access token is valid for 24 hours. The amount of time remaining on an access token can be found in the ‘expires In’ field, which is measured in seconds.

If a user access token expires, call /auth/refresh endpoint with a refresh_token. The endpoint will then return a new user access token and refresh token pair, which will remain valid for 24 hours.

Errors

There is a set of general errors, which may be returned by any request to the API. These are listed below.

If the request was successful, STATUS_CODE=200 is returned with a documented response. If the request resulted in an API error, STATUS_CODE=400 is returned with a { 'errCode': xxx, 'errMsg': 'verbal description of error'} JSON error response

API Reference