Star

Reference Documentation

Design docs, concept definitions, and references for APIs and CLIs.

REST API

Swagger UI

Thingsboard REST API may be explored using Swagger UI. You can explore REST API of the live-demo server using this Swagger UI link.

Once you will install Thingsboard server you can open UI using following URL:

http://YOUR_HOST:PORT/swagger-ui.html

REST API Auth

Thingsboard uses JWT for request auth. You will need to populate “X-Authorization” header using “Authorize” button in the top-right corner of the Swagger UI.

image

In order to get the JWT token, you need to execute following request:

In case of local installation:

In case of live-demo server:

resources/get-token.sh
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"username":"[email protected]", "password":"tenant"}' 'http://THINGSBOARD_URL/api/auth/login'
resources/get-token-response.json
{"token":"$YOUR_JWT_TOKEN", "refreshToken":"$YOUR_JWT_REFRESH_TOKEN"}