<commit_before>---
layout: docwithnav
assignees:
- ashvayka
title: REST API
description: Supported REST API Reference for server-side integration of your IoT projects

---

* TOC
{:toc}

## 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.](https://demo.thingsboard.io/swagger-ui.html)**

To explore REST API provided by ThingsBoard Professional Edition please use the following **[Swagger UI link.](https://cloud.thingsboard.io/swagger-ui.html)**

Once you will install ThingsBoard server you can open UI using the 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](/images/reference/swagger-ui.png)

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

In case of local installation:
 
 - replace **$THINGSBOARD_URL** with **127.0.0.1:8080**

In case of live-demo server:
 
 - replace **$THINGSBOARD_URL** with **demo.thingsboard.io**
 - replace **<EMAIL>** with your live-demo username (email)
 - replace **tenant** password with your live-demo password
See **[live-demo](/docs/user-guide/live-demo/)** page for more details how to get your account.

{% capture tabspec %}token
A,get-token.sh,shell,resources/get-token.sh,/docs/reference/resources/get-token.sh
B,resonse.json,json,resources/get-token-response.json,/docs/reference/resources/get-token-response.json{% endcapture %}
{% include tabs.html %}

 - Now, you should set  'X-Authorization' to "Bearer $YOUR_JWT_TOKEN"  
 
 
## Java REST API Client

ThingsBoard team provides client library written in Java to simplify consumption of the REST API. 
Please see Java REST API Client [documentation page](/docs/reference/rest-client/) for more details.  <commit_msg>fix(rest-api): type resonse → response<commit_after>---
layout: docwithnav
assignees:
- ashvayka
title: REST API
description: Supported REST API Reference for server-side integration of your IoT projects

---

* TOC
{:toc}

## 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.](https://demo.thingsboard.io/swagger-ui.html)**

To explore REST API provided by ThingsBoard Professional Edition please use the following **[Swagger UI link.](https://cloud.thingsboard.io/swagger-ui.html)**

Once you will install ThingsBoard server you can open UI using the 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](/images/reference/swagger-ui.png)

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

In case of local installation:
 
 - replace **$THINGSBOARD_URL** with **127.0.0.1:8080**

In case of live-demo server:
 
 - replace **$THINGSBOARD_URL** with **demo.thingsboard.io**
 - replace **<EMAIL>** with your live-demo username (email)
 - replace **tenant** password with your live-demo password
See **[live-demo](/docs/user-guide/live-demo/)** page for more details how to get your account.

{% capture tabspec %}token
A,get-token.sh,shell,resources/get-token.sh,/docs/reference/resources/get-token.sh
B,response.json,json,resources/get-token-response.json,/docs/reference/resources/get-token-response.json{% endcapture %}
{% include tabs.html %}

 - Now, you should set  'X-Authorization' to "Bearer $YOUR_JWT_TOKEN"
 
 
## Java REST API Client

ThingsBoard team provides client library written in Java to simplify consumption of the REST API.
Please see Java REST API Client [documentation page](/docs/reference/rest-client/) for more details.

{'fraction_non_alphanumeric': 0.11318344404701074, 'fraction_numerical': 0.005109862033725089, 'mean_word_length': 4.4375, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6508633', 'n_tokens_mistral': 1243, 'n_tokens_neox': 1141, 'n_words': 422}