QueryDeviceDetail

Last Updated on : 2025-10-09 09:26:39Copy for LLMView as MarkdownDownload PDF

Call this operation to query the details of a specified device.

Request Parameters

Name Type Required Sample Values Description
Action String Yes QueryDeviceDetai System defined parameters. Value: QueryDeviceDetai
ProductKey String No A1BwAGV * * * * The product Key of the device to be queried.
DeviceName String No Light Specifies the name of the device to query.
IoTID String No **** 00100 The ID of the device to be queried.

Note: When calling an API, in addition to the API-specific request parameters described in this topic, you must also pass in the common request parameters. For more information about common request parameters, see Common parameters.

Return data

name Type Sample Values Description
Code String Iot.system.SystemException The error code returned when the call fails. For more information, see Error codes.
Data Struct When the call is successful, the detailed information of the device is returned.
DeviceName String Light The device name.
DeviceSecret String No * * * * The device key.
FirmwareVersion String V1.0.0.0 The version number of the default OTA module.
GmtActive String 2018-08-06 10:48:41 The activation time of the device, in GMT format.
GmtCreate String 2018-08-06 10:47:50 The creation time of the device, in GMT format.
GmtOnline String 2018-08-06 13:43:12 The last time the device went online, in GMT format.
IoTID String **** 00100 The ID issued by IoT platform as the unique identifier of the device.
IpAddress String 10.0.0.1 The IP address of the device.
Nickname String detectors_in_beijing Note name of the device.
NodeType Integer 0 Node type, value: ●0 : Equipment. The device cannot mount sub-devices. You can connect to the IoT platform directly or as a sub-device of the gateway to connect to the IoT platform. ●1 : Gateway. The Gateway can mount sub-devices, have a sub-device management module, maintain the topological relationship of sub-devices, and synchronize the topological relationship to the IoT platform.
Owner Boolean True Whether the API caller is the device owner.
ProductKey String A1rYuVF * * * * The ProductKey of the product to which the device belongs.
ProductName String Test The name of the product to which the device belongs.
Region String Cn-shanghai The region where the device is located (corresponds to the service region of the Internet of Things platform on the console).
Status String Online Device status. Value: ●Online : equipment online. ●Offline : The device is offline. ●Unactived : The device is not activated. ●Disable : Device is disabled.
UtcActive String 2018-08-06 T02:48:41.000Z The activation time of the device, in UTC format.
UtcCreate String 2018-08-06 T02:47:50.000Z The creation time of the device, in UTC format.
UtcOnline String 2018-08-06 T05:43:12.000Z The last time the device went online, in UTC format.
ErrorMessage String System exception Error information returned when the call fails.
RequestID String E55E50B7-40EE-4B6B-8BBE-D3ED55CCF565 The unique identifier generated for this request.
Success Boolean True Indicates whether the call succeeded. ●True : The call succeeded. ●False : The call failed.

Example

Request Example

https://si-d6e8d****958054.tuyacloud.com:8686/?Action=QueryDeviceDetail
&ProductKey=a1rYuVF****
&DeviceName=device1
&<Common request parameters>

Normal return example

{
	"Data": {
		"Owner": true,
		"GmtActive": "2020-01-16 13:33:37",
		"DeviceName": "Humidity",
		"ProductKey": "a1ttsqu****",
		"DeviceSecret": "sLefbFmN9SYfnWLJTePG893XNuRV****",
		"IpAddress": "42.120.XX.XXX",
		"GmtCreate": "2020-01-08 14:47:08",
		"UtcCreate": "2020-01-08T06:47:08.000Z",
		"IotId": "dwnS41bhNxjslDAIF****00100",
		"Status": "OFFLINE",
		"UtcOnline": "2020-01-17T08:19:11.091Z",
		"Region": "cn-shanghai",
		"UtcActive": "2020-01-16T05:33:37.830Z",
		"Nickname": "温湿度",
		"NodeType": 0,
		"GmtOnline": "2020-01-17 16:19:11",
		"ProductName": "光照温湿度传感器"
	},
	"RequestId": "D2D2DE90-DD0F-44EA-9F56-63F07A59F65B",
	"Success": true
}