Updating a Device Registration

Updating a Device Registration

The information that you store about a device may change in time. That is why it is recommended to periodically update the device registration.

Before you do that, you may want to read the device's object to identify which parameters have changed values. After you have identified them, pass them to Telerik Platform using a PUT request as shown below. Note that you must URL-encode the hardware ID (encodedDeviceId) before sending it.

The registration object is detailed in Table of Registration Object Fields.

Use the following RESTful call to update a device registration:

Request:
    PUT https://api.everlive.com/v1/your-app-id/Push/Devices/HardwareId/<encodedDeviceId>
Headers:
     Content-Type: application/json
Body:
    {
        "PlatformVersion": "4.0.4",
        "Parameters.MyIntValue": 2
    }
Response:
    Status: 200 OK
    Content-Type: application/json
var deviceInfo = {
    "PlatformVersion": "4.0.4",
    "Parameters.MyIntValue": 2
};
var encodedDeviceId = encodeURIComponent(device_id);
$.ajax({
    type: "PUT",
    url: 'https://api.everlive.com/v1/your-app-id/Push/Devices/HardwareId/' + encodedDeviceId,
    contentType: "application/json",
    data: JSON.stringify(deviceInfo),
    success: function(data){
        alert(JSON.stringify(data));
    },
    error: function(error){
        alert(JSON.stringify(error));
    }
});

See Also


Start a free trial Request a demo
Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.