更新文档
This commit is contained in:
parent
aaa9ba6283
commit
fdaaa5ad99
@ -1,3 +1,7 @@
|
||||
- [首页](/)
|
||||
- [API说明](api/)
|
||||
- [系统管理接口](api/systemmgr.md)
|
||||
- [设备管理接口](api/equipment.md)
|
||||
- [节点管理接口](api/node.md)
|
||||
- [数据访问接口](api/data.md)
|
||||
- [数据采集](datacollect/)
|
@ -1,4 +1 @@
|
||||
* [返回首页](/)
|
||||
* [设备模块](equipment.md)
|
||||
* [节点模块](node.md)
|
||||
* [系统管理模块](systemmgr.md)
|
54
docs/api/data.md
Normal file
54
docs/api/data.md
Normal file
@ -0,0 +1,54 @@
|
||||
# 数据访问接口
|
||||
|
||||
## API接口一览表
|
||||
|
||||
| 接口分类 | 接口描述 | API接口 | 权限 |
|
||||
|--------|-------------|------------------------------| ---------------------------- |
|
||||
| 数据查询 | 实时数据查询 | /api/data/snapshot | |
|
||||
| | 历史区间数据查询 | /api/data/history | |
|
||||
| | 历史断面数据查询 | /api/data/history/snapshot | |
|
||||
|
||||
|
||||
### 数据查询接口
|
||||
|
||||
#### 实时数据查询
|
||||
|
||||
POST 请求接口
|
||||
|
||||
> /api/data/snapshot
|
||||
|
||||
请求参数
|
||||
|
||||
|
||||
```json
|
||||
{
|
||||
"deviceId":"129476828342323",
|
||||
"attributes":["power","windSpeed","dailyUsageHours","monthlyUsageHours"]
|
||||
}
|
||||
```
|
||||
入参描述
|
||||
|
||||
| 参数名 | 参数类型 | 可选 | 描述 |
|
||||
| ------------ | -------- | ---- |------|
|
||||
| deviceId | String | no | 设备ID |
|
||||
| attributes | StringArray | no | 要查询实时数据的设备属性列表 |
|
||||
|
||||
返回报文
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "操作成功",
|
||||
"success": true,
|
||||
"data": {
|
||||
"power": 56.2,
|
||||
"windSpeed": 45.3,
|
||||
"dailyUsageHours": 20,
|
||||
"monthlyUsageHours": 78,
|
||||
....
|
||||
}
|
||||
}
|
||||
```
|
||||
返参描述
|
||||
|
||||
data 中以字典的方式,返回查询的属性的实时值。
|
Loading…
Reference in New Issue
Block a user