GetInterfaceServiceTypeStatistic
API Request
URLs
GET zstack/v1/hosts/hosts-network-interfaces/service-type-statisticHeaders
Authorization: OAuth the-session-uuidCurl
Sample
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=falseRequest Parameters
| Name | Type | Location | Description | Optional Value | Starting Version |
|---|---|---|---|---|---|
| interfaceUuid | String | query | Optional. The NIC port UUID. | 4.7.11 | |
| vlanId | Integer | query | Optional. The VLAN interface ID. | 4.7.11 | |
| interfaceType | String | query | Optional. The NIC port type. |
|
4.7.11 |
| serviceType | List | query | Optional. The network type. |
|
4.7.11 |
| zoneUuid | String | query | Optional. The zone UUID. | 4.7.11 | |
| clusterUuid | String | query | Optional. The cluster UUID. | 4.7.11 | |
| hostUuid | String | query | Optional. The host UUID. | 4.7.11 | |
| sortBy | String | query | Optional. The sort method. |
|
4.7.11 |
| sortDirection | String | query | Optional. The sort direction. |
|
4.7.11 |
| start | Integer | query | Optional. The location where the statistics starts. | 4.7.11 | |
| limit | Integer | query | Optional. The count of the statistics. | 4.7.11 | |
| replyWithCount | boolean | query | Optional. Whether to return both the statistics result and count. | 4.7.11 | |
| systemTags | List | query | Optional. The system tags. | 4.7.11 | |
| userTags | List | query | Optional. The user tags. | 4.7.11 |
API Response
Sample
Response
{
"serviceTypeStatistics": [
{
"interfaceUuid": "474f9d7d7a1d3b46b8f17363dca7ebef",
"serviceTypes": [
"ManagementNetwork"
]
}
],
"total": 1
}}| Name | Type | Description | Starting Version |
|---|---|---|---|
| total | Long | The total count of the statistics. | 4.7.11 |
| success | boolean | Whether the API succeeds. | 4.7.11 |
| serviceTypeStatistics | List | See serviceTypeStatistics. | 4.7.11 |
| error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error | 4.7.11 |
#serviceTypeStatistics
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| interfaceUuid | String | The network interface UUID. | 4.7.11 |
| interfaceName | String | The network interface name. | 4.7.11 |
| vlanId | Integer | The vlan interface ID. | 4.7.11 |
| serviceTypes | List | The network type list. | 4.7.11 |
| hostUuid | String | The host UUID. | 4.7.11 |
| hostName | String | The host name. | 4.7.11 |
| hostIp | String | The host IP. | 4.7.11 |
| clusterUuid | String | The cluster UUID. | 4.7.11 |
| clusterName | String | The cluster name. | 4.7.11 |
| zoneUuid | String | The zone UUID. | 4.7.11 |
| createDate | Timestamp | The date of creation. | 4.7.11 |
#error
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| code | String | The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. | 0.6 |
| description | String | The brief description of the error. | 0.6 |
| details | String | The details about the error. | 0.6 |
| elaboration | String | The reserved field. Default value: null. | 0.6 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 0.6 |
| cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 0.6 |
SDK Sample
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()