Queries the details of a product.

Limits

Each Alibaba Cloud account can run a maximum of 50 queries per second (QPS).

Note Resource Access Management (RAM) users of an Alibaba Cloud account share the quota of the account.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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 key of the product. A product key is a globally unique identifier (GUID) that is issued by IoT Platform to a new product. You can use the IoT Platform console or call the QueryProductList operation to query the details of all the products in the current account.

IotInstanceId String No iot_instc_pu****_c*-v64********

The instance ID. This parameter is not required for public instances. However, the parameter is required for the instances that you have purchased.

In addition to the preceding operation-specific request parameters, you must specify common request parameters when you call this API 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 succeeds.

AliyunCommodityCode String iothub_senior

The edition of the product. This parameter is used to specify whether a Thing Specification Language (TSL) model is required.

Valid values:

  • iothub: No TSL model is required.
  • iothub_senior: A TSL model is required.
AuthType String secret

The authentication method that is used to connect the devices of the product to IoT Platform. Valid values:

  • secret: Device secrets are used as the authentication method.
  • id2: IoT Internet Device ID is used as the authentication method.
  • x509: X.509 certificates are used as the authentication method.
CategoryKey String Lighting

The identifier of the category to which the product belongs.

This parameter is returned when the product uses the TSL model of a standard category that is pre-defined by IoT Platform.

This parameter is specified only when the AliyunCommodityCode is set to iothub_senior.

CategoryName String Street lighting

The name of the product category.

This parameter is returned when the product uses the TSL model of a standard category that is pre-defined by IoT Platform.

This parameter is specified only when the AliyunCommodityCode parameter is set to iothub_senior.

DataFormat Integer 1

The data format that is used by a communication protocol to transmit data between the devices and IoT Platform. This parameter is specified only when the AliyunCommodityCode parameter is set to iothub_senior.

Valid values:

  • 0: custom. A custom serial data format is used. In this mode, the device can report raw data, such as binary data streams. IoT Platform converts the raw data into standard Alink JSON data based on the specified data parsing script.
  • 1: Alink JSON. Alink JSON data is transmitted between the devices and IoT Platform. Alink is a data exchange protocol that is pre-defined by IoT Platform.
Description String A smart street light.

The description of the product.

DeviceCount Integer 0

The number of devices in the product.

GmtCreate Long 1581595942000

The creation time of the product. The value is a timestamp in milliseconds.

Id2 Boolean false

Indicates whether IoT Internet Device ID is enabled. Valid values:

  • true: IoT Internet Device ID is enabled.
  • false: IoT Internet Device ID is disabled.
NetType Integer 3

The network connection method. Valid values:

  • 3: Wi-Fi
  • 6: cellular network (2G/3G/4G/5G)
  • 7: Ethernet
  • 8: others
NodeType Integer 0

The node type of the product. This parameter is specified only when the AliyunCommodityCode parameter is set to iothub_senior. Valid values:

  • 0: device. Sub-devices cannot be attached to a device. A device can connect to IoT Platform directly or as a sub-device of a gateway.
  • 1: gateway. Sub-devices can be attached to a gateway. A gateway can manage sub-devices, maintain the topologies with sub-devices, and synchronize the topologies to IoT Platform.
Owner Boolean true

Indicates whether the operation is called by the owner of the product.

  • true: yes.
  • false: no.
ProductKey String a1T27vz****

The key of the product. When you create the product, the key 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 key of the product.

ProductStatus String DEVELOPMENT_STATUS

The status of the product.

  • DEVELOPMENT_STATUS: The product is being implemented.
  • RELEASE_STATUS: The product is published.
ProtocolType String modbus

The type of the protocol that is used by the sub-devices to connect to a gateway.

This parameter is specified only when the AliyunCommodityCode parameter is set to iothub_senior and the NodeType parameter is set to 1. Valid values:

  • modbus: Modbus
  • opc-ua: OPC UA
  • customize: custom protocol
  • ble: BLE
  • zigbee: ZigBee
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 succeeds.

  • true: The call succeeded.
  • false: The call failed.

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>
        <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",
		"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.