Get Device List

Last Updated on : 2024-08-21 01:45:59download

Get a list of devices.

API address

GET: /v1.0/illumination/devices

Request parameter

Parameter nameTypeINRequiredDescription
projectIdStringurifalseThe project ID.
roomIdStringuritrueThe room ID.
roomTypeIntegeruritrueThe room type.
pageIntegerurifalseThe current page number.
pageSizeIntegerurifalseThe number of items to be returned per page.
deviceStatusList《String》uritrueThe device status.

Return parameter

Parameter nameTypeDescription
totalintThe total number of returned items.
listDeviceBasicVO[]The list of devices.

Request example

GET: /v1.0/illumination/devices
{
  "pageSize": "10",
  "page": "1",
  "projectId": "1323671234234",
  "roomId": "152372223482",
}

Return example

{
    "tid": "f2919c24fbac11ed876d16e5066b4061",
    "result": {
        "list": [
            {
                "switchInfo": [
                ],
                "masterGroupJoinStatus": 2,
                "deviceStatuses": [
                    "normal"
                ],
                "industryPurpose": {
                },
                "installTime": 1681962468804,
                "switchStatus": false,
                "ownerId": "59457509",
                "deviceId": "6c4794741ec4f88c993***",
                "deviceName": "Gateway",
                "uuid": "a651b293c892b***",
                "roomId": "1559640253681***",
                "deviceStatus": "normal",
                "capability": "zigbee/wifi",
                "pointId": "",
                "devicePurpose": {
                },
                "deviceMac": "",
                "currentBrightness": 0,
                "model": "",
                "id": 2114488,
                "deviceType": "gateway",
                "deviceTypeValue": 1,
                "productId": "wpr7snzwzxbsy***",
                "deviceSaasId": "sa43837415438329***",
                "categoryCode": "wf_zig_wg2",
                "roomName": "Test",
                "topCategory": "wgzk",
                "online": true,
                "devicePower": 0,
                "category": "wg2",
                "projectId": "1541976932755718***",
                "properties": [
                    {
                        "dpName": "Mute Alert",
                        "dpId": 4,
                        "mode": "rw",
                        "dpValueStd": "false",
                        "propertyDetail": {
                            "type": "bool"
                        },
                        "dpCode": "switch_alarm_sound",
                        "property": {
                            "range": [
                            ]
                        }
                    }
                ]
            }
        ],
        "total": 1
    },
    "t": 1685095574507,
    "success": true
}

Error code

For more information, see error code.