指标历史数值查询(带导出)
本地
本地
GET
http://127.0.0.1:9999/api/v1/telemetry/datas/history/pagination
遥测数据
不送分页支持全部返回,该接口不反回消息总数,只能上一页下一页操作
请求参数
Query 参数
device_id
string
必需
end_time
integer
必需
示例值:
1711656000000
export_excel
string
可选
key
string
必需
start_time
integer
必需
示例值:
1742780418369
page
string
可选
page_size
string
可选
Header 参 数
x-token
string
可选
默认值:
{{x-token}}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'http://127.0.0.1:9999/api/v1/telemetry/datas/history/pagination?device_id=&end_time=1711656000000&export_excel=&key=&start_time=1742780418369&page&page_size' \
--header 'x-token: {{x-token}}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
data
array [object {3}]
必需
key
string
必需
ts
string
必需
value
number
必需
示例
{
"code": 200,
"message": "Get history data successfully",
"data": [
{
"key": "temp6",
"ts": "2024-03-13T00:21:38.664746Z",
"value": 25.933
},
{
"key": "temp6",
"ts": "2024-03-13T00:21:39.064046Z",
"value": 25.933
},
{
"key": "temp6",
"ts": "2024-03-13T00:21:39.302669Z",
"value": 25.933
},
{
"key": "temp6",
"ts": "2024-03-13T00:21:39.722916Z",
"value": 25.933
},
{
"key": "temp6",
"ts": "2024-03-13T00:28:10.533822Z",
"value": 25.933
},
{
"key": "temp6",
"ts": "2024-03-13T00:28:10.840879Z",
"value": 25.933
},
{
"key": "temp6",
"ts": "2024-03-13T00:28:11.039675Z",
"value": 25.933
}
]
}
修改于 2025-03-25 01:55:07