3. IP黑白名单接口
3.1. 获取全部IP黑白名单列表
Type: GET
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
Description: 获取全部IP黑白名单列表
Request-example:
curl -X GET -i /api/denyAllow/getList
Response-fields:
| Field | Type | Description | Since |
|---|---|---|---|
success |
boolean |
请求结果 |
- |
status |
string |
请求状态 200:请求成功 401:token无效 500:服务器错误 |
- |
msg |
string |
错误信息 |
- |
obj |
array |
返回内容 |
- |
└─id |
string |
主键 |
- |
└─name |
string |
名单名称 |
- |
└─ip |
string |
ip名单(用回车分隔) |
- |
Response-example:
{
"success": true,
"status": "",
"msg": "",
"obj": [
{
"id": "",
"name": "",
"ip": ""
}
]
}
3.2. 添加或编辑IP黑白名单
Type: GET
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
Description: 添加或编辑IP黑白名单
Query-parameters:
| Parameter | Type | Description | Required | Since |
|---|---|---|---|---|
id |
string |
主键 |
false |
- |
name |
string |
名单名称 |
false |
- |
ip |
string |
ip名单(用回车分隔) |
false |
- |
Request-example:
curl -X GET -i /api/denyAllow/insertOrUpdate?id=&ip=&name=
Response-fields:
| Field | Type | Description | Since |
|---|---|---|---|
success |
boolean |
请求结果 |
- |
status |
string |
请求状态 200:请求成功 401:token无效 500:服务器错误 |
- |
msg |
string |
错误信息 |
- |
obj |
object |
返回内容 |
- |
Response-example:
{
"success": true,
"status": "",
"msg": "",
"obj": {}
}
3.3. 删除IP黑白名单
URL: /api/denyAllow/del
Type: GET
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
Description: 删除IP黑白名单
Query-parameters:
| Parameter | Type | Description | Required | Since |
|---|---|---|---|---|
id |
string |
IP黑白名单id |
false |
- |
Request-example:
curl -X GET -i /api/denyAllow/del?id=
Response-fields:
| Field | Type | Description | Since |
|---|---|---|---|
success |
boolean |
请求结果 |
- |
status |
string |
请求状态 200:请求成功 401:token无效 500:服务器错误 |
- |
msg |
string |
错误信息 |
- |
obj |
object |
返回内容 |
- |
Response-example:
{
"success": true,
"status": "",
"msg": "",
"obj": {}
}