6.8 添加/编辑环境监控
<h4>请求地址</h4>
<ul>
<li>正式环境: <a href="https://www.lampmind.com/api/weather/save">https://www.lampmind.com/api/weather/save</a></li>
<li>测试环境: <a href="https://sd.solar-iot.com/api/weather/save">https://sd.solar-iot.com/api/weather/save</a></li>
</ul>
<h4>请求方法</h4>
<p><strong>POST</strong></p>
<h4>请求参数</h4>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>username</td>
<td>string</td>
<td>用户名</td>
<td>Y</td>
</tr>
<tr>
<td>client_key</td>
<td>string</td>
<td>设备唯一码(imei)</td>
<td>Y</td>
</tr>
<tr>
<td>token</td>
<td>string</td>
<td>鉴权口令</td>
<td>Y</td>
</tr>
<tr>
<td>id</td>
<td>int</td>
<td>监控id(有值:编辑,没值:添加)</td>
<td>N</td>
</tr>
<tr>
<td>number</td>
<td>string</td>
<td>监控编号</td>
<td>Y</td>
</tr>
<tr>
<td>areaId</td>
<td>int</td>
<td>市id</td>
<td>Y</td>
</tr>
<tr>
<td>sectionId</td>
<td>int</td>
<td>路段id</td>
<td>Y</td>
</tr>
<tr>
<td>sn</td>
<td>string</td>
<td>设备SN码</td>
<td>Y</td>
</tr>
<tr>
<td>longitude</td>
<td>string</td>
<td>经度</td>
<td>N</td>
</tr>
<tr>
<td>latitude</td>
<td>string</td>
<td>纬度</td>
<td>N</td>
</tr>
<tr>
<td>monitortype</td>
<td>string</td>
<td>监控器类型</td>
<td>N</td>
</tr>
<tr>
<td>batteryah</td>
<td>string</td>
<td>蓄电池AH数</td>
<td>N</td>
</tr>
<tr>
<td>protocoltype</td>
<td>int</td>
<td>网络协议类型(0 = lorawan, 1 = lora mesh, 2 = rf mesh, 3 = nbiot, 4 = gprs_direct, 5 = zigbee)</td>
<td>Y</td>
</tr>
<tr>
<td>lampPoleId</td>
<td>int</td>
<td>灯杆id</td>
<td>N</td>
</tr>
</tbody>
</table>
<h4>返回参数</h4>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>说明</th>
<th>必须存在</th>
</tr>
</thead>
<tbody>
<tr>
<td>status</td>
<td>string</td>
<td>返回码</td>
<td>Y</td>
</tr>
<tr>
<td>msg</td>
<td>string</td>
<td>返回信息</td>
<td>Y</td>
</tr>
<tr>
<td>data</td>
<td>object</td>
<td>结果数据</td>
<td>Y</td>
</tr>
</tbody>
</table>
<h4>返回内容实例</h4>
<pre><code>{
"status":"0000",
"msg":"success",
"data":{
}
}</code></pre>