List rooms
GET /clip/v2/resource/room
List rooms on the gateway.
Use include_all_room to include the Whole Home room, or include_no_room to include Unassigned. Use ext_device and ext_light to include related device and light data.
Parameters
| Field | Location | Type | Required | Description |
|---|---|---|---|---|
include_all_room | query | string | No | Also include the "Whole Home" room. |
include_no_room | query | string | No | Also include the "Unassigned" room. |
ext_device | query | string | No | Include additional device information. |
ext_light | query | string | No | Include additional light information. |
Example response
json
{
"code": 0,
"data": {
"arr": [
{
"id": "F80253CD-1118-44E8-A700-3A5953538B63",
"type": "room",
"name": "卧室",
"room_kind": 0,
"room_type": "",
"icon": "assets/room/room3.png",
"background": 1,
"sequence": 0,
"children": [
{
"rid": "241D3783-0052-4B35-A892-EF3211F311F5",
"rtype": "device"
}
],
"services": [
{
"rid": "2F84620F-C289-4AA3-8A1E-D6DE9C33D1F5",
"rtype": "group_light"
}
]
}
],
"len": 1,
"obj": {}
},
"msg": "success"
}Responses
| Status code | Meaning |
|---|---|
| 200 | OK |
Response fields
HTTP 200 OK
| Field | Type | Required | Description |
|---|---|---|---|
code | integer | Yes | Status code |
msg | string | Yes | Message |
data | object | Yes | Response payload. |
data.arr | object[] | Yes | Returned resources. |
data.arr[].id | string | Yes | Room UUID |
data.arr[].type | string | Yes | Always room. |
data.arr[].name | string | Yes | Room name. |
data.arr[].room_kind | integer | Yes | 0 for a standard room; 1 for Whole Home; 2 for Unassigned. |
data.arr[].room_type | string | Yes | A free-form room category, such as "Bedroom" or "Kitchen". |
data.arr[].icon | string | Yes | For BweeApp use only. |
data.arr[].background | integer | Yes | For BweeApp use only. |
data.arr[].sequence | integer | Yes | For BweeApp use only. |
data.arr[].children | ResInfo[] | Yes | Devices in the room. Each entry currently refers to a device resource. |
data.arr[].children[].rid | string | Yes | Resource UUID |
data.arr[].children[].rtype | string | Yes | Resource type |
data.arr[].services | ResInfo[] | Yes | Typically includes a group_light service for controlling the room's lights. |
data.arr[].services[].rid | string | Yes | Resource UUID |
data.arr[].services[].rtype | string | Yes | Resource type |