Introduction

AccelerateConnect is the API of Accelerate, which provides all the necessary endpoints to communicate with Accelerate.

Note

All communication to the API must be secured with TLS. Also note that the communicating IP address needs to be whitelisted by us before using this API

Structure

The API is divided by collections, each of these collections contains a set of endpoints that are related to each other and can sent or receive resources. A Resources is also known as an entity.

Collections:

Domain

An Accelerate cluster can hold multiple licenses. In order to communicate with your own license, you need to provide the domain parameter to every request. This domain is the same that you use to login into Accelerate.

1
2
3
{
  "domain": "demo"
}

Request signing

Every request sent to the AccelerateConnect API needs to be signed to ensure the integrity of the request. Follow these steps to create a request token:

  1. Add the current date to the payload, there are two formats available “timestamp” and “date”. Date should be format “yyyy-mm-dd hh:ii:ss”, timestamp should be a unix timestamp. You cannot use both.
  2. Order the payload alphabetically by key
  3. Concatenate all values to get one big string
  4. Append the private salt to the string (you should receive one from us)
  5. Make a SHA1 hash of that string
  6. Make sure the hash is uppercase
  7. The hash on step6 is your request-token. Add the token to the payload (keyname should be “token”)

Warning

Tokens have a limited lifetime Tokens are only valid for 5 minutes, otherwise Accelerate rejects the token with error “TOKEN_EXPIRED”

Example of request-signing

We have added the current date to the payload (and sorted it alphabetically):

1
2
3
4
5
{
  "consumer_id": "AB1234AB",
  "date": "2018-01-01 12:00:00",
  "ip_address": "127.0.0.1"
}

The concatenated string will look like this AB1234AB2018-01-01 12:00:00127.0.0.1PRIVATE_SALT. We create a SHA1 hash of the concatenated string and transformed it to uppercase: E3E44AEA3E440D0A4C07699CDCAD4B0D410FAD1B. This is now the request-token which we will append to the original payload:

1
2
3
4
5
6
{
  "consumer_id": "AB1234AB",
  "date": "2018-01-01 12:00:00",
  "ip_address": "127.0.0.1",
  "token": "E3E44AEA3E440D0A4C07699CDCAD4B0D410FAD1B"
}

Available request methods

AccelerateConnect supports the following request methods:

Type Method Purpose Data transport
Receive GET To receive information from the API Query parameters
Send POST Sent Information to the API JSON body
Upload POST Upload a file File blob in request body, parameters in base64 encoded JSON header

The upload-method

Uploading data to Accelerate works a little bit different in comparison the posting or fetching data. For upload requests, the parameters should be put in the header while the body is the file-blob. To ensure valid HTTP headers the parameters must be base64 encoded.

Note

As stated above the upload-method requires users to POST the file blob as body of the request. The parameters of the request should be put in a custom header called X-Accelerate-Upload. That header holds all the required parameters. The header-value format is a base64 encoded string (of the original JSON-parameters). Make sure to leave JSON syntax intact prior to base64 encoding it, e.g. ” *The base64 decoded string must be JSON-decodable* “

Example of “X-Accelerate-Upload” header

1
2
3
{
  "parameter" : "value"
}

If you want to send those parameters you’ll need to use this custom header in the request: X-Accelerate-Upload: eyJwYXJhbWV0ZXIiOiJ2YWx1ZSJ9