Queries the details of the custom topic categories of a product.
QPS limits
You can call this API operation up to three times per second per account.
Debugging
Request parameters
Parameter |
Type |
Required |
Example |
Description |
Parameter |
Type |
Required |
Example |
Description |
Action | String | Yes | QueryProductTopic | The operation that you want to perform. Set the value to QueryProductTopic. |
ProductKey | String | Yes | HMyB******* | The ProductKey of the product. |
IotInstanceId | String | No | iot_instc_pu****_c*-v64******** | The ID of the instance. You can obtain the ID of the instance on the Overview page in the IoT Platform console.
For more information, see Instance 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 parameters.
Response parameters
Examples
Sample requests
https://iot.cn-shanghai.aliyuncs.com/?Action=QueryProductTopic
&ProductKey=HMyB*******
&<Common request parameters>
Sample success responses
XML
format
<QueryProductTopicResponse>
<RequestId>310E4A1E-B614-5607-B7DB-55530CAE074A</RequestId>
<Data>
<ProductTopicInfo>
<TopicShortName>/g18******F/${deviceName}/user/get</TopicShortName>
<EnableProxySubscribe>false</EnableProxySubscribe>
<Operation>1</Operation>
<Id>3679****</Id>
<ProductKey>g18******F</ProductKey>
</ProductTopicInfo>
<ProductTopicInfo>
<TopicShortName>/g18******F/${deviceName}/user/update</TopicShortName>
<EnableProxySubscribe>false</EnableProxySubscribe>
<Operation>0</Operation>
<Id>3679****</Id>
<ProductKey>g18******F</ProductKey>
</ProductTopicInfo>
<ProductTopicInfo>
<TopicShortName>/g18******F/${deviceName}/user/update/error</TopicShortName>
<EnableProxySubscribe>false</EnableProxySubscribe>
<Operation>0</Operation>
<Id>3679****</Id>
<ProductKey>g18******F</ProductKey>
</ProductTopicInfo>
</Data>
<Success>true</Success>
</QueryProductTopicResponse>
JSON
format
{
"RequestId": "310E4A1E-B614-5607-B7DB-55530CAE074A",
"Data": {
"ProductTopicInfo": [
{
"TopicShortName": "/g18******F/${deviceName}/user/get",
"EnableProxySubscribe": false,
"Operation": "1",
"Id": "3679****",
"ProductKey": "g18******F"
},
{
"TopicShortName": "/g18******F/${deviceName}/user/update",
"EnableProxySubscribe": false,
"Operation": "0",
"Id": "3679****",
"ProductKey": "g18******F"
},
{
"TopicShortName": "/g18******F/${deviceName}/user/update/error",
"EnableProxySubscribe": false,
"Operation": "0",
"Id": "3679****",
"ProductKey": "g18******F"
}
]
},
"Success": true
}
Error codes
For a list of error codes, see Service error codes.