How to consume the Manager API?

Introduction

The Manager API remains functional in API Management (Sensedia Platform), but with some changes: the URL has changed, and so has the authentication method.

Now, the base URL is unique:

https://platform-production.sensedia.com/api-manager/api/v3/

To access the various available operations (check the Swagger for the full list), you must always send an Authorization header with a value in the following format:

Bearer <token>

The token is used to identify the tenant and return the correct information in the request.

Summing up

In your requests, send the header:

Authorization: Bearer <token>

Make sure to leave a space between "Bearer" and the token, and replace <token> with your access token (see below for how to generate it).

How to generate the token

To generate the token, you need valid client ID and client secret. To obtain them, follow the steps below.

  • Only Super Admin users can generate the access token.

  • The access token expires in 24 hours (86400 seconds).

  1. Go to Access Control.

  2. In the upper-right corner, click on your username and select the ACCOUNT SETTINGS option:

    user account settings dropdown
  3. In the CREDENTIALS tab, click GENERATE CREDENTIALS to generate the credentials.

    credentials tab generate button

You will then be able to view and copy the client ID and client secret, displayed as shown in the image below:

credentials generated with curl

After leaving the tab, you will still be able to view the client ID, but the client secret will no longer be visible for security reasons. Store it securely or revoke the current credential and generate a new one if necessary.

Generating the token with curl

You now need to send these credentials to the authorization server to generate the token. To make this easier, a curl command is provided on the screen, which can be used directly in the terminal, Postman, or another application.

The response from this command will contain the token, as shown in the example below:

{
  "access_token": "<token>",
  "expires_in": "86400",
  "token_type": "Bearer"
}

Using the token

Copy the value of the "access_token" field (your token) and include it in your HTTP requests using the header:

Authorization: Bearer <token>

This ensures that your requests to the Manager API will work correctly in API Management (Sensedia Platform).

Thanks for your feedback!
EDIT

Share your suggestions with us!
Click here and then [+ Submit idea]