Queries the details of a product.
Limits
Each Alibaba Cloud account can run a maximum of 50 queries per second (QPS).
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | QueryProduct |
The operation that you want to perform. Set the value to QueryProduct. |
ProductKey | String | Yes | a1BwAGV**** |
The ProductKey of the product that you want to query. A ProductKey is a GUID that is issued by IoT Platform to a product. You can use the IoT Platform console or call the QueryProductList operation to view the information about all products within the current account. |
IotInstanceId | String | No | iot_instc_pu****_c*-v64******** |
The ID of the instance. You can view the instance ID on the Overview page in the IoT Platform console. Notice
For more information, see Overview. |
In addition to the preceding operation-specific request parameters, you must specify common request parameters when you call this operation. For more information, see Common request parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | String | iot.system.SystemException |
The error code returned if the call fails. For more information, see Error codes. |
Data | Struct |
The product information returned if the call is successful. |
|
AliyunCommodityCode | String | iothub_senior |
The type of the product. This parameter indicates whether a Thing Specification Language (TSL) model was used. Valid values:
|
AuthType | String | secret |
The authentication method that was used to connect the devices of the product to IoT Platform. Valid values:
|
CategoryKey | String | Lighting |
The identifier of the category to which the product belongs. This parameter is returned if the product uses the TSL model of a standard category that is pre-defined by IoT Platform. This parameter is available if the AliyunCommodityCode parameter is set to iothub_senior. |
CategoryName | String | Street Lamp |
The name of the product category. This parameter is returned if the product uses the TSL model of a standard category that is pre-defined by IoT Platform. This parameter is available if the AliyunCommodityCode parameter is set to iothub_senior. |
DataFormat | Integer | 1 |
The data format that was used by a communication protocol to transmit data between the devices and IoT Platform. This parameter is available if the AliyunCommodityCode parameter is set to iothub_senior. Valid values:
|
Description | String | Smart street light |
The description of the product. |
DeviceCount | Integer | 0 |
The number of devices under the product. |
GmtCreate | Long | 1581595942000 |
The time when the product was created. The value is a timestamp in milliseconds. |
Id2 | Boolean | false |
Indicates whether IoT Internet Device ID was enabled. Valid values:
|
NetType | Integer | 3 |
The network connection method. Valid values:
|
NodeType | Integer | 0 |
The node type of the product. This parameter is available if the AliyunCommodityCode parameter is set to iothub_senior. Valid values:
|
Owner | Boolean | true |
Indicates whether the operation was called by the owner of the product.
|
ProductKey | String | a1T27vz**** |
The ProductKey of the product. When you create a product, a ProductKey is the globally unique identifier (GUID) that is issued by IoT Platform to the product. |
ProductName | String | Street light |
The name of the product. |
ProductSecret | String | U5tW7i44uilc**** |
The ProductSecret of the product. |
ProductStatus | String | DEVELOPMENT_STATUS |
The status of the product.
|
ProtocolType | String | modbus |
The type of the protocol that was used by the sub-devices to connect with a gateway. This parameter is available if the AliyunCommodityCode parameter is set to iothub_senior and the NodeType parameter is set to 1. Valid values:
|
ValidateType | Integer | 1 |
The level of the data verification. Valid values:
The products that were created on October 14, 2020 or later support low-level verification or no verification. After verification, you can view the data that passes or fails the verification.
|
ErrorMessage | String | A system exception occurred. |
The error message returned if the call fails. |
RequestId | String | E4F94B97-1D64-4080-BFD2-67461667AA43 |
The ID of the request. |
Success | Boolean | true |
Indicates whether the call was successful.
|
Examples
Sample requests
https://iot.cn-shanghai.aliyuncs.com/?Action=QueryProduct
&ProductKey=a1BwAGV****
&<Common request parameters>
Sample success responses
XML
format
<QueryProductResponse>
<Data>
<Owner>true</Owner>
<CategoryName>Street lighting</CategoryName>
<DataFormat>1</DataFormat>
<ProductKey>a1BwAGV****</ProductKey>
<ProductStatus>DEVELOPMENT_STATUS</ProductStatus>
<GmtCreate>1581595942000</GmtCreate>
<ProductSecret>U5tW7i44uilc****</ProductSecret>
<NodeType>0</NodeType>
<ProductName>Street light</ProductName>
<ValidateType>1</ValidateType>
<DeviceCount>0</DeviceCount>
<NetType>3</NetType>
<AuthType>secret</AuthType>
<CategoryKey>Lighting</CategoryKey>
<Id2>false</Id2>
<AliyunCommodityCode>iothub_senior</AliyunCommodityCode>
</Data>
<RequestId>DA5A3C45-D457-48ED-9A20-AEDEA8503401</RequestId>
<Success>true</Success>
</QueryProductResponse>
JSON
format
{
"Data": {
"Owner": true,
"CategoryName": "Street lighting",
"DataFormat": 1,
"ProductKey": "a1BwAGV****",
"ProductStatus": "DEVELOPMENT_STATUS",
"GmtCreate": 1581595942000,
"ProductSecret": "U5tW7i44uilc****",
"NodeType": 0,
"ProductName": "Street light"
"ValidateType":1,
"DeviceCount": 0,
"NetType": 3,
"AuthType": "secret",
"CategoryKey": "Lighting",
"Id2": false,
"AliyunCommodityCode": "iothub_senior"
},
"RequestId": "DA5A3C45-D457-48ED-9A20-AEDEA8503401",
"Success": true
}
Error codes
For a list of error codes, visit the API Error Center.