Bulk Registration

hi,

After completing bulk registration, we have 2 daily administration issues:

  1. For a particular device custom attributes which were initially part of the CSV file, some may change during the lifecycle of the project, we need a way to do a “Bulk update” of those custom attributes. for example a constructor worker’s supervisor may change. Supervisor_name is a custom attribute. Deleting this device and re-adding it with the new custom attribute is not an option since we will lose all data (ex: measurements) associated with this device

  2. just like Bulk Registration, we may need “Bulk Deregistration”

any suggestions?

The purpose of registration is typically to enable devices to connect to Cumulocity. With Bulk registration device managed objects are also created in Cumulocity potentially with initial data. After that any data stored in these object can be modified at any time by the device itself or any user with write permissions to the device object.

These changes can done via the API directly: Cumulocity- OpenAPI - Update a specific managed object. There are also built-in UI capabilities that enable users editing properties of devices like the asset properties widget: Widgets collection - Cumulocity documentation

so there is no way to do a bulk update or bulk delete?

individually If I delete the corresponding device credential or a device, including it in the CSV file succeeds, but thats not scalable. If I dont do that I obtain:

You could use the go-c8y-cli tool for that. It supports chaining of commands. So you could first get all devices you want to update and then perform the update on them. The first example here updates all devices with the same fragment:

It also has functionality to work with csv:

Warning Especially if you are new to the tool, use production mode and dry run capabilities to simulate what a command would do, carefully check the results, and only then run the actual command. Do experiments on a non-production system. Also be aware that with Cumulocity you can only update top-level fragments but not individual properties within these fragments without providing the whole fragment.