Network ResourcesDistributed Port Group Related Interfaces

Query IP Address

GET/zstack/v1/l3-networks/ip-address
GET/zstack/v1/l3-networks/ip-address{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/ip-address
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/l3-networks/ip-address/87b2ab50f6c13ebb9dd73ca46bb22bc7

Query Fields

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

API Response

Sample Response

{
  "inventories": [
    {
      "uuid": "3ccfbfd6bd483a5eaeabed00b284f4fc",
      "ipRangeUuid": "1b3a29978ea73f0db4ce8d8c2d0bd479",
      "l3NetworkUuid": "c11b366475f836078e5aa86469de2eef",
      "ipVersion": 4.0,
      "ip": "192.168.1.100",
      "netmask": "255.255.255.0",
      "gateway": "192.168.1.1",
      "ipInLong": 0.0,
      "vmNicUuid": "28e22f67b2893b208547333dfef7cfa8"
    }
  ]
}
NameTypeDescriptionStarting Version
errorErrorCodeThe error code. If not null, the operation fails, or vice versa. For more information, see errot3.1.0
inventoriesListFor more information, see inventories3.1.0

error

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

inventories

NameTypeDescriptionStarting Version
uuidStringThe resource UUID, which uniquely identifies the resource.3.1.0
ipRangeUuidStringThe IP range UUID.3.1.0
l3NetworkUuidStringThe L3 Network UUID.3.1.0
ipVersionIntegerThe IP protocol number.3.1.0
ipStringThe IP address.3.1.0
netmaskStringThe network mask.3.1.0
gatewayStringThe gateway address.3.1.0
usedForString 3.1.0
ipInLonglong 3.1.0
vmNicUuidStringThe VM NIC UUID.3.1.0
createDateTimestampThe creation date.3.1.0
lastOpDateTimestampThe last operation date.3.1.0

SDK Sample

Java SDK

QueryIpAddressAction action = new QueryIpAddressAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryIpAddressAction.Result res = action.call();

Python SDK

QueryIpAddressAction action = QueryIpAddressAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryIpAddressAction.Result res = action.call()