Document navigation

GetCandidateNetworkInterfaces

API Request

URLs

GET zstack/v1/cluster/hosts-network-interfaces

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/cluster/hosts-network-interfaces?hostUuids=5712f3960ae23d24988f4e091bf5704f&slaveOnly=true&limit=1000&start=0

Request Parameters

Name Type Location Description Optional Value Starting Version
hostUuids List query The host UUIDs. 4.7.0
limit Integer query Optional. 4.7.0
start Integer query Optional. 4.7.0
systemTags List query Optional. The system tags. 4.7.0
userTags List query Optional. The user tags. 4.7.0
slaveOnly (Optional) boolean query Whether to obtain the information of slave network interfaces only. 4.7.11

API Response

Sample Response

{
  "slaveNames": [
    "eth0",
    "eth1"
  ]
}
Name Type Description Starting Version
slaveUuids List The slave interface UUIDs. 4.7.0
success boolean Whether the operation succeeded. 4.7.0
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 4.7.0

#error

Name Type Description Starting Version
description String The brief description of the error. 4.7.0
details String The details about the error. 4.7.0
elaboration String The reserved field. Default value: null. 4.7.0
opaque LinkedHashMap The reserved field. Default value: null. 4.7.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. 4.7.0
code String The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. 4.7.0

SDK Sample

Java SDK

GetCandidateNetworkInterfacesAction action = new GetCandidateNetworkInterfacesAction();
action.hostUuids = asList("5712f3960ae23d24988f4e091bf5704f");
action.slaveOnly = true;
action.limit = 1000;
action.start = 0;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetCandidateNetworkInterfacesAction.Result res = action.call();

Python SDK

action = GetCandidateNetworkInterfacesAction()
action.hostUuids = [5712f3960ae23d24988f4e091bf5704f]
action.slaveOnly = true
action.limit = 1000
action.start = 0
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()