Difference between revisions of "土壤温湿度接口"

From Caiyun Wiki
Jump to: navigation, search
(返回结构)
(返回结构)
 
Line 17: Line 17:
 
<syntaxhighlight lang="json" line="1">
 
<syntaxhighlight lang="json" line="1">
 
{
 
{
   "status":"ok",
+
   "status": "ok",
   "result":[
+
   "result": {
    {
+
    "soil": [
      "depth":"0-0.1",
+
      {
      "tsoil":-4.649993896484375,
+
        "depth": "0-0.1",
      "soliw":0.287109375
+
        "tsoil": 3.100006103515625,
    },
+
        "soliw": 0.1529541015625
    {
+
      },
      "depth":"0.1-0.4",
+
      {
      "tsoil":-2.649993896484375,
+
        "depth": "0.1-0.4",
      "soliw":0.256103515625
+
        "tsoil": 4.850006103515625,
 +
        "soliw": 0.237060546875
 +
      }
 +
    ],
 +
    "meta": {
 +
      "updated_at": 1640248183,  // 数据更新时间
 +
      "datatime": 1640246400    // 数据批次时间
 
     }
 
     }
   ]
+
   }
 
}
 
}
 
</syntaxhighlight>
 
</syntaxhighlight>

Latest revision as of 09:04, 23 December 2021

本接口施工中

授权与认证

请先至彩云开放平台注册,注册后可以获得 token 。

使用本接口,开发者token需要额外开通权限,请联系商务:api@caiyunapp.com

API 地址

http://api.caiyunapp.com/v1/soil?token=TOKEN&lng=116&lat=39

参数说明

目前仅支持中国区域实况数据,逐小时更新

返回结构

 1 {
 2   "status": "ok",
 3   "result": {
 4     "soil": [
 5       {
 6         "depth": "0-0.1",
 7         "tsoil": 3.100006103515625,
 8         "soliw": 0.1529541015625
 9       },
10       {
11         "depth": "0.1-0.4",
12         "tsoil": 4.850006103515625,
13         "soliw": 0.237060546875
14       }
15     ],
16     "meta": {
17       "updated_at": 1640248183,  // 数据更新时间
18       "datatime": 1640246400     // 数据批次时间
19     }
20   }
21 }