Query Industrial Device Information

Last Updated on : 2023-06-15 06:00:58

Query the information about a specified industrial device on pages, which can be filtered by conditions.

API address

GET: /v1.1/iot-03/si/devices

Request parameter

Parameter nameTypeINRequiredDescription
tuya_device_idString falseThe ID of a Tuya device.
device_codeString falseThe code of a specified device.
device_nameString falseThe device name. Fuzzy search is supported.
device_model_codeString falseThe code of a specified device model. Multiple models are separated by a comma (,).
customer_codeString falseThe code of a specified customer.
production_time_startLong falseThe start time, which can be queried by production time.
production_time_endLong falseThe end time, which can be queried by production time.
is_onlineBoolean falseCheck whether the device is online.
failureBoolean falseIndicates whether a failure occurs.
page_noInteger falseThe current page number. Default value: 1, which means the first page.
page_sizeInteger falseThe number of items returned on each page. Default value: 20. Maximum value: 100.

Return parameter

Parameter nameTypeDescription
resultTyPageThe returned result.

Description of result

Parameter nameTypeDescription
page_sizeLongThe number of items returned on each page.
dataListThe data body.
totalLongThe total quantity.
page_noLongThe current page number.
has_moreBooleanSpecifies whether to return the next page.

Description of data

Parameter nameTypeDescription
real_time_positioningBooleanIndicates whether the device can be located in real time.
tuya_product_idStringTuya product ID.
is_onlineBooleanIndicates whether a device is online.
device_model_codeStringThe code of a specified device model.
gateway_idStringThe gateway ID.
device_nameStringThe device name.
running_statusStringThe operating status of a device.
daily_running_timeLongThe duration of operation on the day. Unit: milliseconds.
sale_timeLongThe sales time.
customer_codeStringThe code of a specified customer.
batch_numberStringThe device batch number.
modifierStringThe modifier.
gmt_createLongThe time when it is created.
gmt_modifiedLongThe time when it is updated.
device_type_codeStringThe code of a specified device type.
production_timeLongThe production time.
sale_latitudeStringThe latitude of a specified sales address.
device_codeStringThe unique code of a specified device.
sale_addressStringThe detailed sales address.
creatorStringThe creator.
tuya_device_idStringThe ID of a Tuya device.
failureBooleanIndicates whether a failure occurs.
total_running_timeLongThe total duration of operation. Unit: milliseconds.
is_gatewayBooleanSpecifies whether it is a gateway device.
sale_longitudeStringThe longitude of a specified sales address.
is_unbindBooleanIndicates whether it is unbound.

Request example

GET: /v1.1/iot-03/si/devices

Return example

{
    "result": {
        "data": [
            {
                "gmt_create": 1638189585900,
                "is_unbind": false,
                "creator": "bay1***",
                "tuya_product_id": "xtc***",
                "batch_number": "1",
                "real_time_positioning": true,
                "modifier": "bay16***",
                "is_gateway": true,
                "production_time": 0,
                "sale_address": "Zhejiang***",
                "gmt_modified": 1638189585900,
                "gateway_id": "vdevo***",
                "running_status": "",
                "tuya_device_id": "vdevo***",
                "device_name": "lqd4-1129-02",
                "sale_longitude": "3***",
                "sale_latitude": "12***",
                "device_type_code": "device",
                "failure": false,
                "device_code": "lq**",
                "is_online": true,
                "customer_code": "VIP001",
                "sale_time": 0,
                "device_model_code": "123"
            }
        ],
        "page_no": 1,
        "total": 1,
        "has_more": false,
        "page_size": 20
    },
    "t": 1638199200623,
    "success": true
}

Error code

For more information, see error code.