Appearance
Open API
All API遵循REST
标准,请求的服务器地址为:
https://agri-dl.holdingbyte.com
请求头设置
- 所有请求,必须设定请求头:
Content-Type:application/json
- 请求需携带token,以便服务器权鉴:
token:XXXX
示例
python
import requests
import json
# 设备id
device_id = "861714053848887"
# 请求token
token = "hvduasqoqnbtscaiumzsgpjewxkrgupq"
url = f"https://agri-dl.holdingbyte.com/api/device/{device_id}/"
payload = {}
headers = {
'token': token,
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
IMPORTANT
所有请求的url最后字符应该为/
。