URL: http://your_ip:port/api/upstream/getPage
Type: ANY
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Description: 获取upstream分页列表
Request-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
current | int32 | 当前页数(从1开始) | true | - |
limit | int32 | 每页数量(默认为10) | true | - |
keywords | string | 查询关键字 | true | - |
Request-example:
curl -i http://your_ip:port/api/upstream/getPage?keywords=il4qyy¤t=7gzzcb&limit=10
Response-fields:
Field | Type | Description | Since |
---|---|---|---|
success | boolean | 请求结果 | - |
status | string | 请求状态 200:请求成功 401:token无效 500:服务器错误 | - |
msg | string | 错误信息 | - |
obj | object | 返回内容 | - |
└─count | int64 | 总记录数 | - |
└─curr | int32 | 起始页(从1开始) | - |
└─limit | int32 | 每页记录数 | - |
└─records | array | 列表内容 | - |
└─id | string | 主键 | - |
└─name | string | 负载均衡名称 | - |
└─tactics | string | 负载策略: '':无(默认) 'sticky':会话保持 'ip_hash':ip绑定 'least_conn':最少连接 'least_time':最短时间 | - |
└─proxyType | int32 | 代理类型 0:http(默认) 1:tcp/udp | - |
└─monitor | int32 | 监控邮件通知 0:否(默认) 1:是 | - |
Response-example:
{
"success":true,
"status":"35c1i9",
"msg":"sv9i6d",
"obj":{
"count":788,
"curr":672,
"limit":10,
"records":[
{
"id":"45",
"name":"鹤轩.白",
"tactics":"iytgxk",
"proxyType":355,
"monitor":427
}
]
}
}
URL: http://your_ip:port/api/upstream/insertOrUpdate
Type: ANY
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Description: 添加或编辑upstream
Request-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
id | string | 主键 | false | - |
name | string | 负载均衡名称 | true | - |
tactics | string | 负载策略: '':无(默认) 'sticky':会话保持 'ip_hash':ip绑定 'least_conn':最少连接 'least_time':最短时间 | false | - |
proxyType | int32 | 代理类型 0:http(默认) 1:tcp/udp | false | - |
monitor | int32 | 监控邮件通知 0:否(默认) 1:是 | false | - |
Request-example:
curl -i http://your_ip:port/api/upstream/insertOrUpdate?monitor=375&seq=601&name=鹤轩.白&createTime=1641871596310&proxyType=161&updateTime=1641871596310&id=45&tactics=u1w8hj
Response-fields:
Field | Type | Description | Since |
---|---|---|---|
success | boolean | 请求结果 | - |
status | string | 请求状态 200:请求成功 401:token无效 500:服务器错误 | - |
msg | string | 错误信息 | - |
obj | object | 返回内容 | - |
Response-example:
{
"success":true,
"status":"exbvq7",
"msg":"ztgxoa",
"obj":{
}
}
URL: http://your_ip:port/api/upstream/delete
Type: ANY
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Description: 删除upstream
Request-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
id | string | upstream的id | true | - |
Request-example:
curl -i http://your_ip:port/api/upstream/delete?id=45
Response-fields:
Field | Type | Description | Since |
---|---|---|---|
success | boolean | 请求结果 | - |
status | string | 请求状态 200:请求成功 401:token无效 500:服务器错误 | - |
msg | string | 错误信息 | - |
obj | object | 返回内容 | - |
Response-example:
{
"success":true,
"status":"d7usdq",
"msg":"8w31e6",
"obj":{
}
}
URL: http://your_ip:port/api/upstream/getServerByUpstreamId
Type: ANY
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Description: 根据upstreamId获取server列表
Request-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
upstreamId | string | upstream的id | true | - |
Request-example:
curl -i http://your_ip:port/api/upstream/getServerByUpstreamId?upstreamId=45
Response-fields:
Field | Type | Description | Since |
---|---|---|---|
success | boolean | 请求结果 | - |
status | string | 请求状态 200:请求成功 401:token无效 500:服务器错误 | - |
msg | string | 错误信息 | - |
obj | object | 返回内容 | - |
└─id | string | 主键 | - |
└─upstreamId | string | 负载均衡upstream的id | - |
└─server | string | 负载节点ip (例:10.10.10.1) | - |
└─port | int32 | 负载节点端口 (例:8080) | - |
└─weight | int32 | 负载节点权重 | - |
└─failTimeout | int32 | 失败等待时间,秒 | - |
└─maxFails | int32 | 最大失败次数 | - |
└─maxConns | int32 | 最大连接数 | - |
└─status | string | 状态策略 'none':无(默认) 'down':停用 'backup':备用 | - |
Response-example:
{
"success":true,
"status":"id0wta",
"msg":"f09dys",
"obj":[
{
"id":"45",
"upstreamId":"45",
"server":"37yflf",
"port":78,
"weight":848,
"failTimeout":107,
"maxFails":943,
"maxConns":174,
"status":"4ters3"
}
]
}
URL: http://your_ip:port/api/upstream/insertOrUpdateServer
Type: ANY
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Description: 添加或编辑server
Request-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
id | string | 主键 | false | - |
upstreamId | string | 负载均衡upstream的id | true | - |
server | string | 负载节点ip (例:10.10.10.1) | true | - |
port | int32 | 负载节点端口 (例:8080) | true | - |
weight | int32 | 负载节点权重 | false | - |
failTimeout | int32 | 失败等待时间,秒 | false | - |
maxFails | int32 | 最大失败次数 | false | - |
maxConns | int32 | 最大连接数 | false | - |
status | string | 状态策略 'none':无(默认) 'down':停用 'backup':备用 | false | - |
Request-example:
curl -i http://your_ip:port/api/upstream/insertOrUpdateServer?upstreamId=45&createTime=1641871596310&maxConns=830&id=45&weight=735&status=briecg&port=391&updateTime=1641871596310&failTimeout=538&maxFails=420&server=glqt6c&monitorStatus=608
Response-fields:
Field | Type | Description | Since |
---|---|---|---|
success | boolean | 请求结果 | - |
status | string | 请求状态 200:请求成功 401:token无效 500:服务器错误 | - |
msg | string | 错误信息 | - |
obj | object | 返回内容 | - |
Response-example:
{
"success":true,
"status":"hm8psm",
"msg":"shliao",
"obj":{
"waring":"You may have used non-display generics."
}
}