Add a device in the room

Last Updated on : 2023-06-01 06:20:13download

You can add devices in the specified family room through this API.

API address

POST: /v1.0/homes/{home_id}/rooms/{room_id}/devices

Request parameter

Parameter name Type IN Required Description
home_id Long uri true Family ID
room_id Long uri true Room ID

Description of body

Parameter name Type IN Required Description
device_ids List true Device ID list

Description of device_ids

Parameter name Type IN Required Description
device_ids String false Specific parameter ID

Return parameter

Parameter name Type Description
result Boolean Execution result:
  • true: Successful execution
  • false: Execution failed

Request example

POST: /v1.0/homes/312321/rooms/2341231/devices
{
  "device_ids": [
    "ve23u9****",
    "ve23u92****"
  ]
}

Return example

true

Error code

For more information, see error code.