根据属性查询设备事件

GET /api/devices/{deviceId}/attributeCode

URL参数

参数名 类型 必填 描述 限制
deviceId string 设备唯一标识符
attributeCode string 属性编码
pageSize int 每页事件数,默认100
pageNo int 返回第几页(第一页为1)
startDate Date 事件日期起,格式为:2019-11-14T16%3A25%3A00.000%2B0800,默认一天前
endDate Date 事件日期止,格式为:2019-11-14T16%3A25%3A00.000%2B0800,默认当前时刻

请求样例

GET /api/devices/146b3c23-55c7-4f24-bcb1-2c46cbae8370/attributeCode?attributeCode=atmosphere&pageSize=2&pageNo=1 HTTP/1.1
Host: zl.glodon.com
Authorization: Bearer xxx.xxxx.xxx
Cache-Control: no-cache

响应样例

{
  "returnCode": 0,
  "result": {
    "totalResults": 172,
    "numResults": 2,
    "pageSize": 2,
    "pageNo": 1,
    "results": [
      {
        "createdTime": 1573800684000,
        "id": "146b3c23-55c7-4f24-bcb1-2c46cbae8370@#atmosphere@#1573800684000",
        "tenantId": "b0d9addd-4221-4a7e-a49f-4615891d533f",
        "projectId": "e97e3c0e-1e17-4c61-9ef0-359eaea97de9",
        "modelId": "606840d4-a625-42ce-9885-3b43402aeb16",
        "deviceId": "146b3c23-55c7-4f24-bcb1-2c46cbae8370",
        "attributeCode": "atmosphere",
        "attributeType": "Float",
        "attributeData": 1,
        "channel": "m",
        "ingressTimeStamp": 1573800684000,
        "deviceTimestamp": 1573800684000,
        "correlationId": "",
        "deleted": false
      },
      {
        "createdTime": 1573800689000,
        "id": "146b3c23-55c7-4f24-bcb1-2c46cbae8370@#atmosphere@#1573800689000",
        "tenantId": "b0d9addd-4221-4a7e-a49f-4615891d533f",
        "projectId": "e97e3c0e-1e17-4c61-9ef0-359eaea97de9",
        "modelId": "606840d4-a625-42ce-9885-3b43402aeb16",
        "deviceId": "146b3c23-55c7-4f24-bcb1-2c46cbae8370",
        "attributeCode": "atmosphere",
        "attributeType": "Float",
        "attributeData": 1,
        "channel": "m",
        "ingressTimeStamp": 1573800689000,
        "deviceTimestamp": 1573800689000,
        "correlationId": "",
        "deleted": false
      }
    ]
  }
}