What product/components do you use and which version/fix level?
Cumulocity IoT 10.13
What are trying to achieve? Please describe in detail.
I want to get the internal id of the device in cumulocity using Mqtt smart rest templates. I am able to retreive the JWT token from the mqtt client and can use the identityApi rest call but is there a way to get the same using the mqtt client?
Devices may query their own managed object using inventory GET templates (see: SmartREST 2.0 - Cumulocity IoT Guides) and a corresponding response template (see: SmartREST 2.0 - Cumulocity IoT Guides).
Here are a few screenshots that show how such a template collection may be configured:
Since I had this request quite often also in terms of child devices via thin-edge.io wouldn´t it make sense to have that as a standard template anyway @Philipp_Emmel ?
It is important to know that for almost all use cases in SmartREST 2 the internal IDs of devices and child devices are not necessary. SmartREST 2 is designed so that devices can use their own external ID in communication (see: SmartREST 2.0 - Cumulocity IoT Guides).
That being said there are still a couple of advanced use cases where internal device IDs are required. I like the idea of adding a static request and response template for these functionalities.
@Murat_Bayram @Philipp_Emmel Can you create a Feature Request in aha so we can discuss in the DM Grooming?