Delete Devices from Room

Last Updated on : 2024-01-11 05:56:38download

Based on the home ID, room ID, and device IDs, delete devices from the specified room in a home.

API address

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

Request parameter

Parameter nameTypeINRequiredDescription
home_idLonguritrueThe home ID.
room_idLonguritrueThe room ID.

Description of body

Parameter nameTypeINRequiredDescription
device_idsList trueThe list of device IDs.

Description of device_ids

Parameter nameTypeINRequiredDescription
device_idsString falseThe IDs of the devices to be deleted. Multiple IDs are separated by commas (,).

Return parameter

Parameter nameTypeDescription
resultBooleanThe returned result. Valid values:
  • true: Deleted successfully.
  • false: Failed to delete.

Request example

DELETE: /v1.0/homes/31****/rooms/234****/devices
{
  "device_ids": [
    "did12345***",
    "did12345***"
  ]
}

Return example

{
    "tid": "ea0605487d3e31ee82c7664ef4d3e193",
    "result": true,
    "t": 1699341969429,
    "success": true
}

Error code

For more information, see error code.