如何使用用户给定的 fragment/series 名称指定 SmartREST 2.0 模板

How to specify a SmartREST 2.0 template with fragment/series name given by user

如何定义自定义 SmartREST 2.0 模板,其行为类似于用于创建测量的预定义静态模板 200? 我的目标是用户可以通过 MQTT 传递片段和系列的名称以添加通用属性。 我只能找到 documentation/examples 用于测量创建,其中片段和系列在 SmartREST 模板中进行了硬编码。

SmartREST 2.0 不提供将密钥设置为负载参数的功能。一般来说,我会建议尽可能具体地制作 SmartREST 模板。这样可以节省传输数据量并使配置更细化。

SmartREST 1.0 提供了您正在寻找的功能。它提供对关联的 JSON 结构的完全访问。不幸的是,这种灵活性伴随着缺点,即它只能通过 API 而不是通过用户界面使用。看这里:https://cumulocity.com/guides/reference/smartrest/ and here: https://cumulocity.com/guides/device-sdk/mqtt/#smartrest-1