Skip to content

Commit 980dcd2

Browse files
authored
Merge pull request #3442 from reubenmiller/docs-smartrest2-template-id-notes
docs: use SmartREST 2.0 external id terminology instead of name
2 parents e85f7f2 + c68279d commit 980dcd2

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

Diff for: docs/src/operate/c8y/smartrest-templates.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ description: SmartREST 2.0 template registration and usage
88

99
%%te%% supports subscription to custom templates as documented [here](https://cumulocity.com/docs/smartrest/smartrest-two/#template-collections).
1010

11-
For every template that the device uses, it must publish all data to `s/uc/<template-name>` topic and subscribe to `s/dc/<template-name>` to receive data from the cloud, based on that template.
11+
For every template that the device uses, it must publish all data to the `s/uc/<template-external-id>` topic and subscribe to the `s/dc/<template-external-id>` topic to receive data from the cloud, based on that template's external id.
1212
When these templates are configured with %%te%%, subscriptions to all these relevant topics on Cumulocity cloud will be done by %%te%% internally.
13-
Local processes on the device can access these templates on the local MQTT broker by simply publishing to `c8y/s/uc/<template-name>` and subscribing to `c8y/s/dc/<template-name>` topics (note the `c8y/` prefix in topics).
13+
Local processes on the device can access these templates on the local MQTT broker by simply publishing to the `c8y/s/uc/<template-external-id>` topic and subscribing to the `c8y/s/dc/<template-external-id>` topic (note the `c8y/` prefix in topics).
1414

15-
A template named `$TEMPLATE_NAME` requires the following subscriptions to be added when connecting to Cumulocity:
15+
A template with the external id `$TEMPLATE_XID` requires the following subscriptions to be added when connecting to Cumulocity:
1616

1717
```text
18-
s/dc/$TEMPLATE_NAME
19-
s/uc/$TEMPLATE_NAME
18+
s/dc/$TEMPLATE_XID
19+
s/uc/$TEMPLATE_XID
2020
```
2121

2222
**This is not done automatically and the custom templates have to be declared using the `tedge` command.**
@@ -29,6 +29,10 @@ tedge config get c8y.smartrest.templates
2929

3030
## Add new template to thin-edge configuration
3131

32+
:::tip
33+
The thin-edge.io `c8y.smartrest.templates` configuration values refer to the SmartREST templates' External ID (also known as "X-ID").
34+
:::
35+
3236
To add new template to %%te%% the `tedge config` cli tool can be used as following:
3337

3438
```sh

0 commit comments

Comments
 (0)