Appearance
Query Device Historical Uplink/Downlink Data Logs
API Address:/v2/quecdatastorage/r1/openapi/device/data/history
Request Method:GET
Request Data Type:application/x-www-form-urlencoded
Response Data Type:*/*
API Description: Device historical uplink/downlink information query
Request Parameters:
Parameter Name | Parameter Description | Request Type | Required | Data Type | Schema |
---|---|---|---|---|---|
deviceKey | Device Key. If deviceKey is provided, productKey must also be provided. The combination of productKey and deviceKey corresponds one-to-one with deviceId. If productKey and deviceKey combination is provided, deviceId is not needed. If you provide both deviceId and the productKey/deviceKey combination, deviceId takes precedence | query | true | string | |
productKey | Product Key. If productKey is provided, deviceKey must also be provided. The combination of productKey and deviceKey corresponds one-to-one with deviceId. If productKey and deviceKey combination is provided, deviceId is not needed. If you provide both deviceId and the productKey/deviceKey combination, deviceId takes precedence | query | true | string | |
beginDateTimp | Start time (timestamp, in milliseconds) | query | false | integer(int64) | |
deviceId | Device ID, corresponds one-to-one with the productKey and deviceKey combination. If deviceId is provided, productKey and deviceKey combination is not needed. If you provide both deviceId and the productKey/deviceKey combination, deviceId takes precedence | query | false | integer(int64) | |
direction | Data type: 1 - UP (uplink), 2 - DOWN (downlink) | query | false | integer(int32) | |
endDateTimp | End time (timestamp, in milliseconds) | query | false | integer(int64) | |
language | Language: CN/EN (default: CN) | query | false | string | |
pageNum | Page number (default: 1) | query | false | integer(int32) | |
pageSize | Page size, number of items per page (default: 10) | query | false | integer(int32) | |
sendStatus | Send status: 0 - Not sent; 1 - Sent; -1 - Send failed | query | false | integer(int32) |
Response Status:
Status Code | Description | Schema |
---|---|---|
200 | OK | ActionResult«List«DeviceData»» |
50000 | Service exception | |
50005 | Parameter check error | |
50007 | The deviceID, productKey or deviceKey is empty | |
70000 | Hub service unavailable | |
70089 | You have limited permission to operate this project or product or device | |
70130 | Non-existent device | |
91001 | Token does not exist | |
91004 | Token incorrect | |
91005 | Doesn't have permission | |
91006 | User not in IP white list | |
91007 | Please enable API permission |
Response Parameters:
Parameter Name | Parameter Description | Type | Schema |
---|---|---|---|
code | Return code | object | |
data | Object | array | DeviceData |
createTime | Creation time | string(date-time) | |
data | Base64 data | string | |
dataType | Data type | string | |
deviceId | Device ID | integer(int64) | |
deviceKey | Device key | string | |
direction | Data type: 1 - UP (uplink), 2 - DOWN (downlink) | integer(int32) | |
dmData | Saved thing model data JSON | string | |
extData | Extended information | object | |
id | ID | string | |
msgType | Message type | string | |
productId | Product ID | integer(int64) | |
productKey | Product key | string | |
sendStatus | Send status: 0 - Not sent; 1 - Sent; -1 - Send failed | integer(int32) | |
sendTime | Send time | string(date-time) | |
sourceType | Type | string | |
ticket | Unique data value | string | |
updateTime | Modification time | string(date-time) | |
exp1 | string | ||
msg | Prompt message | object | |
pageNum | Current page number | object | |
pageSize | Items per page | object | |
pages | Total pages | object | |
total | Total count | object |
Response Example:
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": {}
}