POST [Host Server]/api/v1/data/historyDatas
| Path | [Host Server]/api/v1/data/historyDatas |
|---|---|
| Summary | 获取历史数据 |
| Description | 获取BOX的历史数据 |
| Consumes | application/json |
Parameters
| Name | Description | Parameter Type | Data Type | Default | Required |
|---|---|---|---|---|---|
| token | 1.请求令牌 | json | string | yes | |
| variantIds | 变量列表,结构为[boxId:variantId,…] | json | stringList | yes | |
| startTime | 开始时间戳(单位ms),不填默认获取当天数据 | json | long | ||
| endTime | 结束时间戳(单位ms),不填默认获取当天数据 | json | long |
请求参数示例:
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50Ijoic3VtbWVyIiwiZXhwIjoxNzU3NzQxNzUzLCJpc3MiOiJzY2lvdF9jbG91ZCIsIm5iZiI6MTc1NzEzNjg1M30.3hRRKZIZWZ8s14NQSQZeyfnHT4alEIbNxbFWpigb0eU",
"startTime":0,
"endTime":0,
"variantIds":["6ab728135e53485e9e42bf5595da5bba:0","6ab728135e53485e9e42bf5595da5bba:1"]
}Responses JsonResult«DataVo» :
| Properties | Type | Description |
|---|---|---|
| code | integer | 状态码 |
| data | DataVo | 数据集,状态success为true时返回,否则为空 |
| msg | string | 返回消息 |
| success | boolean | 状态 |
DataVo:
| Properties | Type | Description |
|---|---|---|
| boxId:variantId | HistoryDataVo | 历史数据集 |
| isSample | stringList | 数据抽样查询描述 |
HistoryDataVo:
| Properties | Type | Description |
|---|---|---|
| 时间戳 | string | 变量值保存时间,单位ms |
| 变量值 | string | 变量值字符串 |
作者:霜蝉科技 创建时间:2025-09-01 11:24
最后编辑:霜蝉科技 更新时间:2025-09-08 13:42
最后编辑:霜蝉科技 更新时间:2025-09-08 13:42