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

alibaba.campus.device.openapi.getdevicerealtimelog (根据设备uuid获取设备采集信息)

根据设备uuid获取设备采集信息

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
work_bench_context WorkBenchContext 必须 请求发送端信息
  • └ company_id
  • Number
  • 可选
  • 10000
  • 所属公司
  • └ campus_id
  • Number
  • 必须
  • 100001
  • 所属园区Id
uuid String 必须 73214648-8474-4063-be58-ff46be43a5e7 设备uuid

响应参数

名称 类型 示例值 描述
result PojoResult 返回对象
  • content
  • RunTimeDataDto
  • 设备实时参数信息
  • └ device_id
  • String
  • 73214648-8474-4063-be58-ff46be43a5e7
  • 设备id
  • └ event_time
  • Number
  • 1509606457078
  • 事件时间
  • └ msg_id
  • String
  • null
  • 消息id
  • run_time_datas
  • RunDataDto []
  • runTimeData
  • └ property_code
  • String
  • screen_control
  • 参数编码
  • └ property_name
  • String
  • 屏幕内容设置
  • 参数名称
  • └ value
  • String
  • 屏幕内容
  • 实时参数值
  • └ property_kind
  • Number
  • 30600
  • 参数在数据字典所属分类,如30600代表character
  • └ unit_code
  • String
  • KA
  • unitCode
  • └ ref_device_id
  • String
  • d360dcc2-c443-11e7-9a06-024210058642
  • 被关联物理设备编码
  • └ ref_property_code
  • String
  • lightSwitchStatus
  • 被关联参数点编码
  • └ be_logic
  • Boolean
  • true
  • 是否是逻辑设备
  • └ 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);
AlibabaCampusDeviceOpenapiGetdevicerealtimelogRequest req = new AlibabaCampusDeviceOpenapiGetdevicerealtimelogRequest();
AlibabaCampusDeviceOpenapiGetdevicerealtimelogRequest.WorkBenchContext obj1 = new AlibabaCampusDeviceOpenapiGetdevicerealtimelogRequest.WorkBenchContext();
obj1.setCompanyId(10000L);
obj1.setCampusId(100001L);
req.setWorkBenchContext(obj1);
req.setUuid("73214648-8474-4063-be58-ff46be43a5e7");
AlibabaCampusDeviceOpenapiGetdevicerealtimelogResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_campus_device_openapi_getdevicerealtimelog_response>
    <result>
        <content>
            <device_id>73214648-8474-4063-be58-ff46be43a5e7</device_id>
            <event_time>1509606457078</event_time>
            <msg_id>null</msg_id>
            <run_time_datas>
                <run_data_dto>
                    <property_code>screen_control</property_code>
                    <property_name>屏幕内容设置</property_name>
                    <value>屏幕内容</value>
                    <property_kind>30600</property_kind>
                    <unit_code>KA</unit_code>
                    <ref_device_id>d360dcc2-c443-11e7-9a06-024210058642</ref_device_id>
                    <ref_property_code>lightSwitchStatus</ref_property_code>
                </run_data_dto>
            </run_time_datas>
            <be_logic>true</be_logic>
        </content>
        <request_id>null</request_id>
        <error_code>200</error_code>
        <error_msg>null</error_msg>
        <success>true</success>
    </result>
</alibaba_campus_device_openapi_getdevicerealtimelog_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

返回
顶部