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

alibaba.campus.device.openapi.getdeviceforquery (查询设备详细信息列表)

查询设备详细信息(带协议)

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
work_bench_context WorkBenchContext 可选 运行环境上下文
  • └ company_id
  • Number
  • 可选
  • 10000
  • 公司id
  • └ system_id
  • String
  • 可选
  • 111111111
  • 系统id
  • └ campus_code
  • String
  • 可选
  • 111111
  • 园区编码
  • └ campus_id
  • Number
  • 可选
  • 10000
  • 园区id
  • └ language
  • String
  • 可选
  • en
  • 语言
  • └ app_code
  • String
  • 可选
  • 1234
  • 应用编码
  • └ user_name
  • String
  • 可选
  • zy
  • 用户名称
  • └ user_id
  • Number
  • 可选
  • 1111334455
  • 用户id
query DeviceApiQuery 可选 查询条件
  • └ code
  • String
  • 可选
  • 测试
  • 设备编号
  • └ campus_id_list
  • Number []
  • 可选
  • 设备园区id列表
  • └ template_code
  • String
  • 可选
  • Face
  • 设备模板code
  • └ uuid_list
  • String []
  • 可选
  • ["uuid","uuid2"]
  • 设备uuid列表
  • └ floor_id
  • Number
  • 可选
  • 1
  • 设备楼层id
  • └ building_id_list
  • Number []
  • 可选
  • 设备楼宇id列表
  • └ space_id
  • Number
  • 可选
  • 1
  • 设备空间id
  • └ space_id_list
  • Number []
  • 可选
  • 设备空间id列表
  • └ limit
  • Number
  • 可选
  • 10
  • 查询条件limit
  • └ be_run
  • Boolean
  • 可选
  • true
  • 设备启用状态
  • └ key
  • String
  • 可选
  • 测试
  • 设备模糊搜索
  • └ run_status
  • Number
  • 可选
  • 1
  • 设备运行状态
  • └ floor_id_list
  • Number []
  • 可选
  • [1,2]
  • 设备楼层id列表
  • └ template_code_list
  • String []
  • 可选
  • ["Face","Face2"]
  • 设备模板code 列表
  • └ campus_id
  • Number
  • 可选
  • 10000
  • 园区id
  • └ tag_name
  • String
  • 可选
  • aaa
  • 标签名称
  • └ building_id
  • Number
  • 可选
  • 10001
  • 楼宇id
  • └ company_id
  • Number
  • 可选
  • 10000
  • 公司id
  • └ name_or_code
  • String
  • 可选
  • aaaa
  • 模糊搜索
  • └ current_page
  • Number
  • 可选
  • 1
  • 查询条件当前页

响应参数

名称 类型 示例值 描述
result PageResult 返回结果
  • └ success
  • Boolean
  • true
  • 成功结果
  • └ request_id
  • String
  • 11121111aaa
  • 请求id
  • └ error_code
  • String
  • 400
  • 错误编码
  • └ error_ext_info
  • String
  • 扩展信息
  • content
  • Page
  • 分页结果
  • result
  • DeviceStandardApiDto []
  • 返回结果类
  • └ code
  • String
  • jsfgjshgj
  • 设备编号
  • └ company_id
  • Number
  • 10000
  • 公司id
  • └ campus_id
  • Number
  • 10001
  • 园区id
  • └ uuid
  • String
  • afafafadad
  • 设备uuid
  • app_protocol
  • DeviceConnectConfigApiDTO
  • 111
  • 协议信息
  • └ param
  • Json
  • 11
  • 协议字段
  • └ total
  • String
  • 12
  • 总数
  • └ total_page
  • String
  • 2
  • 总页数
  • └ limit
  • String
  • 10
  • 限制
  • └ page_size
  • Number
  • 10
  • 页码数
  • └ total_count
  • Number
  • 12
  • 总数
  • └ current_page
  • Number
  • 1
  • 当前页数
  • └ error_msg
  • String
  • aaa
  • 错误信息
  • └ error_level
  • String
  • aaa
  • 错误级别

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaCampusDeviceOpenapiGetdeviceforqueryRequest req = new AlibabaCampusDeviceOpenapiGetdeviceforqueryRequest();
AlibabaCampusDeviceOpenapiGetdeviceforqueryRequest.WorkBenchContext obj1 = new AlibabaCampusDeviceOpenapiGetdeviceforqueryRequest.WorkBenchContext();
obj1.setCompanyId(10000L);
obj1.setSystemId("111111111");
obj1.setCampusCode("111111");
obj1.setCampusId(10000L);
obj1.setLanguage("en");
obj1.setAppCode("1234");
obj1.setUserName("zy");
obj1.setUserId(1111334455L);
req.setWorkBenchContext(obj1);
AlibabaCampusDeviceOpenapiGetdeviceforqueryRequest.DeviceApiQuery obj2 = new AlibabaCampusDeviceOpenapiGetdeviceforqueryRequest.DeviceApiQuery();
obj2.setCode("测试");
obj2.setCampusIdList(new Long[] {  };
);
obj2.setTemplateCode("Face");
obj2.setUuidList(""uuid","uuid2"");
obj2.setFloorId(1L);
obj2.setBuildingIdList(new Long[] {  };
);
obj2.setSpaceId(1L);
obj2.setSpaceIdList(new Long[] {  };
);
obj2.setLimit(10L);
obj2.setBeRun(true);
obj2.setKey("测试");
obj2.setRunStatus(1L);
obj2.setFloorIdList(new Long[] { 1,2 };
);
obj2.setTemplateCodeList(""Face","Face2"");
obj2.setCampusId(10000L);
obj2.setTagName("aaa");
obj2.setBuildingId(10001L);
obj2.setCompanyId(10000L);
obj2.setNameOrCode("aaaa");
obj2.setCurrentPage(1L);
req.setQuery(obj2);
AlibabaCampusDeviceOpenapiGetdeviceforqueryResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_campus_device_openapi_getdeviceforquery_response>
    <result>
        <success>true</success>
        <request_id>11121111aaa</request_id>
        <error_code>400</error_code>
        <content>
            <result>
                <device_standard_api_dto>
                    <code>jsfgjshgj</code>
                    <company_id>10000</company_id>
                    <campus_id>10001</campus_id>
                    <uuid>afafafadad</uuid>
                    <app_protocol>
                        <param>11</param>
                    </app_protocol>
                </device_standard_api_dto>
            </result>
            <total>12</total>
            <total_page>2</total_page>
            <limit>10</limit>
            <page_size>10</page_size>
            <total_count>12</total_count>
            <current_page>1</current_page>
        </content>
        <error_msg>aaa</error_msg>
        <error_level>aaa</error_level>
    </result>
</alibaba_campus_device_openapi_getdeviceforquery_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

返回
顶部