Document navigation

GetHostNetworkFacts

API Request

URLs
GET zstack/v1/hosts/network-facts/{hostUuid}
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/hosts/network-facts/9397de8c860231c08b87031e226c691b
Request Parameters
Name Type Location Description Optional Value Starting Version
hostUuid String url The host UUID. 3.5.0
systemTags List query Optional. The system tags. 3.5.0
userTags List query Optional. The user tags. 3.5.0

API Response

Sample Response
{
  "bondings": [
    {
      "uuid": "c1ff34db684e3b8785572902ef99efea",
      "hostUuid": "e336fa8ef9283fe4a4d746957284379a",
      "bondingName": "bond0",
      "mode": "active-backup 1",
      "xmitHashPolicy": "layer2 0",
      "miiStatus": "up",
      "mac": "ac:1f:6b:93:6c:8c",
      "ipAddresses": [
        "172.20.0.116/16"
      ],
      "miimon": 100.0,
      "allSlavesActive": true,
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM",
      "slaves": [
        {
          "uuid": "08643629c29d34a0a4a2d858b49a41a4",
          "hostUuid": "e336fa8ef9283fe4a4d746957284379a",
          "bondingUuid": "c1ff34db684e3b8785572902ef99efea",
          "interfaceName": "eno1",
          "interfaceType": "bondingSlave",
          "speed": 1000.0,
          "slaveActive": true,
          "carrierActive": true,
          "mac": "ac:1f:6b:93:6c:8c",
          "createDate": "Nov 14, 2017 10:20:57 PM",
          "lastOpDate": "Nov 14, 2017 10:20:57 PM"
        },
        {
          "uuid": "14ca7ad13e573cfdb6f929b12b750553",
          "hostUuid": "e336fa8ef9283fe4a4d746957284379a",
          "bondingUuid": "c1ff34db684e3b8785572902ef99efea",
          "interfaceName": "eno2",
          "interfaceType": "bondingSlave",
          "speed": 1000.0,
          "slaveActive": false,
          "carrierActive": false,
          "mac": "ac:1f:6b:93:6c:8c",
          "createDate": "Nov 14, 2017 10:20:57 PM",
          "lastOpDate": "Nov 14, 2017 10:20:57 PM"
        }
      ]
    }
  ],
  "nics": [
    {
      "uuid": "08643629c29d34a0a4a2d858b49a41a4",
      "hostUuid": "e336fa8ef9283fe4a4d746957284379a",
      "bondingUuid": "c1ff34db684e3b8785572902ef99efea",
      "interfaceName": "eno1",
      "interfaceType": "bondingSlave",
      "speed": 1000.0,
      "slaveActive": true,
      "carrierActive": true,
      "mac": "ac:1f:6b:93:6c:8c",
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM"
    },
    {
      "uuid": "14ca7ad13e573cfdb6f929b12b750553",
      "hostUuid": "e336fa8ef9283fe4a4d746957284379a",
      "bondingUuid": "c1ff34db684e3b8785572902ef99efea",
      "interfaceName": "eno2",
      "interfaceType": "bondingSlave",
      "speed": 1000.0,
      "slaveActive": false,
      "carrierActive": false,
      "mac": "ac:1f:6b:93:6c:8c",
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM"
    },
    {
      "uuid": "8d871eb89020363ebc764ed41be4c213",
      "hostUuid": "e336fa8ef9283fe4a4d746957284379a",
      "interfaceName": "ens2f0",
      "interfaceType": "noMaster",
      "speed": 1000.0,
      "slaveActive": true,
      "carrierActive": true,
      "ipAddresses": [
        "169.254.0.115/24"
      ],
      "mac": "98:03:9b:00:ea:f2",
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM"
    },
    {
      "uuid": "d39d0eead2d53e47a8f7b3aca375c1d3",
      "hostUuid": "e336fa8ef9283fe4a4d746957284379a",
      "interfaceName": "ens2f1",
      "interfaceType": "bridgeSlave",
      "speed": 1000.0,
      "slaveActive": false,
      "carrierActive": false,
      "mac": "98:03:9b:00:ea:f3",
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM"
    }
  ]
}
Name Type Description Starting Version
success boolean 3.5.0
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 3.5.0
bondings List See bondings. 3.5.0
nics List See nics. 3.5.0
error ErrorCode See error. 3.5.0
#error
Name Type Description Starting Version
code String The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. 3.5.0
description String The brief description of the error. 3.5.0
details String The details about the error. 3.5.0
elaboration String The reserved field. Default value: null. 3.5.0
opaque LinkedHashMap The reserved field. Default value: null. 3.5.0
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 3.5.0
#bondings
Name Type Description Starting Version
uuid String The resource UUID. 3.5.0
hostUuid String The host UUID. 3.5.0
bondingName String The bond name. 3.5.0
mode String The bond mode. 3.5.0
xmitHashPolicy String The hash policy. 3.5.0
miiStatus String The MII status. 3.5.0
mac String The MAC address. 3.5.0
ipAddresses List The IP address. 3.5.0
miimon Long The MII monitoring interval. 3.5.0
allSlavesActive Boolean 3.5.0
createDate Timestamp The creation date. 3.5.0
lastOpDate Timestamp The last operation date. 3.5.0
slaves List See slaves. 3.5.0
#slaves
Name Type Description Starting Version
uuid String The resource UUID. 3.5.0
hostUuid String The host UUID. 3.5.0
bondingUuid String The bond UUID. 3.5.0
interfaceName String The interface name. 3.5.0
interfaceType String The interface type. Options: nomaster, bridgeSlave, and bondSlave. 3.5.0
speed Long The interface speed. 3.5.0
slaveActive Boolean The bond link status. 3.5.0
carrierActive Boolean The physical link status. 3.5.0
ipAddresses List The IP address. 3.5.0
mac String The MAC address. 3.5.0
pciDeviceAddress String The PCI address of the interface. 3.5.0
createDate Timestamp The creation date. 3.5.0
lastOpDate Timestamp The last operation date. 3.5.0
#nics
Name Type Description Starting Version
uuid String The resource UUID. 3.5.0
hostUuid String The host UUID. 3.5.0
bondingUuid String The bond UUID. 3.5.0
interfaceName String The interface name. 3.5.0
interfaceType String The interface type. Options: nomaster, bridgeSlave, and bondSlave. 3.5.0
speed Long The interface speed. 3.5.0
slaveActive Boolean The bond link status. 3.5.0
carrierActive Boolean The physical link status. 3.5.0
ipAddresses List The IP address. 3.5.0
mac String The MAC address. 3.5.0
pciDeviceAddress String The PCI address of the interface. 3.5.0
createDate Timestamp The creation date. 3.5.0
lastOpDate Timestamp The last operation date. 3.5.0
#error
Name Type Description Starting Version
code String The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. 3.5.0
description String The brief description of the error. 3.5.0
details String The details about the error. 3.5.0
elaboration String The reserved field. Default value: null. 3.5.0
opaque LinkedHashMap The reserved field. Default value: null. 3.5.0
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 3.5.0

SDK Sample

Java SDK
GetHostNetworkFactsAction action = new GetHostNetworkFactsAction();
action.hostUuid = "9397de8c860231c08b87031e226c691b";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetHostNetworkFactsAction.Result res = action.call();
Python SDK
GetHostNetworkFactsAction action = GetHostNetworkFactsAction()
action.hostUuid = "9397de8c860231c08b87031e226c691b"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetHostNetworkFactsAction.Result res = action.call()
API Reference | 5.5.30 | ZStack Cloud · ZCF | ZStack Resource Center