Obtains a list of standard product categories predefined in IoT Platform.

Description

IoT Platform provides predefined TSL models for product categories, such as street lamp lighting, vehicle GPS, and flooding detection for you to use.

When you call the CreateProduct operation to create a product, you can pass in the CategoryKey parameter to specify a category. The created product has the standard TSL of the category.

Request parameters

Parameter Type Required Description
Action String Yes The operation that you want to perform. Set the value to ListThingTemplates.
IotInstanceId String No The ID of the instance. This parameter is not required for public instances. However, the parameter is required for the instances that you have purchased.
Common request parameters - Yes For more information, see Common parameters.

Response parameters

Parameter Type Description
RequestId String The globally unique ID generated by Alibaba Cloud for the request.
Success Boolean Indicates whether the call was successful. true indicates that the call was successful. false indicates that the call failed.
ErrorMessage String The error message returned if the call fails.
Code String The error code returned if the call fails. For more information about error codes, see Error codes.
Data List<CategoryInfo> The category list returned if the call was successful. For more information, see the Categoryinfo table.
Table 1. CategoryInfo
Parameter Type Description
CategoryKey String The identifier of the category.
CategoryName String The name of the category.

Examples

Sample requests

https://iot.cn-shanghai.aliyuncs.com/?Action=ListThingTemplates
&<Common request parameters>

Sample responses

Note IoT Platform provides many product categories, the following example does not show all product categories.
  • JSON format
    {
      "RequestId":"57b144cf-09fc-4916-a272-a62902d5b207",
      "Success":true,
      "Data": [
        {
          "CategoryName": "Smart Rear-view Mirror",
          "CategoryKey": "SmartRearviewMirror"
        },
        {
          "CategoryName": "Smart In-vehicle Infotainment",
          "CategoryKey": "SmartTox"
        }
      ]
    }
  • XML format
    <? xml version='1.0' encoding='utf-8'? >
    <ListThingTemplatesResponse>
        <RequestId>57b144cf-09fc-4916-a272-a62902d5b207</RequestId>
        <Success>true</Success>
        <Data>
          <CategoryInfo>
            <CategoryName>Smart Rear-view Mirror</CategoryName>
            <CategoryKey>SmartRearviewMirror</CategoryKey>
          </CategoryInfo>
          <CategoryInfo>
            <CategoryName>Smart In-vehicle Infotainment</CategoryName>
            <CategoryKey>SmartTox</CategoryKey>
          </CategoryInfo>
        </Data>
    </ListThingTemplatesResponse>