根据过滤器查询 时序数据数据
POST
/core/data/queryquery参数格式
json样例:
[{"fields":["MEAN("tagid3") as XXX","MEAN("tagid4") as YYY"],"id":"adg","tableId":"5f4db17d95b6b5c728dfadd3","where":["time >= '2024-01-05T08:44:00.000Z'", "time <= '2024-01-05T08:44:59.000Z'"],"group":["time(5m)"],"deartment":{"部门表ID": ["部门表记录ID"]},"fill":"0","order":"time asc","limit":5,"offset":0}]
json字段说明:
[
{
"fields": [ //fields数组中可以使用MEAN,SUM,COUNT,MIN,MAX等函数进行聚合,可以使用as设置别名,查询字段两侧需要添加双引号
"MEAN("tagid3") as XXX",
"MEAN("tagid4") as YYY"
],
"id": "adg", //要查看的数据点所属设备的设备编号
"tableId":"5f4db17d95b6b5c728dfadd3", //要查看的数据点所属数据表的ID
"where": [ //时间范围
"time >= '2024-01-05T08:44:00.000Z'",
"time <= '2024-01-05T08:44:59.000Z'"
],
"deartment":{"部门表ID": ["部门表记录ID"]}, //要筛选的部门ID
"group": [ //group可以用来进行分组,每五分钟一组值为time(5),按设备分组值为id
"time(5m)"
],
"fill": "0", //fill字段可以传入指定数值的字符串,如"0",即为为空的数值补零;fill还可传入"linear",即自动对缺少的数据进行补充,可以形成完整的曲线
"order": "time asc", order字段对返回结果进行时间排序: 升序"time asc", 降序"time desc"
"limit": 5, //limit和offset可以用来进行分页
"offset": 0
}
]
请求参数
项目ID, 默认default