Update Device | Legacy

Restriction: This API endpoint is not supported in the public cloud.
Restriction: This API endpoint is not supported in the Free Trial cloud.

Updates the information for the device specified by <deviceId>. Currently, the API supports updating the description, roles, and dynamic fields.

Users can only update information for devices that are accessible based on their roles.

URL

Copy

https://<your-cloud>.perfectomobile.com/services/handsets/<deviceId>?operation=update&securityToken=value[&description=newDescription&roles=<list>&dynamicField.<name>=value]

Method

POST

Request parameters

Name Type Default Description

securityToken*

string


A unique cryptographic key assigned to an authorized user.

description

string


The new device description.

roles

list of strings


Comma separated list of device roles.

dynamicField.<name>

string


The name and value of a dynamic field for the device, each prefixed with dynamicField.. This parameter may appear multiple times in order to set multiple dynamic fields.
For example, to specify an integer dynamic field called timeout with the value 10, add dynamicField.timeout=10 to the URL.

dynamicField.category.<name>

string


The name and category of a dynamic field for the device, each prefixed with dynamicField.category. This parameter can appear multiple times in order to set multiple dynamic fields.

For example, to specify the category of the timeout field as 'runtime', add dynamicField.category.timeout=runtime to the URL.

* Mandatory parameter

Important: Both the roles and the dynamic fields replace the existing values of the device. They are not added to the existing.

To remove all roles, use the roles parameter with an empty value. There is no way to remove all dynamic fields.

Request response

Name Description
status success if the operation completed successfully; otherwise failure

Example

This example shows a request to update a device, changing the description.

Copy
Request with optional parameters
https://<your-cloud>.perfectomobile.com/services/handsets/ZX1G22FX2K?operation=update&securityToken=<your_token>&description="Nexus6 with Oreo"
Copy

JSON response

{
    "status":"success"}