Network ResourcesDistributed Port Group Related Interfaces

Get L3 Network IP Address Usage Statistics

GET/zstack/v1/l3-networks/{l3NetworkUuid}/ip-statistic

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/9bdd769f3e603f65bd368512ebe8b998/ip-statistic?resourceType=All&sortBy=Ip&sortDirection=asc&start=0&limit=20&replyWithCount=false

Parameter List

Name

Type

Location

Description

Allowed Values

Starting Version

l3NetworkUuid

String

url

The L3 Network UUID.

 

3.7.0

resourceType (Optional)

String

query

The resource type for statistics.

  • All
  • Vip
  • VM
  • KernelInterface

3.7.0

ip (Optional)

String

query

The specified IP address.

 

3.7.0

sortBy (Optional)

String

query

The sort method.

  • Ip
  • CreateDate

3.7.0

sortDirection (Optional)

String

query

The sort direction.

  • asc
  • desc

3.7.0

start (Optional)

Integer

query

The start offset of the statistics result.

 

3.7.0

limit (Optional)

Integer

query

The number of statistics results.

 

3.7.0

replyWithCount (Optional)

boolean

query

Whether to return the total count of statistics results.

 

3.7.0

systemTags (Optional)

List

query

The system tags.

 

3.7.0

userTags (Optional)

List

query

The user tags.

 

3.7.0

API Response

Sample Response

{
  "ipStatistics": [
    {
      "ip": "192.168.0.1",
      "resourceTypes": [
        "Other"
      ]
    }
  ],
  "total": 1
}
NameTypeDescriptionStarting Version
totalLongThe total number of IP statistics results.3.7.0
successbooleanSuccess.3.7.0
errorErrorCodeThe error code. If not null, the operation fails, or vice versa. For more information, see error3.7.0
ipStatisticsListFor more information, see ipStatistics3.7.0

error

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

ipStatistics

NameTypeDescriptionStarting Version
ipStringThe IP address.3.7.0
vipUuidStringThe VIP UUID.3.7.0
vipNameStringThe VIP name.3.7.0
vmInstanceUuidStringThe VM instance UUID.3.7.0
vmInstanceNameStringThe VM instance name.3.7.0
vmInstanceTypeStringThe VM instance type.3.7.0
applianceVmOwnerUuidStringThe network service UUID of the appliance VM instance.4.1.0
vmDefaultIpStringThe default IP of the VM instance.3.7.0
resourceTypesListThe list of resource types bound to the IP address.3.7.0
stateStringThe resource state.3.7.0
useForStringThe network service bound to the VIP.3.7.0
createDateTimestampThe creation date.3.7.0
ownerNameStringThe resource owner name.3.7.0
resourceOwnerUuidStringThe resource owner UUID.4.1.0
usedIpUuidStringThe IP UUID.4.1.0

SDK Sample

Java SDK

GetL3NetworkIpStatisticAction action = new GetL3NetworkIpStatisticAction();
action.l3NetworkUuid = "9bdd769f3e603f65bd368512ebe8b998";
action.resourceType = "All";
action.sortBy = "Ip";
action.sortDirection = "asc";
action.start = 0;
action.limit = 20;
action.replyWithCount = false;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetL3NetworkIpStatisticAction.Result res = action.call();

Python SDK

GetL3NetworkIpStatisticAction action = GetL3NetworkIpStatisticAction()
action.l3NetworkUuid = "9bdd769f3e603f65bd368512ebe8b998"
action.resourceType = "All"
action.sortBy = "Ip"
action.sortDirection = "asc"
action.start = 0
action.limit = 20
action.replyWithCount = false
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetL3NetworkIpStatisticAction.Result res = action.call()