[TOC]
简要描述
请求URL
http://xgkj.hljnyxx.com/dongnongBackend/index.php//Home/Station/getChartData
请求方式
参数
参数名 |
必选 |
说明 |
terminal_id |
是 |
采集器 ID |
start_time |
是 |
开始时间 |
end_time |
是 |
结束时间 |
device_id |
否 |
设备号 |
device_name |
否 |
设备名称 |
device_info |
否 |
设备所有信息 |
请求示例
{
"terminal_id":"16006881",
"start_time":"2023-05-06 0:0:0",
"end_time":"2023-06-08 0:0:0",
"device_info":[
{ "device_id": "560419", "device_name": "土壤温度01"},
{ "device_id": "560248", "device_name": "土壤水分01"}
]
}
返回示例
{
"code": 0,
"msg": "查询成功",
"data": {
"legend": [
"土壤温度01",
"土壤水分01"
],
"xAxis": [
"2023-05-29 15:00:00",
"2023-05-29 15:00:00",
"2023-05-29 15:00:00",
"2023-05-29 15:00:00",
"2023-05-29 15:00:00",
"2023-05-29 16:00:00",
"2023-05-29 16:00:00",
"2023-05-29 16:00:00",
"2023-05-30 17:00:00",
"2023-05-30 17:00:00"
],
"series": [
{
"name": "土壤温度01",
"data": [
31.1,
31.1,
31.1,
31.1,
31.1,
31.9,
31.9,
31.9,
32.9,
32.9
]
},
{
"name": "土壤水分01",
"data": [
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-"
]
}
]
}
}
}
返回参数说明
参数名 |
说明 |
legend |
导航数据 |
xAxis |
横坐标 |
series |
纵坐标 |
备注
- 请求参数 (device_id 和 device_name) 或 (device_info)有值,分别表示选择一个传感器和选择所有传感器
- 上述参数的取值信息来自温室-历史数据接口里面的 func 字段