All URIs are relative to http://127.0.0.1:18776/api/v1/module
Method | HTTP request | Description |
---|---|---|
addServer | POST /server-group/{sg}/server | add server into server-group |
describeServer | GET /server-group/{sg}/server/{svr}/detail | get detailed info of one server in server-group |
getServer | GET /server-group/{sg}/server/{svr} | get server in server-group |
listServer | GET /server-group/{sg}/server | retrieve server list from server-group |
removeServer | DELETE /server-group/{sg}/server/{svr} | remove server from server-group |
updateServer | PUT /server-group/{sg}/server/{svr} | update server in server-group |
addServer(sg, body)
add server into server-group
// Import classes:
//import vproxy.client.ApiException;
//import vproxy.client.model.ServerApi;
ServerApi apiInstance = new ServerApi();
String sg = "sg_example"; // String | name of the server-group
ServerCreate body = new ServerCreate(); // ServerCreate |
try {
apiInstance.addServer(sg, body);
} catch (ApiException e) {
System.err.println("Exception when calling ServerApi#addServer");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
sg | String | name of the server-group | |
body | ServerCreate |
null (empty response body)
No authorization required
- Content-Type: application/json
- Accept: application/json
ServerDetail describeServer(sg, svr)
get detailed info of one server in server-group
// Import classes:
//import vproxy.client.ApiException;
//import vproxy.client.model.ServerApi;
ServerApi apiInstance = new ServerApi();
String sg = "sg_example"; // String | name of the server-group
String svr = "svr_example"; // String | name of the server
try {
ServerDetail result = apiInstance.describeServer(sg, svr);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServerApi#describeServer");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
sg | String | name of the server-group | |
svr | String | name of the server |
No authorization required
- Content-Type: Not defined
- Accept: Not defined
Server getServer(sg, svr)
get server in server-group
// Import classes:
//import vproxy.client.ApiException;
//import vproxy.client.model.ServerApi;
ServerApi apiInstance = new ServerApi();
String sg = "sg_example"; // String | name of the server-group
String svr = "svr_example"; // String | name of the server
try {
Server result = apiInstance.getServer(sg, svr);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServerApi#getServer");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
sg | String | name of the server-group | |
svr | String | name of the server |
No authorization required
- Content-Type: Not defined
- Accept: application/json
List<Server> listServer(sg)
retrieve server list from server-group
// Import classes:
//import vproxy.client.ApiException;
//import vproxy.client.model.ServerApi;
ServerApi apiInstance = new ServerApi();
String sg = "sg_example"; // String | name of the server-group
try {
List<Server> result = apiInstance.listServer(sg);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServerApi#listServer");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
sg | String | name of the server-group |
No authorization required
- Content-Type: Not defined
- Accept: application/json
removeServer(sg, svr)
remove server from server-group
// Import classes:
//import vproxy.client.ApiException;
//import vproxy.client.model.ServerApi;
ServerApi apiInstance = new ServerApi();
String sg = "sg_example"; // String | name of the server-group
String svr = "svr_example"; // String | name of the server
try {
apiInstance.removeServer(sg, svr);
} catch (ApiException e) {
System.err.println("Exception when calling ServerApi#removeServer");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
sg | String | name of the server-group | |
svr | String | name of the server |
null (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
updateServer(sg, svr, body)
update server in server-group
// Import classes:
//import vproxy.client.ApiException;
//import vproxy.client.model.ServerApi;
ServerApi apiInstance = new ServerApi();
String sg = "sg_example"; // String | name of the server-group
String svr = "svr_example"; // String | name of the server
ServerUpdate body = new ServerUpdate(); // ServerUpdate |
try {
apiInstance.updateServer(sg, svr, body);
} catch (ApiException e) {
System.err.println("Exception when calling ServerApi#updateServer");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
sg | String | name of the server-group | |
svr | String | name of the server | |
body | ServerUpdate |
null (empty response body)
No authorization required
- Content-Type: application/json
- Accept: application/json