Hello cumulocity community,
What product/components do you use and which version/fix level are you on?
cumulocity iot platform 1011.0.12, smart rest templates 2.0
Is your question related to the free trial, or to a production (customer) instance?
What are you trying to achieve? Please describe it in detail.
We want to be able to export settings and configurations from a super tenant and import them on any sub tenant. We have created multiple scripts to export and import configurations via curl. For smart rest templates I only found the export/import function in the device management app, but no http/rest endpoints for that. I also know it is possible to register new smart rest templates via rest. But we also need them to be exported via rest.
greetings and thanks in advance
the export functions seems to be an UI-only functionality.
The good news is that it can be easily exported and imported using the inventory API:
will give you all smart rest templates.
To import them you need to remove all properties but to keep “name”, “type”, “__externalId” and “com_cumulocity_model_smartrest_csv_CsvSmartRestTemplate”
Note that you also have to assign the externalId of type
c8y_SmartRest2DeviceIdentifier to the newly created managedObject.
So after the POST request to the inventory from above you would have to create the externalId for that managedObject:
Hello Stefan and hello Tristan,
thank you for your answers. I followed the first steps to get the information via
I could not find any
__externalId property in the data I received. Can you clearify if I really need the externalId and how to get it?
I sent the data per Post request to the inventory without specifying the externalId. Under Device Management > Device types > SmartREST Templates I saw that the templates where successfully imported.
Edit: I saw that the ID of the SmartREST template was not present. It was neccessary to set a POST request against