How to use the toolLink to How to use the tool

The following specification visualization (Swagger UI) includes some tools to test the API directly on a gateway.

The gateway must present a valid certificate for the domain name / IP address used. Please check the Security page for more information.

Ensure a valid certificate is providedLink to Ensure a valid certificate is provided

To check the certificate, access the HTTPS API URL from your browser directly and check if the certificate is accepted (no security warning) : https://lorix-one.local/api/v1

Once this is done, you can try the Info > API info route (the first one).

Get the authentication token (login)Link to Get the authentication token (login)

You can now configure the credentials by clicking the "Authorize" token at the top and provide the gateway username and password, then press "Authorize".

This allows us to execute successfully the "Auth > Login" route. The response should look like:

{
  "code": 200,
  "expire": "2021-06-02T10:55:21+02:00",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MjI2MjQxMjEsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTYyMjYyMzUyMX0.uCeD2IJ4cFJ9g5veJkeHfZdUJd2e9Pivf-PgAhYwGLU"
}

We will use this token to authorize the access to the other route. The token will be valid for 10 minutes. After that you will have to do the login again and use the new token.

The token validity duration can be configured in the Manager configuration files. For development, you can increase the duration to a few hours.

Set the authorization tokenLink to Set the authorization token

Copy the token from the login and paste it in the "Token" part of the "Authorize" window.

You can now execute any other route!

Open API SpecificationLink to Open API Specification

This specification is currently in Beta version. This specification will evolve and some advanced feature available actually will be removed for simplification. You may also expect some slight change in the scheme over the next minor updates of the Manager. Some endpoint are not described exhaustively and some may differ slightly from what is specified.


Failed to load API definition.

Errors

Fetch error

Failed to fetch https://download.wifx.net/lorix-os/1.3.0/manager-api.v0.11.2.json

Fetch error

Possible cross-origin (CORS) issue? The URL origin (https://download.wifx.net) does not match the page (https://iot.wifx.net). Check the server returns the correct 'Access-Control-Allow-*' headers.

Was this page helpful for you?

Yes
No
Fix it