文档目录

获取网口交集子接口信息(GetCandidateInterfaceVlanIds)

API请求

URLs

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

Headers

Authorization: OAuth the-session-uuid

Curl示例

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

参数列表

名字 类型 位置 描述 可选值 起始版本
interfaceUuids List query 网口UUID 4.7.11
limit (可选) Integer query 4.7.11
start (可选) Integer query 4.7.11
systemTags (可选) List query 系统标签 4.7.11
userTags (可选) List query 用户标签 4.7.11

API返回

返回示例

{
    "vlanIds": [
        1010,
        1011,
        10,
        11,
        2000,
        1101,
        1110,
        1108,
        1107,
        1109,
        1106,
        1103,
        1102,
        1105,
        1104,
        0
    ],
    "success": true
}
名字 类型 描述 起始版本
vlanIds List vlan接口ID 4.7.11
success boolean 4.7.11
error ErrorCode 错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error 4.7.11

#error

名字 类型 描述 起始版本
code String 错误码号,错误的全局唯一标识,例如SYS.1000, HOST.1001 0.6
description String 错误的概要描述 4.7.11
details String 错误的详细信息 4.7.11
elaboration String 保留字段,默认为null 4.7.11
opaque LinkedHashMap 保留字段,默认为null 4.7.11
cause ErrorCode 根错误,引发当前错误的源错误,若无原错误,该字段为null 4.7.11

SDK示例

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

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