文档中心 > API类目 > 智慧园区API

alibaba.campus.device.openapi.gettemplatelist (查询设备模板)

查询设备模板信息

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
query TemplateApiQuery 可选 设备模板查询对象
  • └ limit
  • Number
  • 可选
  • 20
  • 分页大小,限制limit<=500
  • └ code
  • String
  • 可选
  • Air_Conditioning_Panel
  • 设备模板编码
  • └ current_page
  • Number
  • 可选
  • 1
  • 当前页
  • └ key
  • String
  • 可选
  • Air
  • 模糊查询模板编码或名称
  • └ name
  • String
  • 可选
  • 控温面板
  • 设备模板名称

响应参数

名称 类型 示例值 描述
result PageResult [] 返回结果
  • content
  • Page
  • []
  • 设备模板集合
  • └ total
  • Number
  • 500
  • 总记录数
  • └ limit
  • Number
  • 20
  • 分页大小
  • results
  • TemplateApiDto []
  • []
  • 模板集合
  • └ id
  • Number
  • 283
  • 模板id
  • └ code
  • String
  • Air_Conditioning_Panel
  • 模板编码
  • └ name
  • String
  • 控温面板
  • 模板名称
  • property_list
  • PropertyApiDto []
  • []
  • 参数点集合
  • └ id
  • Number
  • 12476
  • 参数点id
  • └ name
  • String
  • 温度设定
  • 参数点名称
  • └ code
  • String
  • Temperature_config
  • 参数点编码
  • └ type
  • Number
  • 10400
  • 参数点类型id
  • └ type_name
  • String
  • 执行类
  • 参数点类型名称
  • └ alarm
  • Boolean
  • false
  • 是否报警类参数
  • └ value_type
  • Number
  • 20200
  • 值类型id
  • └ value_type_name
  • String
  • 数字型
  • 值类型名称
  • └ property_kind
  • Number
  • 31300
  • 元数据id
  • └ property_kind_code
  • String
  • temperature
  • 元数据编码
  • └ control_enum_value
  • String
  • null
  • 控制类参数枚举值
  • └ unit_id
  • Number
  • null
  • 单位id
  • └ unit_code
  • String
  • null
  • 单位编码
  • └ current_page
  • Number
  • 1
  • 当前页
  • └ request_id
  • String
  • null
  • 请求id
  • └ error_code
  • String
  • 200
  • 错误码
  • └ error_msg
  • String
  • null
  • 错误信息
  • └ success
  • Boolean
  • true
  • 是否成功

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaCampusDeviceOpenapiGettemplatelistRequest req = new AlibabaCampusDeviceOpenapiGettemplatelistRequest();
AlibabaCampusDeviceOpenapiGettemplatelistRequest.TemplateApiQuery obj1 = new AlibabaCampusDeviceOpenapiGettemplatelistRequest.TemplateApiQuery();
obj1.setLimit(20L);
obj1.setCode("Air_Conditioning_Panel");
obj1.setCurrentPage(1L);
obj1.setKey("Air");
obj1.setName("控温面板");
req.setQuery(obj1);
AlibabaCampusDeviceOpenapiGettemplatelistResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_campus_device_openapi_gettemplatelist_response>
    <result>
        <content>
            <total>500</total>
            <limit>20</limit>
            <results>
                <template_api_dto>
                    <id>283</id>
                    <code>Air_Conditioning_Panel</code>
                    <name>控温面板</name>
                    <property_list>
                        <property_api_dto>
                            <id>12476</id>
                            <name>温度设定</name>
                            <code>Temperature_config</code>
                            <type>10400</type>
                            <type_name>执行类</type_name>
                            <alarm>false</alarm>
                            <value_type>20200</value_type>
                            <value_type_name>数字型</value_type_name>
                            <property_kind>31300</property_kind>
                            <property_kind_code>temperature</property_kind_code>
                            <control_enum_value>null</control_enum_value>
                            <unit_id>null</unit_id>
                            <unit_code>null</unit_code>
                        </property_api_dto>
                    </property_list>
                </template_api_dto>
            </results>
            <current_page>1</current_page>
        </content>
        <request_id>null</request_id>
        <error_code>200</error_code>
        <error_msg>null</error_msg>
        <success>true</success>
    </result>
</alibaba_campus_device_openapi_gettemplatelist_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部