Skip to content

预测降雨量

获取指定设备的预测降雨量。
降雨量预测频率半小时生成一次未来 3 小时的预测雨量数据(3 小时的数据分为每 15 分钟一条数据,总共 12 条)

请求方式POST
请求地址https://data-api.accurain.cn/api/v1/device/predict
请求参数

请求参数

参数名参数类型描述
deviceString设备标识

演示使用

curl 请求示例

bash
curl -X POST \
  'https://data-api.accurain.cn/api/v1/device/predict' \
  --header 'Content-Type: application/json' \
  --header 'token: 2df19068de7a998a95905121460bbc31' \
  --data-raw '{"device":"b21"}'

python 代码示例

python
import requests
import json

reqUrl = "https://data-api.accurain.cn/api/v1/device/predict"

headersList = {
 "Content-Type": "application/json",
 "token": "2df19068de7a998a95905121460bbc31" 
}

payload = json.dumps({"device":"b21"})

response = requests.request("POST", reqUrl, data=payload,  headers=headersList)

print(response.text)

响应示例

json
{
  "code": 0,
  "msg": "success",
  "data": [
    {
      "device": "b21",  // 设备标识
      "time": 1734318084007,  // 数据生成时间戳 单位:毫秒(ms)  同批次时间戳相同
      "predict_rainfall": "0.000",  // 预测降雨量 单位:毫米(mm)
      "predict_time": 1734318900000  // 预测时间戳 单位:毫秒(ms)
    },
    {
      "device": "b21",
      "time": 1734318084007,
      "predict_rainfall": "0.000",
      "predict_time": 1734320700000
    },
    ......此处省略9条数据......
    {
      "device": "b21",
      "time": 1734318084007,
      "predict_rainfall": "0.000",
      "predict_time": 1734328800000
    }
  ]
}

响应参数说明

参数名示例值参数类型描述
deviceb21String设备标识
time1734318084007Number数据生成时间戳 单位:毫秒(ms)
predict_rainfall0.000String预测降雨量 单位:毫米(mm)
predict_time1734318900000Number预测时间戳 单位:毫秒(ms)

Copyright © 2024 武汉测度未来科技有限公司