-
响应示例 返回状态码为200:修改的防火墙设备静态路由配置。 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" : "",
"data" : {
"mask" : 22,
"destinationPrefixIp" : "10.20.0.0",
"nextHopAddress" : "10.20.0.10",
"nextInterface" : "GigabitEthernet0/0/4",
"trackIplinkId" : "ae5813f8ff1e41f5ba9c324da70b49ca",
"preference" : 5,
"id" : "de5813f8ff1e41f5ba9c324da70b49ed"
}
} 返回状态码为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
-
请求示例 HTTP的示例 PUT /controller/campus/v1/networkservice/networkconfig/net/fwstaticroute/devices/fbb684c8-0d37-496f-bafa-4b06d5151e2e/staticroute 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-yyyyyy
{
"mask" : 22,
"destinationPrefixIp" : "10.20.0.0",
"nextHopAddress" : "10.20.0.10",
"nextInterface" : "GigabitEthernet0/0/4",
"trackIplinkId" : "ae5813f8ff1e41f5ba9c324da70b49ca",
"preference" : 5,
"id" : "de5813f8ff1e41f5ba9c324da70b49ed"
}
-
URI /controller/campus/v1/networkservice/networkconfig/net/fwstaticroute/devices/{deviceId}/staticroute 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 string 36个字符。 - 设备标识,UUID格式。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e"
-
请求参数 表2 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceFwStaticRouteInfoDto 是 REFERENCE 详细请参见表3。 修改的防火墙设备静态路由配置。 - 表3 DeviceFwStaticRouteInfoDto对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 mask 是 integer [0-32] - 掩码,不允许修改。 22 destinationPrefixIp 否 string 1~15个字符。 - 目的地址,必填。必须是合法的IPv4地址,以127或者224~255开头的IP地址为非法IP地址,不允许修改。 "10.20.0.0" nextHopAddress 否 string 0~15个字符。 - 下一跳地址,必须是合法的IPv4地址,以127或者224~255开头的IP地址为非法IP地址。当nextInterface为空时,nextHopAddress必填。 "10.20.0.10" nextInterface 否 string 0~32个字符。 - 设备出接口。当nextHopAddress为空时,nextInterface必填。 "GigabitEthernet0/0/4" trackIplinkId 否 string 0~32个字符。 - IP链接ID。 "ae5813f8ff1e41f5ba9c324da70b49ca" preference 否 integer [1-255] - 优先级。取值越小,优先等级越高,不填时默认为60。 5 id 是 string 0~32个字符。 - 防火墙静态路由ID。 "de5813f8ff1e41f5ba9c324da70b49ed"
-
URI /restconf/v2/data/huawei-ac-nes-device:nes/ne/{id}/huawei-nce-e-static-routing-ipv4:static-routing-ipv4/{destination-prefix}/{vpn-instance}/{next-hop-type} 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 id 是 string 36个字符。满足正则表达[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}。 - 设备ID。 "00000000-0000-0000-0000-000000000000" destination-prefix 是 string 满足正则表达(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/(([0-9])|([1-2][0-9])|(3[0-2]))。 - IPv4目的网段/掩码,联合主键字段。 "10.1.1.0/24" vpn-instance 是 string 1~31个字符。 - VPN,联合主键字段。 "vpn1" next-hop-type 是 string Ip Interface IpInterface black_hole - 下一跳类型,联合主键字段。 "Ip"
-
请求示例 HTTP的示例 PATCH /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-static-routing-ipv4:static-routing-ipv4/10.1.1.0%2F24/vpn1/Ip 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
restconf-transaction-id: "00000000-0000-0000-0000-000000000000"
{
"huawei-nce-e-static-routing-ipv4:static-routing-ipv4" : {
"destination-prefix" : "10.1.1.0/24",
"vpn-instance" : "vpn1",
"next-hop-type" : "Ip",
"next-hop-addresses" : [
{
"address" : "10.1.1.1",
"preference" : 10,
"track-setting" : "nqa",
"nqa" : "test",
"bfd-enable" : true
}
],
"next-hop-interfaces" : [
{
"interface" : "GE0/0/1",
"preference" : 10,
"dhcp-enable" : true,
"track-setting" : "nqa",
"nqa" : "test"
}
],
"next-hop-interface-addresses" : [
{
"address" : "10.1.1.1",
"interface" : "GE0/0/1",
"preference" : 10,
"track-setting" : "nqa",
"nqa" : "test",
"bfd-enable" : true
}
]
}
}
-
请求参数 表2 header参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 restconf-transaction-id 是 string - - 事务ID。 "00000000-0000-0000-0000-000000000000" 表3 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-e-static-routing-ipv4:static-routing-ipv4 是 REFERENCE 详细请参见表4。 IPv4静态路由配置参数。 -
-
响应示例 返回状态码为200:操作成功。 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
返回状态码为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
-
请求示例 HTTP的示例 PUT /controller/campus/v1/sdwan/routing-protocol/static 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
{
"routes" : [
{
"id" : "a99f794e-b510-438c-a75d-de59f02347eb",
"vpnId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"siteId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"deviceId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"tnpId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"priority" : 1,
"destinationAddressMask" : "10.1.0.0/16",
"nextHopType" : "ip-address",
"ipAddress" : "10.1.1.1",
"track" : true,
"target" : "10.1.0.0",
"configSource" : "Wan",
"isDefaultVpn" : false,
"outBoundInterface" : "Tunnel0/0/400",
"outBoundInterfaceDisplayName" : "GE0/0/2",
"outBoundInterfaceType" : "IPSec"
}
]
}
-
响应示例 返回状态码为200:接口调用成功,响应体参考StaticRouteResponse。 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" : "",
"success" : [
{
"id" : "a99f794e-b510-438c-a75d-de59f02347eb",
"vpnId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"siteId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"deviceId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"tnpId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"priority" : 1,
"destinationAddressMask" : "10.1.0.0/16",
"nextHopType" : "ip-address",
"ipAddress" : "10.1.1.1",
"track" : true,
"target" : "10.1.0.0",
"configSource" : "Wan",
"isDefaultVpn" : false,
"outBoundInterface" : "Tunnel0/0/400",
"outBoundInterfaceDisplayName" : "GE0/0/2",
"outBoundInterfaceType" : "IPSec"
}
],
"fail" : [
{
"errcode" : "0",
"errmsg" : "",
"data" : {
"id" : "a99f794e-b510-438c-a75d-de59f02347eb",
"vpnId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"siteId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"deviceId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"tnpId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"priority" : 1,
"destinationAddressMask" : "10.1.0.0/16",
"nextHopType" : "ip-address",
"ipAddress" : "10.1.1.1",
"track" : true,
"target" : "10.1.0.0",
"configSource" : "Wan",
"isDefaultVpn" : false,
"outBoundInterface" : "Tunnel0/0/400",
"outBoundInterfaceDisplayName" : "GE0/0/2",
"outBoundInterfaceType" : "IPSec"
}
}
]
} 返回状态码为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:查询的防火墙设备静态路由配置。 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" : "",
"data" : {
"pageIndex" : 1,
"pageSize" : 20,
"totalRecords" : 10,
"deviceFwStaticRoutePolicys" : [
{
"mask" : 22,
"destinationPrefixIp" : "10.20.0.0",
"nextHopAddress" : "10.20.0.10",
"nextInterface" : "GigabitEthernet0/0/4",
"trackIplinkId" : "ae5813f8ff1e41f5ba9c324da70b49ca",
"preference" : 5,
"id" : "de5813f8ff1e41f5ba9c324da70b49ed"
}
]
}
} 返回状态码为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
-
响应参数 返回状态码为200:查询的防火墙设备静态路由配置。 表3 GetFwStaticRouteResponseDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 "" data REFERENCE 详细请参见表4。 - - 表4 FwStaticRouteInfoDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 pageIndex integer [1-65535] - 页面索引。 1 pageSize integer [1-1000] - 每页显示记录数。 20 totalRecords integer [1-65535] - 总记录数。 10 deviceFwStaticRoutePolicys ARRAY_REFERENCE 0-100个列表项,详细请参见表5。 防火墙设备静态路由配置信息。 - 返回状态码为400:校验失败信息。 详细信息请参见实际响应消息体。
-
URI /controller/campus/v1/networkservice/networkconfig/net/fwstaticroute/devices/{deviceId}/staticroute 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 string 36个字符。 - 设备标识,UUID格式。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" 表2 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 pageIndex 是 integer [1-65535] - 页面索引。 1 pageSize 是 integer [1-1000] - 每页显示记录数。 20
-
请求示例 HTTP的示例 GET /controller/campus/v1/networkservice/networkconfig/net/fwstaticroute/devices/fbb684c8-0d37-496f-bafa-4b06d5151e2e/staticroute?pageIndex=1&pageSize=20 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
-
响应示例 返回状态码为200:操作成功。 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
返回状态码为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