Modify device name

Last Updated on : 2023-12-07 03:33:51download

You can modify the name of the device through this API.

API address

PUT: /v1.0/devices/{device_id}

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueDevice ID

Description of body

Parameter nameTypeINRequiredDescription
nameString trueName

Return parameter

Parameter nameTypeDescription
resultBooleanExecution result:
  • true: success
  • false: failure

Request example

PUT: /v1.0/devices/xxxid
{
  "name": "bedroom bedside lamp"
}

Return example

true

Error code

For more information, see error code.