Get Device List

Last Updated on : 2024-09-10 01:49:21

Get a list of devices and device status based on the application, product, or device ID.

API address

GET: /v1.0/devices

Request parameter

Parameter nameTypeINRequiredDescription
device_idsStringqueryfalseThe list of device IDs, separated with commas (,).
product_idStringqueryfalseThe product ID.
schemaStringqueryfalseThe unique ID of a specified application.
last_idStringqueryfalseThe last query ID of a specified device.
page_sizeIntegerquerytrueThe number of entries returned on each page.
page_noIntegerquerytrueThe current page number.
start_timeLongqueryfalseThe 10-digit timestamp of the start time for the query.
end_timeLongqueryfalseThe 10-digit timestamp of the end time for the query.

Return parameter

Parameter nameTypeDescription
resultBaseDeviceInfoResThe returned result.

Description of result

Parameter nameTypeDescription
totalLongThe total number of entries.
devicesListThe list of returned devices.
last_idStringThe last query ID of a specified device.

Request example

GET: /v1.0/devices?schema=testApp&page_no=1&page_size=20

Return example

{
    "devices": [
        {
            "sub": false,
            "create_time": 1575017570,
            "local_key": "11d7f7286caa****",
            "owner_id": "1160****",
            "biz_type": 310002,
            "ip": "58.251.**.****",
            "icon": "smart/program_category_icon/znyxss.png",
            "time_zone": "+08:00",
            "product_name": "Wi-Fi smart speaker SS190",
            "uuid": "12****",
            "active_time": 1584063323,
            "uid": "ay156531946658X****",
            "update_time": 1584939489,
            "product_id": "i9vkz***",
            "name": "Wi-Fi smart speaker SS190",
            "online": false,
            "model": "SS190",
            "id": "747b2165d9449964****",
            "category": "znyxss",
            "status": [
                {
                    "code": "smartspeaker_vol",
                    "value": "26"
                },
                {
                    "code": "smartspeaker_mic",
                    "value": "true"
                }
            ]
        }
    ],
    "total": 1,
    "last_id": "158493****"
}

Error code

For more information, see error code.