Network ResourcesDistributed Port Group Related Interfaces

Query Address Pool

GET/zstack/v1/l3-networks/address-pools
GET zstack/v1/l3-networks/address-pools/{uuid}

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/l3-networks/address-pools?q=uuid=a73cf6bc10a0390bb5e461d9f5e3fd6d
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/l3-networks/address-pools/f45cb0f9098336a39662b7553f42deb5

Query Fields

Run the CLI command tool, enter QueryAddressPool, and press the Tab key to view all queryable fields and resource names that can be queried across tables.

API Response

Sample Response

{
  "inventories": [
    {
      "l3NetworkUuid": "81ce7828f3f63c0ea8a69dd9139bdaa0",
      "name": "Test-IPRange",
      "networkCidr": "192.168.10.0/24",
      "ipRangeType": "AddressPool"
    }
  ]
}
NameTypeDescriptionStarting Version
errorErrorCodeThe error code. If not null, the operation fails, or vice versa. For more information, see error3.9.0
inventoriesListFor more information, see inventories3.9.0

error

NameTypeDescriptionStarting Version
codeStringThe error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.10013.9.0
descriptionStringThe brief description of the error.3.9.0
detailsStringThe details about the error.3.9.0
elaborationStringThe reserved field. Default value: null3.9.0
opaqueLinkedHashMapThe reserved field. Default value: null3.9.0
causeErrorCodeThe root error, which is the associated root cause of the current error. If no root error exists, this parameter is null3.9.0

inventories

NameTypeDescriptionStarting Version
uuidStringThe resource UUID, which uniquely identifies the resource.3.9.0
l3NetworkUuidStringThe L3 Network UUID.3.9.0
nameStringThe resource name.3.9.0
descriptionStringThe detailed description of the resource.3.9.0
startIpStringThe start IP.3.9.0
endIpStringThe end IP.3.9.0
netmaskStringThe netmask.3.9.0
gatewayStringThe gateway.3.9.0
networkCidrStringThe network CIDR.3.9.0
ipVersionIntegerThe IP protocol number.3.9.0
addressModeStringThe IPv6 address allocation mode.3.9.0
prefixLenIntegerThe prefix length.3.9.0
createDateTimestampThe creation date.3.9.0
lastOpDateTimestampThe last operation date.3.9.0
ipRangeTypeIpRangeTypeFor more information, see ipRangeType3.9.0

ipRangeType

NameTypeDescriptionStarting Version
NormalIpRangeTypeNormal address range.3.9.0
AddressPoolIpRangeTypeAddress pool range.3.9.0

SDK Sample

Java SDK

QueryAddressPoolAction action = new QueryAddressPoolAction();
action.conditions = asList("uuid=4cbab87c862032f1a161bebe7e1f55a1");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryAddressPoolAction.Result res = action.call();

Python SDK

QueryAddressPoolAction action = QueryAddressPoolAction()
action.conditions = ["uuid=455d45fad9893eba9565de38588c7416"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryAddressPoolAction.Result res = action.call()