Get Device Details

Last Updated on : 2023-06-20 14:54:11

Query the device details by device ID.

API address

GET: /v1.0/expand/devices/{device_id}

Request parameter

Parameter name Type IN Required Description
device_id String uri true The ID of a Tuya device.

Return parameter

Parameter name Type Description
result DeviceResponse The returned result.

Description of result

Parameter name Type Description
active_status String Indicates whether the device is activated. Valid values:
  • 0: The device is not activated.
  • 1: The device is activated.
create_time Long The time when the device is created.
online_status String Indicates whether the device is online. Valid values:
  • 0: The device is offline.
  • 1: The device is online.
gateway_id String The gateway ID.
device_name String The device name.
product_id String The product ID.
cid String The unique device ID.
install_location String The location where the device is installed.
supplier_code String The code of the supplier.
device_ip String The IP address of a specified device.
mac_address String The MAC address of a specified device.
project_id String The ID of a specified project.
device_id String The device ID.
extend_data String The extended data.
product_type String The category of a specified product.

Request example

GET: /v1.0/expand/devices/6ce****

Return example

{ "result": { "device_id": "6ce****", "create_time": 1591693362843, "online_status": 1, "gateway_id": "6c2****", "install_location": "The east entrance of the community", "device_ip": "192.168.16.***", "uid": "ay1534****", "device_name": "Access control at the east entrance of the community", "product_type": "wf_znmj", "extend_data": "{'pass':'123456','ip':'192.168.2.160','url':'http://192.168.2.160:8090'}", "active_status": 1, "project_id": "1356****", "mac_address": "00-55-52-24-01-65", "product_id": "0vbr****", "supplier_code": "tuya", "cid": "1207****" }, "success": true }

Error code

For more information, see error code.