update_device_type

To update the device (hardware) type and the unique ID of a unit, use the unit/update_device_type command.

Copied!
svc=unit/update_device_type&params={
    "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:

Copied!

{
    "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.

If you find a mistake in the text, please select it and press Ctrl+Enter.

Your message was sent. Thank you!

Report a mistake

An error occurred while submitting the form

Download PDF file
Download Word document

See also