Query Details of Industrial Device

Last Updated on : 2023-06-21 07:13:12download

Query the details of a specified industrial device by the device code.

API address

GET: /v1.1/iot-03/si/devices/{device_code}

Request parameter

Parameter nameTypeINRequiredDescription
device_codeStringuritrueThe code of a specified device.

Return parameter

Parameter nameTypeDescription
resultIotDeviceDetailDTOThe returned result.

Description of result

Parameter nameTypeDescription
sampling_rateStringThe sampling frequency.
sampling_timeLongThe sampling time.
real_time_addressStringThe real-time location.
real_time_longitudeStringThe real-time longitude.
real_time_latitudeStringThe real-time latitude.
device_propertiesListThe special attributes of a specified device.
tuya_device_idStringThe ID of a Tuya device.
tuya_product_idStringTuya product ID.
gateway_idStringThe gateway ID.
device_codeStringThe unique code of a specified device.
device_nameStringThe device name.
device_type_codeStringThe code of a specified device type.
device_model_codeStringThe code of a specified device model.
customer_codeStringThe code of a specified customer.
production_timeLongThe production time.
batch_numberStringThe device batch number.
sale_timeLongThe sales time.
sale_addressStringThe detailed sales address.
sale_longitudeStringThe longitude of a specified sales address.
sale_latitudeStringThe latitude of a specified sales address.
real_time_positioningBooleanIndicates whether the device can be located in real time.
is_gatewayBooleanSpecifies whether it is a gateway device.
is_onlineBooleanIndicates whether a device is online.
running_statusStringThe operating status of a device.
failureBooleanIndicates whether a failure occurs.
creatorStringThe creator.
modifierStringThe modifier.
gmt_createLongThe time when it is created.
gmt_modifiedLongThe time when it is updated.
is_unbindBooleanIndicates whether it is unbound.

Description of device_properties

Parameter nameTypeDescription
nameStringThe name of a specified attribute.
codeStringThe code of a specified attribute.
valueStringThe value of a specified attribute.

Request example

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

Return example

{
    "result": {
        "gmt_create": 1637824772859,
        "is_unbind": false,
        "tuya_product_id": "hz9***",
        "batch_number": "",
        "modifier": "",
        "is_gateway": true,
        "gmt_modified": 1637892279303,
        "gateway_id": "6c73***",
        "device_name": "Edge Gateway-Positioning",
        "device_properties": [
        ],
        "sale_longitude": "12***",
        "sale_latitude": "2***",
        "is_online": true,
        "customer_code": "",
        "device_model_code": "elegw01",
        "creator": "bay***",
        "real_time_positioning": true,
        "production_time": 0,
        "sale_address": "Zhejiang Province***",
        "running_status": "",
        "tuya_device_id": "6c7***",
        "real_time_longitude": "12***",
        "device_type_code": "gw",
        "failure": false,
        "device_code": "cnc",
        "real_time_latitude": "3***",
        "real_time_address": "Zhejiang Province****",
        "sale_time": 0
    },
    "t": 1638199642413,
    "success": true
}

Error code

For more information, see error code.