Relesys API Docs

v1.2

https://api.relesysapp.net/api/v1.2

Welcome

Getting access

In order to access the API, you need to get hold of a Client ID and a Client Secret. These are provided by Relesys. Please contact your relevant client manager, or contact support@relesys.net for further assistance.

Authentication

The API uses a OAuth2 token (Bearer token) for authentication. To get one, we must first make an HTTP call to our token endpoint, with the credentials provided by Relesys prior to this.

When requesting a token, we use the OAuth2 client_credentials flow.
The endpoint to use is:

https://api.relesysapp.net/login/oauth/authorize

The POST request must be with content type 'application/x-www-form-urlencoded' and contain the following body:

Name Required Type Description
grant_type True string It should always be 'client_credentials'
client_id True string Client ID provided by Relesys
client_secret True string Client Secret provided by Relesys
scope True string See Scopes under Concepts

An example of a request for a token may look like this:

HTTP
POST /login/oauth/authorize HTTP/1.1
Host: api.relesysapp.net
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials
    &client_id=00000000-0000-0000-0000-000000000000
    &client_secret=xxx
    &scope=relesys.api

The result will look something like this.

JSON
{
    "access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjE4ZGFhYThlMzE...",
    "expires_in": "3600",
    "token_type": "Bearer"
}

Using the token

The access_token from the result, should then be used in the Authorization Header for all calls to the API. It should be prefixed with Bearer as seen in this example.

HTTP
GET /api/v1/users HTTP/1.1
Host: api.relesysapp.net
Accept-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjE4ZGFhYThlMzE...