Get Candidate Interface VLAN Sub-interface Information

GET/zstack/v1/host/network-interface-vlan-ids

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/host/network-interface-vlan-ids?interfaceUuids=d25e83af6ccf3d9ca8baa1702861a0c8&limit=1000&start=0

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
interfaceUuidsListqueryNIC UUID 4.7.11
limit (optional)Integerquery  4.7.11
start (optional)Integerquery  4.7.11
systemTags (optional)ListquerySystem tag 4.7.11
userTags (optional)ListqueryUser tag 4.7.11

API Response

Response Example

{
  "vlanIds": [
    1,
    2
  ]
}
NameTypeDescriptionStarting Version
vlanIdsListVLAN interface ID4.7.11
successboolean 4.7.11
errorErrorCodeError code. If not null, the operation failed. If null, the operation succeeded. See details error4.7.11

error

NameTypeDescriptionStarting Version
codeStringError code number, globally unique identifier of the error, e.g. SYS.1000, HOST.10010.6
descriptionStringBrief description of the error0.6
detailsStringDetailed error information0.6
elaborationStringReserved field, default is null0.6
opaqueLinkedHashMapReserved field, default is null0.6
causeErrorCodeRoot cause, the error that caused the current error. If there is no original error, this field is null0.6

SDK Examples

Java SDK

GetCandidateInterfaceVlanIdsAction action = new GetCandidateInterfaceVlanIdsAction();
action.interfaceUuids = asList("d25e83af6ccf3d9ca8baa1702861a0c8");
action.limit = 1000;
action.start = 0;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetCandidateInterfaceVlanIdsAction.Result res = action.call();

Python SDK

GetCandidateInterfaceVlanIdsAction action = GetCandidateInterfaceVlanIdsAction()
action.interfaceUuids = [d25e83af6ccf3d9ca8baa1702861a0c8]
action.limit = 1000
action.start = 0
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetCandidateInterfaceVlanIdsAction.Result res = action.call()