2023-01-04 05:36:56 +00:00
|
|
|
{
|
|
|
|
"operationId": "getUpstreams",
|
|
|
|
"summary": "Get a list of Upstreams",
|
|
|
|
"tags": ["Upstreams"],
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"in": "query",
|
|
|
|
"name": "offset",
|
|
|
|
"schema": {
|
|
|
|
"type": "number"
|
|
|
|
},
|
|
|
|
"description": "The pagination row offset, default 0",
|
|
|
|
"example": 0
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"in": "query",
|
|
|
|
"name": "limit",
|
|
|
|
"schema": {
|
|
|
|
"type": "number"
|
|
|
|
},
|
|
|
|
"description": "The pagination row limit, default 10",
|
|
|
|
"example": 10
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"in": "query",
|
|
|
|
"name": "sort",
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"description": "The sorting of the list",
|
|
|
|
"example": "id,name.asc,value.desc"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "200 response",
|
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"required": ["result"],
|
|
|
|
"properties": {
|
|
|
|
"result": {
|
|
|
|
"$ref": "#/components/schemas/UpstreamList"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"examples": {
|
|
|
|
"default": {
|
|
|
|
"value": {
|
|
|
|
"result": {
|
|
|
|
"total": 5,
|
|
|
|
"offset": 0,
|
|
|
|
"limit": 10,
|
|
|
|
"sort": [
|
|
|
|
{
|
|
|
|
"field": "name",
|
|
|
|
"direction": "ASC"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"items": [
|
|
|
|
{
|
|
|
|
"id": 1,
|
2023-05-28 22:50:27 +00:00
|
|
|
"created_at": 1672804124000,
|
|
|
|
"updated_at": 1672804124000,
|
2023-01-04 05:36:56 +00:00
|
|
|
"user_id": 2,
|
|
|
|
"name": "API servers",
|
|
|
|
"nginx_template_id": 5,
|
|
|
|
"ip_hash": true,
|
|
|
|
"ntlm": false,
|
|
|
|
"keepalive": 10,
|
|
|
|
"keepalive_requests": 10,
|
|
|
|
"keepalive_time": "60s",
|
|
|
|
"keepalive_timeout": "3s",
|
|
|
|
"advanced_config": "",
|
|
|
|
"status": "ok",
|
|
|
|
"error_message": "",
|
|
|
|
"servers": [
|
|
|
|
{
|
|
|
|
"id": 1,
|
2023-05-28 22:50:27 +00:00
|
|
|
"created_at": 1672804124000,
|
|
|
|
"updated_at": 1672804124000,
|
2023-01-04 05:36:56 +00:00
|
|
|
"upstream_group_id": 1,
|
|
|
|
"server": "192.168.0.10:80",
|
|
|
|
"weight": 100,
|
|
|
|
"max_conns": 0,
|
|
|
|
"max_fails": 0,
|
|
|
|
"fail_timeout": 0,
|
|
|
|
"backup": false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": 2,
|
2023-05-28 22:50:27 +00:00
|
|
|
"created_at": 1672804124000,
|
|
|
|
"updated_at": 1672804124000,
|
2023-01-04 05:36:56 +00:00
|
|
|
"upstream_group_id": 1,
|
|
|
|
"server": "192.168.0.11:80",
|
|
|
|
"weight": 50,
|
|
|
|
"max_conns": 0,
|
|
|
|
"max_fails": 0,
|
|
|
|
"fail_timeout": 0,
|
|
|
|
"backup": false
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": 2,
|
2023-05-28 22:50:27 +00:00
|
|
|
"created_at": 1672804197000,
|
|
|
|
"updated_at": 1672804197000,
|
2023-01-04 05:36:56 +00:00
|
|
|
"user_id": 2,
|
|
|
|
"name": "API servers 2",
|
|
|
|
"nginx_template_id": 5,
|
|
|
|
"ip_hash": false,
|
|
|
|
"ntlm": false,
|
|
|
|
"keepalive": 0,
|
|
|
|
"keepalive_requests": 0,
|
|
|
|
"keepalive_time": "",
|
|
|
|
"keepalive_timeout": "",
|
|
|
|
"advanced_config": "",
|
|
|
|
"status": "ok",
|
|
|
|
"error_message": "",
|
|
|
|
"servers": [
|
|
|
|
{
|
|
|
|
"id": 3,
|
2023-05-28 22:50:27 +00:00
|
|
|
"created_at": 1672804197000,
|
|
|
|
"updated_at": 1672804197000,
|
2023-01-04 05:36:56 +00:00
|
|
|
"upstream_group_id": 2,
|
|
|
|
"server": "192.168.0.10:80",
|
|
|
|
"weight": 100,
|
|
|
|
"max_conns": 0,
|
|
|
|
"max_fails": 0,
|
|
|
|
"fail_timeout": 0,
|
|
|
|
"backup": false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": 4,
|
2023-05-28 22:50:27 +00:00
|
|
|
"created_at": 1672804197000,
|
|
|
|
"updated_at": 1672804197000,
|
2023-01-04 05:36:56 +00:00
|
|
|
"upstream_group_id": 2,
|
|
|
|
"server": "192.168.0.11:80",
|
|
|
|
"weight": 50,
|
|
|
|
"max_conns": 0,
|
|
|
|
"max_fails": 0,
|
|
|
|
"fail_timeout": 0,
|
|
|
|
"backup": false
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": 3,
|
2023-05-28 22:50:27 +00:00
|
|
|
"created_at": 1672804200000,
|
|
|
|
"updated_at": 1672804200000,
|
2023-01-04 05:36:56 +00:00
|
|
|
"user_id": 2,
|
|
|
|
"name": "API servers 2",
|
|
|
|
"nginx_template_id": 5,
|
|
|
|
"ip_hash": false,
|
|
|
|
"ntlm": false,
|
|
|
|
"keepalive": 0,
|
|
|
|
"keepalive_requests": 0,
|
|
|
|
"keepalive_time": "",
|
|
|
|
"keepalive_timeout": "",
|
|
|
|
"advanced_config": "",
|
|
|
|
"status": "ok",
|
|
|
|
"error_message": "",
|
|
|
|
"servers": [
|
|
|
|
{
|
|
|
|
"id": 5,
|
2023-05-28 22:50:27 +00:00
|
|
|
"created_at": 1672804200000,
|
|
|
|
"updated_at": 1672804200000,
|
2023-01-04 05:36:56 +00:00
|
|
|
"upstream_group_id": 3,
|
|
|
|
"server": "192.168.0.10:80",
|
|
|
|
"weight": 100,
|
|
|
|
"max_conns": 0,
|
|
|
|
"max_fails": 0,
|
|
|
|
"fail_timeout": 0,
|
|
|
|
"backup": false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": 6,
|
2023-05-28 22:50:27 +00:00
|
|
|
"created_at": 1672804200000,
|
|
|
|
"updated_at": 1672804200000,
|
2023-01-04 05:36:56 +00:00
|
|
|
"upstream_group_id": 3,
|
|
|
|
"server": "192.168.0.11:80",
|
|
|
|
"weight": 50,
|
|
|
|
"max_conns": 0,
|
|
|
|
"max_fails": 0,
|
|
|
|
"fail_timeout": 0,
|
|
|
|
"backup": false
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": 4,
|
2023-05-28 22:50:27 +00:00
|
|
|
"created_at": 1672804201000,
|
|
|
|
"updated_at": 1672804201000,
|
2023-01-04 05:36:56 +00:00
|
|
|
"user_id": 2,
|
|
|
|
"name": "API servers 2",
|
|
|
|
"nginx_template_id": 5,
|
|
|
|
"ip_hash": false,
|
|
|
|
"ntlm": false,
|
|
|
|
"keepalive": 0,
|
|
|
|
"keepalive_requests": 0,
|
|
|
|
"keepalive_time": "",
|
|
|
|
"keepalive_timeout": "",
|
|
|
|
"advanced_config": "",
|
|
|
|
"status": "ok",
|
|
|
|
"error_message": "",
|
|
|
|
"servers": [
|
|
|
|
{
|
|
|
|
"id": 7,
|
2023-05-28 22:50:27 +00:00
|
|
|
"created_at": 1672804201000,
|
|
|
|
"updated_at": 1672804201000,
|
2023-01-04 05:36:56 +00:00
|
|
|
"upstream_group_id": 4,
|
|
|
|
"server": "192.168.0.10:80",
|
|
|
|
"weight": 100,
|
|
|
|
"max_conns": 0,
|
|
|
|
"max_fails": 0,
|
|
|
|
"fail_timeout": 0,
|
|
|
|
"backup": false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": 8,
|
2023-05-28 22:50:27 +00:00
|
|
|
"created_at": 1672804201000,
|
|
|
|
"updated_at": 1672804201000,
|
2023-01-04 05:36:56 +00:00
|
|
|
"upstream_group_id": 4,
|
|
|
|
"server": "192.168.0.11:80",
|
|
|
|
"weight": 50,
|
|
|
|
"max_conns": 0,
|
|
|
|
"max_fails": 0,
|
|
|
|
"fail_timeout": 0,
|
|
|
|
"backup": false
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": 5,
|
2023-05-28 22:50:27 +00:00
|
|
|
"created_at": 1672804201000,
|
|
|
|
"updated_at": 1672804201000,
|
2023-01-04 05:36:56 +00:00
|
|
|
"user_id": 2,
|
|
|
|
"name": "API servers 2",
|
|
|
|
"nginx_template_id": 5,
|
|
|
|
"ip_hash": false,
|
|
|
|
"ntlm": false,
|
|
|
|
"keepalive": 0,
|
|
|
|
"keepalive_requests": 0,
|
|
|
|
"keepalive_time": "",
|
|
|
|
"keepalive_timeout": "",
|
|
|
|
"advanced_config": "",
|
|
|
|
"status": "ok",
|
|
|
|
"error_message": "",
|
|
|
|
"servers": [
|
|
|
|
{
|
|
|
|
"id": 9,
|
2023-05-28 22:50:27 +00:00
|
|
|
"created_at": 1672804201000,
|
|
|
|
"updated_at": 1672804201000,
|
2023-01-04 05:36:56 +00:00
|
|
|
"upstream_group_id": 5,
|
|
|
|
"server": "192.168.0.10:80",
|
|
|
|
"weight": 100,
|
|
|
|
"max_conns": 0,
|
|
|
|
"max_fails": 0,
|
|
|
|
"fail_timeout": 0,
|
|
|
|
"backup": false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": 10,
|
2023-05-28 22:50:27 +00:00
|
|
|
"created_at": 1672804201000,
|
|
|
|
"updated_at": 1672804201000,
|
2023-01-04 05:36:56 +00:00
|
|
|
"upstream_group_id": 5,
|
|
|
|
"server": "192.168.0.11:80",
|
|
|
|
"weight": 50,
|
|
|
|
"max_conns": 0,
|
|
|
|
"max_fails": 0,
|
|
|
|
"fail_timeout": 0,
|
|
|
|
"backup": false
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|