Network ResourcesDistributed Port Group Related Interfaces

QueryIpRange

GET/zstack/v1/l3-networks/ip-ranges

Headers

Authorization: OAuth the-session-uuid

Curl Sample

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 8f7b1e0396c54646a4b37affdfdda079" \
-X GET http://localhost:8080/zstack/v1/l3-networks/ip-ranges?q=uuid=887227aa5d5c49e2a8137b79dad3738a
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 60a5dfda1a9843809415eb28f2550f94" \
-X GET http://localhost:8080/zstack/v1/l3-networks/ip-ranges/17684784fcc04571a47eb24dc2eb9638

Query Fields

Run the CLI command tool, enter QueryIpRange, 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": "9a72daf0034443aa81864e593f0f5b32",
      "name": "Test-IPRange",
      "networkCidr": "192.168.10.0/24"
    }
  ]
}
NameTypeDescriptionStarting Version
errorErrorCodeThe error code. If not null, the operation fails, or vice versa. For more information, see error.0.6
inventoriesListSee inventories.0.6

error

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

inventories

NameTypeDescriptionStarting Version
uuidStringThe resource UUID.0.6
l3NetworkUuidStringThe L3 network UUID.0.6
nameStringThe resource name.0.6
descriptionStringThe detailed description of the resource.0.6
startIpString 0.6
endIpString 0.6
netmaskString 0.6
prefixLenStringThe prefix length.3.1.0
gatewayString 0.6
networkCidrString 0.6
ipVersionIntegerThe IP version.3.1.0
addressModeStringThe IPv6 address allocation mode.3.1.0
createDateTimestampThe creation date.0.6
lastOpDateTimestampThe last operation date.0.6

SDK Sample

Java SDK

QueryIpRangeAction action = new QueryIpRangeAction();
action.conditions = asList("uuid=d5764d7ab9174e5486e55ba805d28675");
action.sessionId = "5357e54aa55a4846ac96972776d3100f";
QueryIpRangeAction.Result res = action.call();

Python SDK

QueryIpRangeAction action = QueryIpRangeAction()
action.conditions = ["uuid=2cda79a574344eeb9f38393253ddf858"]
action.sessionId = "c87d6755153549f6a4e7373b601ac99f"
QueryIpRangeAction.Result res = action.call()