-
响应参数 返回状态码为200:查询成功,响应体参考GetMacTableOutputDto。 表4 GetMacTableOutputDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码: 当没有错误时返回0 "0" errmsg string 0~256个字符。 - 接口调用结果的描述信息。 "查询失败" table ARRAY_REFERENCE 0-200个列表项,详细请参见表5。 MAC表项结果。 - nextPage boolean true false - 是否有下一页 "true" totalCount integer - - MAC表项信息总数。 10 表5 MacTableDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 macAddr string - - mac地址。格式:XX-XX-XX-XX-XX-XX。 "xx-xx-xx-xx-xx-xx" idType string - - 转发域类型。取值范围:bd(查询bd类型转发域的mac),vlan(查询vlan类型转发域的mac),vsi(查询bd类型转发域的mac)。 "vlan" id string - - 转发域的vlan值。 "1" macType string - - mac类型。取值范围:dynamic(动态),sticky(),security(安全)。 "dynamic" forwardingInterface string - - 接口号。 "XGigabitEthernet0/0/1" 返回状态码为400:校验异常,无响应体。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误,无响应体。 详细信息请参见实际响应消息体。
-
响应示例 返回状态码为200:查询成功,响应体参考GetMacTableOutputDto。 HTTP/1.1 200 OK
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"errcode" : "0",
"errmsg" : "查询失败",
"table" : [
{
"macAddr" : "xx-xx-xx-xx-xx-xx",
"idType" : "vlan",
"id" : "1",
"macType" : "dynamic",
"forwardingInterface" : "XGigabitEthernet0/0/1"
}
],
"nextPage" : "true",
"totalCount" : 10
} 返回状态码为400:校验异常,无响应体。 HTTP/1.1 400 Bad Request
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
返回状态码为500:内部错误,无响应体。 HTTP/1.1 500 Internal Server Error
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
-
URI /controller/campus/v1/oamservice/mactable/{deviceId}/{rType} 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 string - - 设备ID,UUID格式。 "00000000-0000-0000-0000-000000000000" rType 是 string - - 分页参数。first代表第一页,next代表下一页。使用next需要在additionalInfo填入当前页的最后一条mac信息。 "first"
-
请求示例 HTTP的示例 POST /controller/campus/v1/oamservice/mactable/00000000-0000-0000-0000-000000000000/first HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-AC
CES S-TOKEN: x-yyyy
{
"searchType" : "all",
"macAddr" : "",
"idType" : "",
"id" : "",
"interfaceId" : "",
"num" : 10
}
-
请求参数 表2 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 additionalInfo 是 REFERENCE 详细请参见表3。 请求参数 - 表3 MacInput对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 searchType 是 string - - 查询类型,该字段可以设置为以下几种: a) all:全部查询 b) interface:按端口查询 c) vlan:按转发域查询 d) mac:按mac地址查询 "all" macAddr 否 string - - mac地址,格式仅支持XX-XX-XX-XX-XX-XX。 当searchType字段是mac时,必须设置该字段。 "xx-xx-xx-xx-xx-xx" idType 否 string - - 转发域类型。 当searchType字段是vlan时,必须设置该字段,该字段可以设置为以下几种: a) bd:查询bd类型转发域的mac b) vlan:查询bd类型转发域的mac c) vsi:查询vsi类型转发域的mac "vlan" id 否 string - - 转发域的vlan值。 当searchType字段是vlan时,必须设置该字段。 "1" interfaceId 否 string - - 端口号。 当searchType字段是interface时,必须设置该字段。 "XGigabitEthernet0/0/1" num 否 integer [10-200] 10 单次查询数量。默认值为10。 10
-
响应示例 返回状态码为200:清楚成功,响应体参考ResetResponse。 HTTP/1.1 200 OK
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"errcode" : "0",
"errmsg" : ""
} 返回状态码为400:校验异常,无响应体。 HTTP/1.1 400 Bad Request
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
返回状态码为500:内部错误,无响应体。 HTTP/1.1 500 Internal Server Error
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
-
响应参数 返回状态码为200:清楚成功,响应体参考ResetResponse。 表4 ResetResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" 返回状态码为400:校验异常,无响应体。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误,无响应体。 详细信息请参见实际响应消息体。
-
请求参数 表2 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 additionalInfo 是 REFERENCE 详细请参见表3。 请求参数 - 表3 MacDeleteInput对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 searchType 是 string - - 删除类型。该字段可以设置为以下几种: a) all:全部删除 b) interface:按端口删除 c) vlan:按转发域删除 d) mac:按mac地址删除 "all" macAddr 否 string - - mac地址,格式仅支持XX-XX-XX-XX-XX-XX。 当searchType字段是mac时,必须设置该字段,否则该字段必须为空。 "xx-xx-xx-xx-xx-xx" idType 否 string - - 转发域类型。 当searchType字段是vlan时,必须设置该字段,该字段可以设置为以下几种: a) bd:删除bd类型转发域的mac b) vlan:删除bd类型转发域的mac c) vsi:删除vsi类型转发域的mac 否则必须为空。 "vlan" id 否 string - - 转发域的vlan值。 当searchType字段是vlan时,必须设置该字段,否则必须为空。 "1" interfaceId 否 string - - 端口号。 当searchType字段是interface时,必须设置该字段,否则必须为空。 "XGigabitEthernet0/0/1" macType 是 string all sticky - mac类型。 "all"
-
请求示例 HTTP的示例 POST /controller/campus/v1/oamservice/mactable/00000000-0000-0000-0000-000000000000/batch-delete HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-yyyyyy
{
"searchType" : "all",
"macAddr" : "xx-xx-xx-xx-xx-xx",
"idType" : "vlan",
"id" : "1",
"interfaceId" : "XGigabitEthernet0/0/1",
"macType" : "all"
}