# 机具心跳
# 接口说明
| host | path | method | content-type |
|---|---|---|---|
| open.wecard.qq.com | /cgi-bin/guard/device/heart-beat | POST | application/json |
# 请求参数
{
"access_token": "z8WH...R7Fd",
"device_no": "MRC00001",
"version": 1
}
| 参数 | 必填 | 类型 | 说明 |
|---|---|---|---|
access_token | ✔️ | string | 接口请求凭证 |
device_no | ✔️ | string | 门禁机具设备号 |
version | ✔️ | int | 设备保存的名单规则版本号 |
# 响应参数
{
"code": 0,
"message": "",
"data": {
"need_pull": false,
"timestamp": 1608871405,
"time": "2020-12-25T12:43:25+08:00"
}
}
# data 中的参数说明
| 参数 | 类型 | 说明 |
|---|---|---|
need_pull | bool | 根据请求中的version确定当前设备是否需要拉取新版本 |
timestamp | int64 | 服务器 unix 时间戳 |
time | string | 将timestamp按照RFC 3339 (opens new window)规范格式化后的时间字符串 |