Adding devices to groups via Cumulocity IOT api

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:

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:

Best regards,

Thank you Mr Meyer, greatly appreciate the help