# 功能详情
获取未来预计诱虫量
# 请求地址和方法
- 请求地址
https://www.sdzhiot.top/api/v3/pestStation/prediction
- 请求方法
GET
# 参数说明
- 请求头
Content-Type:application/json;charset=UTF-8
- 请求参数
| 字段名 | 字段类型 | 字段说明 | 是否必须 |
|---|---|---|---|
| sno | String | 设备号 | Y |
# 样例输入
{
"sno": "B7A3814EC12B"
}
# 返回data字段说明
| 字段名 | 字段类型 | 字段说明 |
|---|---|---|
| msg | String | 成功或失败的提示信息 |
| code | Integer | 成功200,其余为失败 |
| data | Object | 返回数据 |
其中data数组中对象的数据结构说明如下
| 字段名 | 字段类型 | 字段说明 |
|---|---|---|
| sno | String | 设备号 |
| predict30DaysTotal | Integer | 当前日志识别昆虫总数 |
| predict60DaysTotal | String | 日志原图 |
| imgThumb | String | 日志缩略图 |
| handledImg | String | 智能识别之后的原图(如果未识别出则为空) |
| handledImgThumb | String | 智能识别之后的缩略图(如果未识别出则为空) |
| predictDate | Date | 日志采集时间 |
| items | List | 识别出的昆虫统计信息 |
# 样例输出
{
"code": 0,
"data": {
"sno": "480D2FC9E4A3",
"predict30DaysTotal": 20,
"predict60DaysTotal": 65,
"predictDate": 1768199444008
},
"msg": "操作成功"
}
# 返回码
| 返回码 | 返回消息 | 说明 |
|---|---|---|
| 0 | 操作成功 | 请求成功 |
| 500 | 服务器错误 | 服务端异常 |
| 10001 | 参数为空或格式不正确 | 参数错误 |
| 10002 | appKey不存在 | 确认appKey是否正确 |
| 40001 | 设备不存在或您没有当前设备权限 | 设备不属于当前账户 |