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

alibaba.campus.device.getdeviceforcampus (根据园区获取设备)

根据园区获取设备

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
campus_id Number 必须 1 园区id

响应参数

名称 类型 示例值 描述
result TransDto result
  • └ source
  • String
  • ib-cloud
  • source
  • └ trans_id
  • String
  • 111234
  • transId
  • └ datas
  • String []
  • [{"a":11}]
  • data
  • └ msg_type
  • String
  • device_download
  • msgType
  • └ event_time
  • Number
  • 1223124
  • eventTime
  • └ action_type
  • String
  • add
  • actionType
  • └ version
  • String
  • 1.0.0
  • version

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaCampusDeviceGetdeviceforcampusRequest req = new AlibabaCampusDeviceGetdeviceforcampusRequest();
req.setCampusId(1L);
AlibabaCampusDeviceGetdeviceforcampusResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_campus_device_getdeviceforcampus_response>
    <result>
        <source>ib-cloud</source>
        <trans_id>111234</trans_id>
        <datas>
            <string>[{&quot;a&quot;:11}]</string>
        </datas>
        <msg_type>device_download</msg_type>
        <event_time>1223124</event_time>
        <action_type>add</action_type>
        <version>1.0.0</version>
    </result>
</alibaba_campus_device_getdeviceforcampus_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

返回
顶部