Skip to content

查询设备历史上下行数据日志

接口地址:/v2/quecdatastorage/r1/openapi/device/data/history

请求方式:GET

请求数据类型:application/x-www-form-urlencoded

响应数据类型:*/*

接口描述:

设备历史上下行信息查询

请求参数:

参数名称参数说明请求类型是否必须数据类型schema
deviceKey设备Key,如果传入deviceKey,则必须传入productKey。productKey与deviceKey组合和deviceId一一对应。如果传入productKey与deviceKey组合,则无需传入deviceId。如果您同时传入deviceId和productKey与deviceKey组合,则以deviceId为准querytruestring
productKey产品productKey,如果传入productKey,则必须传入deviceKey。productKey与deviceKey组合和deviceId一一对应。如果传入productKey与deviceKey组合,则无需传入deviceId。如果您同时传入deviceId和productKey与deviceKey组合,则以deviceId为准querytruestring
beginDateTimp开始时间(时间戳,单位毫秒)queryfalseinteger(int64)
deviceId设备id,和productKey与deviceKey组合一一对应。如果传入deviceId,则无需传入productKey与deviceKey组合。如果您同时传入deviceId和productKey与deviceKey组合,则与deviceId为准queryfalseinteger(int64)
direction数据类型 1 UP上行 2 DOWN下行queryfalseinteger(int32)
endDateTimp结束时间(时间戳,单位毫秒)queryfalseinteger(int64)
language语言:CN/EN(默认:CN)queryfalsestring
pageNum分页码(默认:1)queryfalseinteger(int32)
pageSize分页,每页大小(默认:10)queryfalseinteger(int32)
sendStatus发送状态 0:未发送;1:已发送;-1:发送失败queryfalseinteger(int32)

响应状态:

状态码说明schema
200OKActionResult«List«DeviceData»»
50000service exception
50005param check error
50007The deviceID, productKey or deviceKey is empty.
70000Hub 服务不可用
70089You have limited permission to operate this project or product or device.
70130Non existent device.
91001token not exists
91004token incorrect
91005doesn't have permission
91006user not exist ip white list reference.
91007please open API permission.

响应参数:

参数名称参数说明类型schema
code返回码object
data对象arrayDeviceData
  createTime创建时间string(date-time)
  dataBase64数据string
  dataType数据类型string
  deviceId设备idinteger(int64)
  deviceKey设备keystring
  direction数据类型 1 UP上行 2 DOWN下行integer(int32)
  dmData保存物模型数据jsonstring
  extData拓展信息object
  ididstring
  msgType消息类型string
  productId产品idinteger(int64)
  productKey产品keystring
  sendStatus发送状态 0:未发送;1:已发送;-1:发送失败;integer(int32)
  sendTime发送时间string(date-time)
  sourceType类型string
  ticket数据唯一值string
  updateTime修改时间string(date-time)
exp1string
msg提示信息object
pageNum当前页数object
pageSize每页数量object
pages总页数object
total总数object

响应示例:

javascript
{
	"code": {},
	"data": [
		{
			"createTime": "",
			"data": "",
			"dataType": "",
			"deviceId": 0,
			"deviceKey": "",
			"direction": 0,
			"dmData": "",
			"extData": {},
			"id": "",
			"msgType": "",
			"productId": 0,
			"productKey": "",
			"sendStatus": 0,
			"sendTime": "",
			"sourceType": "",
			"ticket": "",
			"updateTime": ""
		}
	],
	"exp1": "",
	"msg": {},
	"pageNum": {},
	"pageSize": {},
	"pages": {},
	"total": {}
}