Hi, I need to be able to add devices/assets to groups dynamically via internal API, this feature is not in the API documents, is there a way to find the correct methodology or can you point me in the right direction.
Thank you
Hi, I need to be able to add devices/assets to groups dynamically via internal API, this feature is not in the API documents, is there a way to find the correct methodology or can you point me in the right direction.
Thank you
Hi Michael,
there is no specific API for this because groups, just like devices & assets are managed objects, so you can use that API:
https://cumulocity.com/api/10.14.0/#tag/Managed-objects
For a managed object to be a group it has to have the type c8y_DeviceGroup (if it is a root) or c8y_DeviceSubGroup. To add a device to a group, you have to use the child asset API on the group managed object:
https://cumulocity.com/api/10.14.0/#operation/postManagedObjectChildAssetsResource
Best regards,
Harald
Thank you Mr Meyer, greatly appreciate the help
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.