Bulk registration on 10.15 for LWM2M

What product/components do you use and which version/fix level are you on?

Backend: 1015.0.218
UI: 1015.0.218

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.

To register our devices we POST the CSV file to devicecontrol/bulkNewDeviceRequests
On tenants with 1013 there is no problem. On tenants with 1015 this does not work anymore for LWM2M devices.
The POST returns no error, but all LWM2M-Bootstrap-Parameter in the UI are empty and this error is shown:

Fields used in the csv file:

endpoint id;
bootstrap psk_id;
bootstrap psk_key;
lwm2m server uri;
lwm2m psk_id;
lwm2m psk_key;
security instance id;

Do you get any error messages? Please provide a full error message screenshot and log file.

There is no error returned by the API on devicecontrol/bulkNewDeviceRequests.
When uploading the file through the UI for LWM2M bulk registration a internal Server error is returned with the message “Unsupported file format”

Have you installed all the latest fixes for the products and systems you are using?

Can you post an example of the csv file here?

I’m apparently not allowed to attach files here. The content of the UTF-8 encoded file is this:

ID;IDTYPE;CREDENTIALS;NAME;TYPE;SHELL;com_cumulocity_model_Agent;endpoint id;bootstrap psk_id;bootstrap psk_key;lwm2m server uri;securityMode;lwm2m psk_id;lwm2m psk_key;security instance id;serverPublicKey;external-c8y_BootstrapPskId;registrationLifetime;Path

As far as I can see ‘bulkNewDeviceRequests’ is not intended for LWM2M registration.
It’s for basic device detials, not the more detailed LWM2M details such as ‘bootstrap psk_id’.
At 10.15 the LWM2M bulk registration is through the GUI.
“Starting from version 10.15.0, the new device registration for LWM2M is introduced”
I’ve used your example data as a basis for a csv file which uploads in my 10.15 tenant successfully.

Please also note that certain column headings have changed e.g TYPE should be type.

The documentation to 1013 states something different:

To register a LWM2M device in Cumulocity IoT, upload a CSV file with registration data in the bulk registration dialog in Devices > Registration > Register device > Bulk device registration

I changed the TYPE heading to type and it still gives me an error. I will check the other headings.

As we are registering thousands of devices each year, this is not a suitable solution. Is there documentation on the endpoint that is used by this functionality?

Bulk registration is still possible in the UI for LWM2M devices.


Dev Tools shows that this performs this call…


…but this is not an officially supported REST API call.

So the changes to bulkNewDeviceRequests in 10.15 for uploading the csv are breaking the established functionality.
How can we register LWM2M devices using the API on 10.15?

It has all changed at 10.5, the most convenient way to bulk register lwm2m devices from csv is in the UI
Do you see the option I sent in the previous screenshot?

That option ultimately uses this endpoint…


…but this is not an officially supported REST API call.

I see the option in the screenshot, but as stated earlier, this is not a feasible option for hundreds or thousands of devices that get potentially onboarded each on a different tenant. We cannot use the UI for this, as we have automated the onboarding process to use the API. This is part of our production pipeline, where no user is able to enter anything in the UI and the device is only powered for the duration of the onboarding.

You CAN use the ‘new’ endpoint because it’s generic approach for extensible device registration feature and documented here…


So it’s POST …/service/lwm2m-agent/deviceRegistration/bulk

It’s not part of the official REST API but it is part of the device registration API specification.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.