GetInterfaceServiceTypeStatistic

API Request

URLs
GET zstack/v1/hosts/hosts-network-interfaces/service-type-statistic
Headers
Authorization: OAuth the-session-uuid
Curl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/hosts/hosts-network-interfaces/service-type-statistic? \
interfaceUuid=d8797841479d3951bcb698164b56bd9e&interfaceType=All&sortBy=CreateDate&sortDirection=asc&start=0&limit=20&replyWithCount=false
Parameter List
Name Type Location Description Allowed Values Starting Version
interfaceUuid (optional) String query Host NIC UUID 4.7.11
vlanId (optional) Integer query VLAN interface ID 4.7.11
interfaceType (optional) String query NIC type
  • All
  • Interface
  • Bonding
4.7.11
serviceType (optional) List query Network type to count
  • All
  • ManagementNetwork
  • TenantNetwork
  • StorageNetwork
  • MigrationNetwork
  • BackupNetwork
4.7.11
zoneUuid (optional) String query Data Center UUID 4.7.11
clusterUuid (optional) String query Cluster UUID 4.7.11
hostUuid (optional) String query Host UUID 4.7.11
sortBy (optional) String query Sort by
  • InterfaceName
  • VlanId
  • HostIp
  • HostName
  • ClusterName
  • CreateDate
4.7.11
sortDirection (optional) String query Sort direction
  • asc
  • desc
4.7.11
start (optional) Integer query Statistic result start offset 4.7.11
limit (optional) Integer query Statistic result count 4.7.11
replyWithCount (optional) boolean query Whether to return total count of results 4.7.11
systemTags (optional) List query System tag 4.7.11
userTags (optional) List query User tag 4.7.11

API Response

Response Example
{
  "serviceTypeStatistics": [
    {
      "interfaceUuid": "474f9d7d7a1d3b46b8f17363dca7ebef",
      "serviceTypes": [
        "ManagementNetwork"
      ]
    }
  ],
  "total": 1
}}
Name Type Description Starting Version
total Long Total count of statistic results 4.7.11
success boolean Success 4.7.11
serviceTypeStatistics List See details serviceTypeStatistics 4.7.11
error ErrorCode Error code. If not null, the operation failed. If null, the operation succeeded. See details error 4.7.11
#serviceTypeStatistics
Name Type Description Starting Version
interfaceUuid String NIC UUID 4.7.11
interfaceName String NIC name 4.7.11
vlanId Integer VLAN interface ID 4.7.11
serviceTypes List Network type set 4.7.11
hostUuid String Host UUID 4.7.11
hostName String Host name 4.7.11
hostIp String Host IP 4.7.11
clusterUuid String Cluster UUID 4.7.11
clusterName String Cluster name 4.7.11
zoneUuid String Data Center UUID 4.7.11
createDate Timestamp Creation time 4.7.11
#error
Name Type Description Starting Version
code String Error code number, globally unique identifier of the error, e.g. SYS.1000, HOST.1001 4.7.11
description String Brief description of the error 4.7.11
details String Detailed error information 4.7.11
elaboration String Reserved field, default is null 4.7.11
opaque LinkedHashMap Reserved field, default is null 4.7.11
cause ErrorCode Root cause, the error that caused the current error. If there is no original error, this field is null 4.7.11

SDK Examples

Java SDK
GetInterfaceServiceTypeStatisticAction action = new GetInterfaceServiceTypeStatisticAction();
action.interfaceUuid = "d8797841479d3951bcb698164b56bd9e";
action.interfaceType = "All";
action.sortBy = "CreateDate";
action.sortDirection = "asc";
action.start = 0;
action.limit = 20;
action.replyWithCount = false;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetInterfaceServiceTypeStatisticAction.Result res = action.call();
Python SDK
GetInterfaceServiceTypeStatisticAction action = GetInterfaceServiceTypeStatisticAction()
action.interfaceUuid = "d8797841479d3951bcb698164b56bd9e"
action.interfaceType = "All"
action.sortBy = "CreateDate"
action.sortDirection = "asc"
action.start = 0
action.limit = 20
action.replyWithCount = false
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetInterfaceServiceTypeStatisticAction.Result res = action.call()
API Reference | ZStack ZSphere · ZVF | ZStack Resource Center