Document navigation

GetLoadBalancerServerGroupBackendServer

API Request

URLs
GET zstack/v1/load-balancers/listeners/{listenerUuid}/backendservers
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET \
http://localhost:8080/zstack/v1/load-balancers/listeners/423a88e5945d3d3eb42f5494433d0c51/backendservers?serverGroupUuid=9b8175f2e71232acaca1e1453d3071d8&name=web&state=Enabled&sortBy=serverName&sortDirection=asc&limit=1000&start=0
Request Parameters
NameTypeLocationDescriptionOptional ValuesStarting Version
listenerUuidStringurlThe listener UUID. Backend servers of all server groups under the listener are returned.5.5.38
serverGroupUuidStringqueryOptional. The server group UUID. Optional filter. If not specified, backend servers of all server groups under the listener are returned.5.5.38
limitIntegerqueryOptional. The page size. Default: 1000.5.5.38
startIntegerqueryOptional. The starting offset of the page. Default: 0.5.5.38
nameStringqueryOptional. The server name. Fuzzy match. If not specified, all are returned.5.5.38
stateStringqueryOptional. The enabling state filter. Enabled indicates enabled, and Disabled indicates disabled. If not specified, all are returned.
  • Enabled
  • Disabled
5.5.38
sortByStringqueryOptional. The field used for sorting. Default: createDate.
  • serverName
  • ip
  • weight
  • state
  • createDate
5.5.38
sortDirectionStringqueryOptional. The sort direction. Default: asc.
  • asc
  • desc
5.5.38
systemTagsListqueryOptional. The system tags.0.6
userTagsListqueryOptional. The user tags.0.6

API Response

Sample Response
{
  "inventories": [
    {
      "uuid": "55c32cf9b7f23d899355f3ea42a33c42",
      "serverGroupUuid": "b9a476e29cca31b99c73e6f6929261e3",
      "loadBalancerUuid": "6a27a4a5e90c39448232e355e06733a8",
      "serverType": "VmInstance",
      "vmNicUuid": "0bc562b8247631bbab05c4efb8842367",
      "vmInstanceUuid": "7fd397dc15f637dfb672d3b80c8665e0",
      "serverName": "vm-1",
      "ip": "192.168.1.10",
      "l3NetworkUuid": "95fbe8f3ee0f30c4a17d09043fd95376",
      "weight": 100,
      "ipVersion": 4,
      "state": "Enabled",
      "runtimeStatus": "Active",
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM"
    }
  ],
  "total": 1
}
NameTypeDescriptionStarting Version
successbooleanWhether the request succeeds.0.6
errorErrorCodeThe error code. If not null, the operation fails, or vice versa. See error.0.6
totalLongThe total number of backend servers after filtering.5.5.38
inventoriesListSee inventories.5.5.38
#error
NameTypeDescriptionStarting Version
codeStringThe error code, which is a globally unique identifier of the error, for example, SYS.1000 or HOST.1001.5.3.20
descriptionStringThe brief description of the error.5.3.20
detailsStringThe details about the error.5.3.20
elaborationStringThe reserved field. Default: null.5.3.20
opaqueLinkedHashMapThe reserved field. Default: null.5.3.20
causeErrorCodeThe root error, which is the source error that causes the current error. If there is no source error, this field is null.5.3.20
#inventories
NameTypeDescriptionStarting Version
uuidStringThe unique UUID of the backend server, deterministically generated from the server type and record ID and stable across requests.5.5.38
serverGroupNameStringThe server group name.5.5.38
listenerUuidStringThe listener UUID. The state is the enabling state from the perspective of this listener.5.5.38
serverGroupUuidStringThe server group UUID.5.5.38
loadBalancerUuidStringThe load balancer UUID.5.5.38
serverTypeStringThe backend server type. VmInstance for VM NICs, and ServerIp for external IPs.5.5.38
vmNicUuidStringThe VM NIC UUID. Null when serverType is ServerIp.5.5.38
vmInstanceUuidStringThe VM instance UUID. Null when serverType is ServerIp.5.5.38
serverNameStringThe server name. For VM instance backends, it is the VM instance name. For external IP backends, it is the IP address.5.5.38
ipStringThe IP address of the backend server.5.5.38
l3NetworkUuidStringThe UUID of the L3 network where the NIC resides. Null when serverType is ServerIp.5.5.38
weightLongThe weight.5.5.38
ipVersionIntegerThe version of the IP protocol. Null when serverType is ServerIp.5.5.38
stateStringThe enabling state. Enabled indicates enabled, and Disabled indicates disabled. If listenerUuid is not specified, the value is an aggregated result.5.5.38
runtimeStatusStringThe running status of the VM instance. Active indicates running, Inactive indicates stopped, and Pending indicates pending.5.5.38
createDateTimestampThe creation time.5.5.38
lastOpDateTimestampThe last operation time.5.5.38

SDK Sample

Java SDK
GetLoadBalancerServerGroupBackendServerAction action = new GetLoadBalancerServerGroupBackendServerAction();
action.listenerUuid = "423a88e5945d3d3eb42f5494433d0c51";
action.serverGroupUuid = "9b8175f2e71232acaca1e1453d3071d8";
action.name = "web";
action.state = "Enabled";
action.sortBy = "serverName";
action.sortDirection = "asc";
action.limit = 1000;
action.start = 0;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetLoadBalancerServerGroupBackendServerAction.Result res = action.call();
Python SDK
action = GetLoadBalancerServerGroupBackendServerAction()
action.listenerUuid = "423a88e5945d3d3eb42f5494433d0c51"
action.serverGroupUuid = "9b8175f2e71232acaca1e1453d3071d8"
action.name = "web"
action.state = "Enabled"
action.sortBy = "serverName"
action.sortDirection = "asc"
action.limit = 1000
action.start = 0
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()
API Reference | 5.5.38 | ZStack Cloud · ZCF | ZStack Resource Center