Get Physical Interface Network Service Type Information

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
}}
NameTypeDescriptionStarting Version
totalLongTotal count of statistic results4.7.11
successbooleanSuccess4.7.11
serviceTypeStatisticsListSee details serviceTypeStatistics4.7.11
errorErrorCodeError code. If not null, the operation failed. If null, the operation succeeded. See details error4.7.11

serviceTypeStatistics

NameTypeDescriptionStarting Version
interfaceUuidStringNIC UUID4.7.11
interfaceNameStringNIC name4.7.11
vlanIdIntegerVLAN interface ID4.7.11
serviceTypesListNetwork type set4.7.11
hostUuidStringHost UUID4.7.11
hostNameStringHost name4.7.11
hostIpStringHost IP4.7.11
clusterUuidStringCluster UUID4.7.11
clusterNameStringCluster name4.7.11
zoneUuidStringData Center UUID4.7.11
createDateTimestampCreation time4.7.11

error

NameTypeDescriptionStarting Version
codeStringError code number, globally unique identifier of the error, e.g. SYS.1000, HOST.10014.7.11
descriptionStringBrief description of the error4.7.11
detailsStringDetailed error information4.7.11
elaborationStringReserved field, default is null4.7.11
opaqueLinkedHashMapReserved field, default is null4.7.11
causeErrorCodeRoot cause, the error that caused the current error. If there is no original error, this field is null4.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()