DeviceRegistration table issue

Not able to delete multiple records using bulkDelete with where condition, getting issue as below
“‘removeBulk’ operation is not supported for ‘DeviceRegistration’.”

Hi, Raj!
Unfortunately, this operation is really not supported. You should remove DeviceRegistration object by object.

Regards, Andrii.

in any way it will not work means using rest api or any other?

Exactly. There is no way to remove more than one DeviceRegistration by one request (no matter, REST API or any SDK).

While i am saving with multiple channels, it was saving in multiple records as number of channels, if i will update push notifications i need to delete all once and need to insert updated channels

As I said, there is no way to remove multiple registration by one request. So, you should get all registrations from Backendless and remove it one by one.

can i save all channels in one record?

No. Any record in DeviceRegistration table can have only one channelName.

Can i update channel name in record using objectId?

You can try update, if will be error, please write

@rajasekhar_puligadda

To cancel device registration in ALL channels you may use cancelDeviceRegistration API:

public void unregisterDevice() throws BackendlessException;

// unregisters device from the specified Backendless messaging channels
public void unregisterDevice( List<String> channels ) 

After that you may register device to any required channel. If you just need to remove all device registration records at this stage - it can be done in console: simply select all devices you have and manually delete them.

Regarding your question about updating device registration records by objectId - yes, it can be done just like in any other Backendless table

Anton

I am using js sdk, in this there is no solution for this using coding. I have tried with http protocol delete operation using rest api call

Did you try unregistering devices by deviceId using REST? https://backendless.com/docs/rest/push_cancel_device_registration.html

yes i have tried the process similar to this

Was it successful? Is your problem solved?

Now its working fine, can we get deviceToken using rest api?

From an existing deviceRegistration record stored in DeviceRegistration? Or from google cloud messaging service? If you mean second question - no, not with Backendless. Read FCM docs, perhaps they have an answer

Anton

I am saving deviceRegistration record using DeviceRegistration in backendless

When device is registered successfully - a new DeviceRegistration object is saved to DeviceRegistration table. You can get token just like you are working with find in Data service. Find required object by objectId and get property deviceToken