Skip to content

Commit 5820201

Browse files
committed
Merge branch 'staging/3.9' into release/3.9
2 parents ffa3aa8 + 4812e83 commit 5820201

File tree

127 files changed

+1311
-851
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+1311
-851
lines changed

_config.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ collections:
7676
release:
7777
branch: release-3.9
7878
branch_major_next: master
79-
ver: 3.9
80-
ce_ver: 3.9
81-
ce_tag: v3.9
82-
ce_full_ver: 3.9.0
83-
pe_ver: 3.9pe
84-
pe_full_ver: 3.9.0PE
85-
wd_examples_commit: v3.9
79+
ver: 3.9.1
80+
ce_ver: 3.9.1
81+
ce_tag: v3.9.1
82+
ce_full_ver: 3.9.1
83+
pe_ver: 3.9.1pe
84+
pe_full_ver: 3.9.1PE
85+
wd_examples_commit: v3.9.1
8686
# >>> EDGE
8787
edge_ver: 3.9
8888
edge_tag: v3.9

_data/host-constant.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
apiHostName: demo.thingsboard.io
88
- tag: pe
99
hostName: thingsboard.cloud
10-
mqttHostName: $THINGSBOARD_HOST_NAME
11-
coapHostName: $THINGSBOARD_HOST_NAME
12-
httpsUrl: $THINGSBOARD_HOST_NAME
13-
lwm2mHostName: $THINGSBOARD_HOST_NAME
10+
mqttHostName: mqtt.thingsboard.cloud
11+
coapHostName: coap.thingsboard.cloud
12+
httpsUrl: https://thingsboard.cloud
13+
lwm2mHostName: lwm2m.thingsboard.cloud
1414
apiHostName: YOUR_SERVER_HOSTNAME
1515
- tag: paas
1616
hostName: thingsboard.cloud

_data/paas-eu/docs-home.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ toc:
259259
- title: Version control
260260
path: /docs/paas/eu/user-guide/version-control/
261261
- title: PSM and eDRX Support
262-
path: /docs/user-guide/psm/
262+
path: /docs/paas/eu/user-guide/psm/
263263
- title: Bulk Provisioning
264264
path: /docs/paas/eu/user-guide/bulk-provisioning/
265265
- title: Scheduler

_data/paas/docs-home.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ toc:
258258
- title: Version control
259259
path: /docs/paas/user-guide/version-control/
260260
- title: PSM and eDRX Support
261-
path: /docs/user-guide/psm/
261+
path: /docs/paas/user-guide/psm/
262262
- title: Bulk Provisioning
263263
path: /docs/paas/user-guide/bulk-provisioning/
264264
- title: Scheduler

_data/pe/docs-home.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ toc:
262262
- title: Version control
263263
path: /docs/pe/user-guide/version-control/
264264
- title: PSM and eDRX Support
265-
path: /docs/user-guide/psm/
265+
path: /docs/pe/user-guide/psm/
266266
- title: Bulk Provisioning
267267
path: /docs/pe/user-guide/bulk-provisioning/
268268
- title: Scheduler

_includes/docs/pe/user-guide/custom-translation.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
{% assign feature = "Custom Translations" %}{% include templates/pe-feature-banner.md %}
22

3+
{% assign addEntityTableWidgetLink = "/docs/getting-started-guides/helloworld-pe/#step-32-add-an-entities-table-widget" %}
4+
{% if docsPrefix == "paas/" %}
5+
{% assign addEntityTableWidgetLink = "/docs/paas/getting-started-guides/helloworld/#step-32-add-an-entities-table-widget" %}
6+
{% endif %}
7+
{% if docsPrefix == "paas/eu/" %}
8+
{% assign addEntityTableWidgetLink = "/docs/paas/eu/getting-started-guides/helloworld/#step-32-add-an-entities-table-widget" %}
9+
{% endif %}
10+
311
* TOC
412
{:toc}
513

@@ -196,7 +204,7 @@ Here is an example of an entry for translating the dashboard title into Italian:
196204
}
197205
...
198206
```
199-
- Navigate to the "Dashboards" page. You can either [create a new dashboard](/docs/pe/user-guide/dashboards/#create-new-dashboard){:target="_blank"} or select an existing one. Open the dashboard details;
207+
- Navigate to the "Dashboards" page. You can either [create a new dashboard](/docs/{{docsPrefix}}user-guide/dashboards/#create-new-dashboard){:target="_blank"} or select an existing one. Open the dashboard details;
200208
- Enter the dashboard editing mode. Set a custom translation for the dashboard title using a structure in the format {i18n}:
201209
```text
202210
{i18n:custom.my-dashboard.title}
@@ -213,7 +221,7 @@ Here is an example of an entry for translating the dashboard title into Italian:
213221
title: Specify [custom translation](#translation-editing-using-advanced-mode) for the dashboard name in the translation map. In this example, we will use a translation map in JSON format;
214222
===
215223
image: https://img.thingsboard.io/user-guide/custom-translation/dashboard-internalization-2-pe.png,
216-
title: Navigate to the "Dashboards" page. You can either [create a new dashboard](/docs/pe/user-guide/dashboards/#create-new-dashboard){:target="_blank"} or select an existing one. Open the dashboard details;
224+
title: Navigate to the "Dashboards" page. You can either [create a new dashboard](/docs/{{docsPrefix}}user-guide/dashboards/#create-new-dashboard){:target="_blank"} or select an existing one. Open the dashboard details;
217225
===
218226
image: https://img.thingsboard.io/user-guide/custom-translation/dashboard-internalization-3-pe.png,
219227
title: Enter the dashboard editing mode. Set a custom translation for the dashboard title using a structure in the format {i18n}: <b>{i18n:custom.my-dashboard.title}</b>. Apply changes;
@@ -242,7 +250,7 @@ Here's an example entry:
242250
...
243251
```
244252

245-
- Open your dashboard on the "Dashboards" page. [Add an Entities table widget](/docs/getting-started-guides/helloworld-pe/#step-32-add-an-entities-table-widget){:target="_blank"} or use an existing one and enter its editing mode;
253+
- Open your dashboard on the "Dashboards" page. [Add an Entities table widget]({{addEntityTableWidgetLink}}){:target="_blank"} or use an existing one and enter its editing mode;
246254
- In the widget settings, set the custom translations for:
247255
- Widget title - <b>{i18n:custom.my-widget.name}</b>;
248256
- Entity label column title - <b>{i18n:custom.my-widget.label-text}</b>;
@@ -285,7 +293,7 @@ Here's an example entry:
285293
}
286294
...
287295
```
288-
- Open your dashboard on the "Dashboards" page. [Add an Entities table widget](/docs/getting-started-guides/helloworld-pe/#step-32-add-an-entities-table-widget) or use an existing one and enter its editing mode;
296+
- Open your dashboard on the "Dashboards" page. [Add an Entities table widget]({{addEntityTableWidgetLink}}) or use an existing one and enter its editing mode;
289297
- Navigate to the "Widget card" tab of the "Advanced" settings and set a custom translation for the widget title tooltip using a structure in the format {i18n} - <b>{i18n:custom.my-widget.name}</b>;
290298
- Apply changes;
291299
- Hover on widget title and check applied translation.
@@ -329,7 +337,7 @@ Here's an example entry:
329337
}
330338
...
331339
```
332-
- Open your dashboard on the "Dashboards" page. [Add an Entities table widget](/docs/getting-started-guides/helloworld-pe/#step-32-add-an-entities-table-widget) or use an existing one and enter its editing mode;
340+
- Open your dashboard on the "Dashboards" page. [Add an Entities table widget]({{addEntityTableWidgetLink}}) or use an existing one and enter its editing mode;
333341
- Open the "temperature" data key configuration;
334342
- Use cell content function. An example of the function we use is provided below:
335343
- Apply all changes;
@@ -393,7 +401,7 @@ Here's an example entry:
393401
}
394402
...
395403
```
396-
- Open your dashboard on the "Dashboards" page. [Add a new widget](/docs/pe/user-guide/widgets/#adding-a-widget-to-the-dashboard) - "HTML Value Card" from the "Cards" widgets bundle.
404+
- Open your dashboard on the "Dashboards" page. [Add a new widget](/docs/{{docsPrefix}}user-guide/widgets/#adding-a-widget-to-the-dashboard) - "HTML Value Card" from the "Cards" widgets bundle.
397405
Specify the device that transmits temperature readings as the data source;
398406
- Now, navigate to the "Appearance" tab. Take the function from the example below and paste it into the "HTML" field. Click "Add";
399407
- Save the dashboard;

_includes/docs/reference.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,6 @@ Platform supports three database options at the moment:
139139

140140
* **SQL** - Stores all entities and telemetry in SQL database. ThingsBoard authors recommend to use PostgreSQL and this is the main SQL database that ThingsBoard supports.
141141
It is possible to use HSQLDB for local development purposes. **We do not recommend to use HSQLDB** for anything except running tests and launching dev instance that has minimum possible load.
142-
* **NoSQL (Deprecated)** - Stores all entities and telemetry in NoSQL database. ThingsBoard authors recommend to use Cassandra and this is the only NoSQL database that ThingsBoard supports at the moment.
143-
Please note that this option is deprecated in favor of Hybrid approach due to many limitations of NoSQL for transactions and "joins" that are required to enable advanced search over IoT entities.
144142
* **Hybrid (PostgreSQL + Cassandra)** - Stores all entities in PostgreSQL database and timeseries data in Cassandra database.
145143
* **Hybrid (PostgreSQL + TimescaleDB)** - Stores all entities in PostgreSQL database and timeseries data in Timescale database.
146144

Lines changed: 103 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,134 @@
1-
21
* TOC
32
{:toc}
43

5-
## Interactive Documentation
4+
ThingsBoard provides interactive REST API documentation via [Swagger UI](https://swagger.io/){:target="_blank"}. This tool allows you to explore available API methods, understand their parameters, and execute API requests directly from your browser.
65

7-
{% if docsPrefix contains "paas/" or docsPrefix == "pe/" %}
8-
ThingsBoard REST API interactive documentation is available via Swagger UI. For example, you may browse ThingsBoard Cloud API documentation using the **[Swagger UI link](https://{{hostName}}/swagger-ui.html)**.
9-
{% else %}
10-
ThingsBoard REST API interactive documentation is available via Swagger UI. For example, you may browse Community Edition demo server API documentation using the **[Swagger UI link](https://demo.thingsboard.io/swagger-ui.html)**.
11-
{% endif %}
6+
## Where to find Swagger UI?
127

13-
{% if docsPrefix contains "paas/" %}
14-
{% else %}
15-
Once you will install ThingsBoard server you can open an interactive documentation using the following URL:
16-
17-
```
18-
http://YOUR_HOST:PORT/swagger-ui.html
8+
{% if docsPrefix == "pe/" %}
9+
Every ThingsBoard instance has its own Swagger UI page, accessible at:
10+
11+
```text
12+
http://$THINGSBOARD_HOST:PORT/swagger-ui.html
1913
```
14+
{: .copy-code}
15+
16+
&#42;Replace **$THINGSBOARD_HOST:PORT** with your actual ThingsBoard server address.
2017

18+
For example, you may browse ThingsBoard Cloud API documentation using the [Swagger UI link](https://{{hostName}}/swagger-ui.html){:target="_blank"}.
2119
{% endif %}
20+
{% if docsPrefix == null %}
21+
Every ThingsBoard instance has its own Swagger UI page, accessible at:
22+
23+
```text
24+
http://$THINGSBOARD_HOST:PORT/swagger-ui.html
25+
```
26+
{: .copy-code}
2227

23-
Documentation page will automatically use your credentials, if you have previously authorized on the main login page.
24-
You may use “Authorize” button in the top right corner of the documentation page to manually authorize. You may also use this button to authorize as a different user. See below:
28+
&#42;Replace **$THINGSBOARD_HOST:PORT** with your actual ThingsBoard server address.
2529

26-
{% include images-gallery.html imageCollection="swagger-ui" %}
30+
For example, you may browse Community Edition demo server API documentation using the [Swagger UI link](https://demo.thingsboard.io/swagger-ui.html){:target="_blank"}.
31+
{% endif %}
32+
{% if docsPrefix == "paas/" %}
33+
Every [ThingsBoard Cloud](https://thingsboard.cloud/){:target="_blank"} instance has its own Swagger UI page.
34+
Browse ThingsBoard Cloud REST API documentation by clicking the button below:
2735

28-
{% if docsPrefix == "pe/" or docsPrefix contains "paas/" %}
36+
<br>
37+
<p><a href="https://thingsboard.cloud/swagger-ui.html" target="_blank" class="n-button add-device">ThingsBoard Cloud REST API documentation</a></p>
38+
{% endif %}
39+
{% if docsPrefix == "paas/eu/" %}
40+
Every [ThingsBoard EU Cloud](https://eu.thingsboard.cloud/){:target="_blank"} instance has its own Swagger UI page.
41+
Browse ThingsBoard EU Cloud REST API documentation by clicking the button below:
2942

30-
The easiest way to get your account is to use [ThingsBoard Cloud](https://{{hostName}}/signup) server.
43+
<br>
44+
<p><a href="https://eu.thingsboard.cloud/swagger-ui.html" target="_blank" class="n-button add-device">ThingsBoard EU Cloud REST API documentation</a></p>
45+
{% endif %}
3146

32-
{% else %}
47+
## How to authenticate in Swagger UI?
48+
49+
- If you are already logged in via the main ThingsBoard login page, Swagger UI will automatically use your credentials.
50+
- You can manually authenticate or authorize as a different user using the "**Authorize**" button in the top-right corner of the Swagger page. Enter the username and password. Then, click "Authorize".
3351

34-
See **[live-demo](/docs/{{docsPrefix}}user-guide/live-demo/)** page for more details how to get your account.
52+
{% include images-gallery.html imageCollection="swagger-ui" %}
3553

54+
{% if docsPrefix == "pe/" or docsPrefix contains "paas/" or (docsPrefix == "paas/eu/") %}
55+
The easiest way to get your account is to use [ThingsBoard Cloud](https://{{hostName}}/signup){:target="_blank"} server.
56+
{% else %}
57+
See [Live Demo ThingsBoard](/docs/{{docsPrefix}}user-guide/live-demo/){:target="_blank"} page for more details how to get your account.
3658
{% endif %}
3759

38-
## JWT Tokens
60+
## How API authentication works?
3961

40-
ThingsBoard uses [JWT](https://jwt.io/) tokens for representing claims securely between the API client (browser, scripts, etc) and the platform.
41-
When you login to the platform, your username and password is exchanged to the pair of tokens.
62+
ThingsBoard uses [JWT](https://jwt.io/){:target="_blank"} tokens for representing claims securely between the API client (browser, scripts, etc) and the platform.
63+
When you login to the platform, your username and password is exchanged to the pair of tokens.
4264

65+
- **Access Token (JWT)** – short-lived token, used for executing API calls.
66+
- **Refresh Token** – used to obtain a new access token when the current one expires.
4367

44-
{% if docsPrefix contains "paas/" %}
45-
The main token is short-lived token you should use to perform the API calls. The refresh token is used to get new main token once it is expired.
46-
Default expiration time values are 2.5 hours and 1 week respectively.
68+
{% if docsPrefix == "pe/" or docsPrefix == null %}
69+
The expiration time of main and refresh tokens is [configurable](/docs/user-guide/install/{{docsPrefix}}config/){:target="_blank"} in system settings via **JWT_TOKEN_EXPIRATION_TIME** and **JWT_REFRESH_TOKEN_EXPIRATION_TIME** parameters.
70+
{% endif %}
4771

48-
See sample command below to get the token for user "[email protected]" and password "secret":
72+
Default token expiration:
4973

50-
{% else %}
51-
The main token is short-lived token you should use to perform the API calls. The refresh token is used to get new main token once it is expired.
52-
The expiration time of main and refresh tokens is [configurable](/docs/user-guide/install/{{docsPrefix}}config/) in system settings
53-
via JWT_TOKEN_EXPIRATION_TIME and JWT_REFRESH_TOKEN_EXPIRATION_TIME parameters. Default expiration time values are 2.5 hours and 1 week respectively.
74+
- **Access Token** is valid for **2.5 hours**.
75+
- **Refresh Token** is valid for **1 week**.
5476

55-
See sample command below to get the token for user "[email protected]", password "tenant" and server "THINGSBOARD_URL":
77+
## How to obtain a JWT token?
5678

79+
{% if docsPrefix == null or docsPrefix == "pe/" %}
80+
To obtain a JWT token for the user "[email protected]" with password "tenant" on "$THINGSBOARD_URL" (actual ThingsBoard server address), execute the following command:
81+
82+
```text
83+
curl -X POST --header 'Content-Type: application/json' \
84+
--header 'Accept: application/json' \
85+
-d '{"username":"[email protected]", "password":"tenant"}' \
86+
'http://$THINGSBOARD_URL/api/auth/login'
87+
```
88+
{: .copy-code}
89+
{% endif %}
90+
{% if docsPrefix == "paas/" %}
91+
To obtain a JWT token for the user "[email protected]" with password "secret", execute the following command:
92+
93+
```text
94+
curl -X POST --header 'Content-Type: application/json' \
95+
--header 'Accept: application/json' \
96+
-d '{"username":"[email protected]", "password":"secret"}' \
97+
'https://thingsboard.cloud/api/auth/login'
98+
```
99+
{: .copy-code}
100+
{% endif %}
101+
{% if docsPrefix == "paas/eu/" %}
102+
To obtain a JWT token for the user "[email protected]" with password "secret", execute the following command:
103+
104+
```text
105+
curl -X POST --header 'Content-Type: application/json' \
106+
--header 'Accept: application/json' \
107+
-d '{"username":"[email protected]", "password":"secret"}' \
108+
'https://eu.thingsboard.cloud/api/auth/login'
109+
```
110+
{: .copy-code}
57111
{% endif %}
58112

59-
{% capture tabspec %}token
60-
A,get-token.sh,shell,resources/get-token.sh,/docs/reference/resources/get-token.sh
61-
B,response.json,json,resources/get-token-response.json,/docs/reference/resources/get-token-response.json{% endcapture %}
62-
{% include tabs.html %}
113+
Response:
63114

64-
- Now, you should set 'X-Authorization' header to "Bearer $YOUR_JWT_TOKEN". **Make sure** you use main JWT token and not the refresh token.
115+
```json
116+
{"token":"$YOUR_JWT_TOKEN", "refreshToken":"$YOUR_JWT_REFRESH_TOKEN"}
117+
```
118+
{: .copy-code}
119+
120+
Once authenticated, use the obtained JWT token in the X-Authorization header for all API requests:
121+
122+
```text
123+
X-Authorization: Bearer $YOUR_JWT_TOKEN
124+
```
125+
{: .copy-code}
65126

66-
## Java REST API Client
127+
## Additional tools
67128

68-
ThingsBoard team provides client library written in Java to simplify consumption of the REST API.
69-
Please see Java REST API Client [documentation page](/docs/{{docsPrefix}}reference/rest-client/) for more details.
129+
For easier integration with the ThingsBoard API, you can use ThingsBoard team client libraries:
70130

71-
## Python REST API Client
131+
- [Java REST API Client](/docs/{{docsPrefix}}reference/rest-client/){:target="_blank"} – client library written in Java to simplify consumption of the REST API.
132+
- [Python REST API Client](/docs/{{docsPrefix}}reference/python-rest-client/){:target="_blank"} – client library written in Python to simplify the consumption of the REST API.
72133

73-
ThingsBoard team provides client library written in Python to simplify consumption of the REST API.
74-
Please see Python REST API Client [documentation page](/docs/{{docsPrefix}}reference/python-rest-client/) for more details.
134+
These clients allow you to create devices, assets, users, and other entities, as well as manage their relationships within ThingsBoard.

0 commit comments

Comments
 (0)