# 获取产品的设备数据流列表

# API

获取产品的设备数据流列表

请求路径 Request
GET /devices/{productKey}/deviceData DeviceDataStreamByProductKeyRequest

# 授权

当前API可使用授权类型与具体的授权参数请参考下表(多个授权类型可任选一个)。了解更多请查看平台鉴权

授权类型 授权参数 封装授权参数(调用HanCloudsClient提供的方法来封装)
用户 userKey / authKey / authSecret putUserAuthParams()方法
产品 productKey / queryKey / querySecret putProductAuthParams()方法
项目 projectKey / projectAuthKey / projectAuthSecret putProjectAuthParams()方法

# 路径参数

参数名 类型 是否必须 说明
productKey String 产品唯一Key

# Query参数

参数名 类型 是否必须 说明
dataName String 数据流标识
order String 升序:asc ,降序:desc 默认降序
startTime Long 开始时间,精确到毫秒或者纳秒,不填则默认毫秒从一个月之前开始
endTime Long 截止时间,精确到毫秒或者纳秒,不填则默认毫秒为当前时间
limit Integer 条数,默认20,最大1000
timeUnit String 时间精确单位,毫秒:ms,纳秒:ns,默认毫秒

# Body参数

# 返回示例

{
  "response": [
    {
      "deviceKey": "8f62bce22f21457d8e3ecfcafe62348e",
      "userKey": "kmuFASBJ",
      "productKey": "WjwmU5zO",
      "time":1525915669027,
      "stream":"stream1",
      "type":2,
      "data":100
    },
    {
      "deviceKey": "824d5521a77c4644b5e219dc5321e138",
      "userKey": "kmuFASBJ",
      "productKey": "WjwmU5zO",
      "time":1525915679027,
      "stream":"stream2",
      "type":3,
      "data":"stream2"
    }
  ],
  "succeed": true
}

具体可查看Data