chore: update panel-config3
This commit is contained in:
149
api.rest
Normal file
149
api.rest
Normal file
@@ -0,0 +1,149 @@
|
||||
# 变量定义
|
||||
# @baseUrl = http://200.200.200.51:8080/config
|
||||
# @baseUrl = http://192.168.6.51:8080/config
|
||||
@baseUrl = http://localhost:8080/config
|
||||
@token = Basic YWRtaW46MTIzNDU2
|
||||
@contentType = application/json; charset=UTF-8
|
||||
|
||||
|
||||
### 获取LAN信息 ---------------------------------------------
|
||||
GET {{baseUrl}}/lan HTTP/1.1
|
||||
Authorization: {{token}}
|
||||
|
||||
# 成功应答:
|
||||
# {
|
||||
# "dhcp": false,
|
||||
# "ip": "192.168.6.51",
|
||||
# "mask": "255.255.255.0",
|
||||
# "gateway": "192.168.6.1",
|
||||
# "dns": "8.8.8.8"
|
||||
# }
|
||||
|
||||
### 设置LAN ---------------------------------------------
|
||||
PUT {{baseUrl}}/lan HTTP/1.1
|
||||
Authorization: {{token}}
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"dhcp": false,
|
||||
"ip": "192.168.6.51",
|
||||
"mask": "255.255.252.0",
|
||||
"gateway": "192.168.6.1",
|
||||
"dns": "8.8.8.8"
|
||||
}
|
||||
|
||||
# 成功应答:
|
||||
# {
|
||||
# "dhcp": false,
|
||||
# "ip": "192.168.6.51",
|
||||
# "mask": "255.255.252.0",
|
||||
# "gateway": "192.168.6.1",
|
||||
# "dns": "8.8.8.8"
|
||||
# }
|
||||
|
||||
# 失败应答:
|
||||
# {
|
||||
# "err": "request error: wrong gateway"
|
||||
# }
|
||||
|
||||
|
||||
### 获取主继电器配置 ---------------------------------------------
|
||||
GET {{baseUrl}}/main_relay HTTP/1.1
|
||||
Authorization: {{token}}
|
||||
|
||||
# 成功应答:
|
||||
# {
|
||||
# "lockDelayMs": 5000,
|
||||
# "unlockDelayMs": 2000
|
||||
# }
|
||||
|
||||
### 设置主继电器配置 ---------------------------------------------
|
||||
PUT {{baseUrl}}/main_relay HTTP/1.1
|
||||
Authorization: {{token}}
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"lockDelayMs": 5000,
|
||||
"unlockDelayMs": 2000
|
||||
}
|
||||
|
||||
# 成功应答:
|
||||
# {
|
||||
# "lockDelayMs": 5000,
|
||||
# "unlockDelayMs": 1000
|
||||
# }
|
||||
|
||||
|
||||
### 获取电梯配置 ---------------------------------------------
|
||||
GET {{baseUrl}}/elevator HTTP/1.1
|
||||
Authorization: {{token}}
|
||||
|
||||
# 成功应答:
|
||||
# {
|
||||
# "enabled": true,
|
||||
# "timeoutMs": 8000,
|
||||
# "portHintList": [],
|
||||
# "portCount": 0
|
||||
# }
|
||||
|
||||
|
||||
### 设置电梯配置 ---------------------------------------------
|
||||
PUT {{baseUrl}}/elevator HTTP/1.1
|
||||
Authorization: {{token}}
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"enabled": true,
|
||||
"timeoutMs": 8000,
|
||||
"portHintList": [],
|
||||
"portCount": 0
|
||||
}
|
||||
|
||||
# 成功应答:
|
||||
# {
|
||||
# "enabled": true,
|
||||
# "timeoutMs": 8000,
|
||||
# "portHintList": [],
|
||||
# "portCount": 0
|
||||
# }
|
||||
|
||||
|
||||
### 获取设备配置 ---------------------------------------------
|
||||
GET {{baseUrl}}/device HTTP/1.1
|
||||
Authorization: {{token}}
|
||||
|
||||
# 成功应答:
|
||||
{
|
||||
"type": 0,
|
||||
"sn": 1,
|
||||
"name": "test",
|
||||
"unit": 1,
|
||||
"room": 101
|
||||
}
|
||||
|
||||
|
||||
### 设置设备配置 ---------------------------------------------
|
||||
PUT {{baseUrl}}/device HTTP/1.1
|
||||
Authorization: {{token}}
|
||||
Content-Type: {{contentType}}
|
||||
|
||||
{
|
||||
"type": 0,
|
||||
"sn": 0,
|
||||
"name": "test",
|
||||
"unit": 12,
|
||||
"room": 101,
|
||||
"keypad":1
|
||||
}
|
||||
|
||||
# 成功应答:
|
||||
# {
|
||||
# "type": 3,
|
||||
# "sn": 1,
|
||||
# "name": "test",
|
||||
# "unit": 12,
|
||||
# "room": 102,
|
||||
# "keypad": 1
|
||||
# }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user