update_device_type
To update the device (hardware) type and the unique ID of a unit, use the unit/update_device_type command.
svc=unit/update_device_type¶ms={
"itemId": <long>,
"deviceTypeId": <long>,
"uniqueId": <text>
}
Parameters
The request must contain the following parameters:
Parameter | Description |
---|---|
itemId | Unit ID. |
deviceTypeId | New device type. |
uniqueId | New unique ID. |
You can get all available device types using the core/get_hw_types command.
Response
If the request is completed successfully, a response of the following format is returned:
{
"uid": <text>, /* Unique ID. */
"hw": <long> /* Device type. */
}
Otherwise, an error code is returned.
Error codes
Error code | Description |
---|---|
4 | Wrong device type ID. |
6 | Failed to update the device type. |
7 | No ADF_ACL_AVL_UNIT_EDIT_HW access right to the unit. |
1002 | An item with the specified property already exists. |