华为云用户手册

  • 请求示例 HTTP的示例 POST /controller/campus/v1/sdwan/policy/traffic/redirect-policy/sites/00000000-0000-0000-0000-000000000000 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 { "vpnId" : "00000000-0000-0000-0000-000000000000", "fullReplace" : true, "redirectPolicies" : [ { "id" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "deviceName" : "设备1", "policyName" : "redirect1", "devicePolicyName" : "pbr_devciePolicyName_1", "portType" : "EvpnTunnel", "portId" : "00000000-0000-0000-0000-000000000000", "portName" : "redirect1", "direction" : "inbound", "description" : "描述", "redirectRules" : [ { "ruleId" : "00000000-0000-0000-0000-000000000000", "priority" : 1, "classificationId" : "00000000-0000-0000-0000-000000000000", "classificationName" : "流分类模板1", "behaviorId" : "00000000-0000-0000-0000-000000000000", "behaviorName" : "Behavior", "behaviorAction" : "permit" } ] } ] }
  • 请求参数 表2 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 redirectPolicyInfos 是 REFERENCE 详细请参见表3。 创建重定向策略请求数据。 - 表3 RedirectPolicyInfos对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 vpnId 是 uuid - - VPN ID,必填。 "00000000-0000-0000-0000-000000000000" fullReplace 否 boolean true false false 仅更新操作有效,false增量更新redirectRules,true全量更新redirectRules,默认值false。 true redirectPolicies 否 ARRAY_REFERENCE 1-100个列表项,详细请参见表4。 重定向策略列表 - 表4 RedirectPolicyInfo对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 id 否 uuid - - 策略ID,修改或删除的时候必填。 "00000000-0000-0000-0000-000000000000" deviceId 否 uuid - - 设备ID,创建的时候必填。 "00000000-0000-0000-0000-000000000000" deviceName 否 string 0~64个字符。 - 设备名称,无需填写,仅查询时使用。 "设备1" policyName 否 string 0~64个字符。 - 策略名称,创建的时候必填。 "redirect1" devicePolicyName 否 string 0~15个字符。 - 设备上的策略名称。 创建时如不填写,将自动生成以“redirect_”开头的名称; 如填写,区分大小写,不能包含空格、?、-、"及“redirect_”开头的名称; 不允许修改。 "pbr_devciePolicyName_1" portType 否 string EvpnTunnel InterworkingTunnel LanInterface InterCPELink - 接口类型,创建时必填。 "EvpnTunnel" portId 否 uuid - - LAN侧接口ID,仅当portType为LanInterface时有效,创建时必填。 "00000000-0000-0000-0000-000000000000" portName 否 string 0~128个字符。 - LAN侧接口名称,无需填写,仅查询时使用。 "redirect1" direction 否 string 7~8个字符。 - 策略方向,取值范围:inbound、outbound。非必填,创建时不填表示inbound,修改时不填表示保持修改前的值不变。 "inbound" description 否 string 0~64个字符。 - 描述 "描述" redirectRules 否 ARRAY_REFERENCE 0-100个列表项,详细请参见表5。 Redirect规则,创建的时候必填。 - 表5 RedirectRule对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 ruleId 否 uuid - - RedirectRule ID。修改时,若ruleId为空,表示向重定向策略添加一条Rule;若ruleId不为空,表示修改对应的Rule。 "00000000-0000-0000-0000-000000000000" priority 否 int32 [1-5000] - 优先级,范围1到5000,1高,5000低,建议步长10,创建的时候必填。 1 classificationId 否 uuid - - 流分类模板ID,创建的时候必填。 "00000000-0000-0000-0000-000000000000" classificationName 否 string 0~64个字符。 - 流分类模板名称,无需填写,仅查询时使用。 "流分类模板1" behaviorId 否 uuid - - 重定向策略行为模板ID。 与behaviorAction不能同时配置,且创建时必须配置其中一个。 "00000000-0000-0000-0000-000000000000" behaviorName 否 string 0~64个字符。 - 重定向策略行为模板名称,无需填写,仅查询时使用。 "Behavior" behaviorAction 否 string 4~6个字符。 - 重定向策略行为动作,取值范围:permit(允许)、deny(拒绝),区分大小写。 与behaviorId不能同时配置,且创建时必须配置其中一个。 "permit"
  • 请求示例 HTTP的示例 DELETE /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-nvo3:nvo3/Nve1 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"
  • 响应示例 返回状态码为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
  • URI /restconf/v2/data/huawei-ac-nes-device:nes/ne/{id}/huawei-nce-e-nvo3:nvo3/{source-nve} 表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" source-nve 是 string 1~63个字符。 - 源端接口,仅支持NVE口,单一主键字段。 "Nve1"
  • 响应示例 返回状态码为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 { "id" : "3814d9aa-8d46-42ee-9194-dc17d0c21888", "account" : "support_e@huawei.com" } 返回状态码为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 返回状态码为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
  • 接口约束 该接口支持msp视图下,角色为“Open Api Operator”的用户访问,必须在用户会话建立后使用,且仅支持AR6700V和AR6700V子设备; 或者支持租户视图或msp代维视图下,角色为“Open Api Operator”的用户访问,必须在用户会话建立后使用,且仅支持AR6700V-L款型。 该API可能会直接或间接影响现网业务运行,导致业务中断、关键数据丢失等,请谨慎操作!
  • URI /restconf/v2/data/huawei-ac-nes-device:nes/ne/{id}/huawei-nce-e-static-routing-ipv4:static-routing-ipv4 表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"
  • 请求示例 HTTP的示例 DELETE /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-static-routing-ipv4:static-routing-ipv4 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"
  • 响应示例 返回状态码为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" : "", "pageIndex" : 1, "pageSize" : 5, "totalRecords" : 10, "data" : { "LswSourceIpDtoList" : [ { "devId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "devName" : "S5735-L48P4X-A", "esn" : "21980109442SL4600798" } ] } } 返回状态码为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的示例 POST /controller/campus/api/v1/lsw/sites/fbb684c8-0d37-496f-bafa-4b06d5151e2e/unsourceip 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 { "pageIndex" : 20, "pageSize" : 20, "queryValue" : "dev1", "sortField" : "-name" }
  • 响应参数 返回状态码为200:操作成功。 表3 QueryLswSourceIpUnConfigOutDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 "" pageIndex int32 [1-500] - 页码。 1 pageSize int32 [5-100] - 页面条数。 5 totalRecords int32 [0-5000] - 总条数。 10 data REFERENCE 详细请参见表4。 - - 表4 LswSourceIpUnConfigDtoByPage对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 LswSourceIpDtoList ARRAY_REFERENCE 0-5000个列表项,详细请参见表5。 交换机source-ip分页未配置实体信息。 - 表5 LswSourceIpUnConfigDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 devId string 36个字符。 - 配置的设备Id。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" devName string 0~64个字符。 - 配置的设备名称。 "S5735-L48P4X-A" esn string 12~20个字符。 - 配置的设备ESN。 "21980109442SL4600798" 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:修改成功,响应体参考DynamicQosPolicyResponse。 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" : { "id" : "00000000-0000-0000-0000-000000000000", "name" : "qos1", "peerSites" : [ { "siteId" : "00000000-0000-0000-0000-000000000000", "siteName" : "templateName", "bandwidth" : 10 } ], "dynamicQosRules" : [ { "qosRuleId" : "00000000-0000-0000-0000-000000000000", "qosClassificationId" : "00000000-0000-0000-0000-000000000000", "qosClassificationName" : "qosClassificationName", "qosProfileId" : "00000000-0000-0000-0000-000000000000", "qosProfileName" : "templateName", "qosPriority" : 1 } ], "adaptiveQosEnable" : false, "adaptiveQosInfo" : { "period" : 10, "linkBandwidthLowerThreshold" : 1, "appBandwidthLowerThreshold" : 1, "packetLossThreshold" : 1 } } } 返回状态码为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/policy/traffic/dynamic/qos/00000000-0000-0000-0000-000000000000 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 { "id" : "00000000-0000-0000-0000-000000000000", "name" : "qos1", "peerSites" : [ { "siteId" : "00000000-0000-0000-0000-000000000000", "siteName" : "templateName", "bandwidth" : 10 } ], "dynamicQosRules" : [ { "qosRuleId" : "00000000-0000-0000-0000-000000000000", "qosClassificationId" : "00000000-0000-0000-0000-000000000000", "qosClassificationName" : "qosClassificationName", "qosProfileId" : "00000000-0000-0000-0000-000000000000", "qosProfileName" : "templateName", "qosPriority" : 1 } ], "adaptiveQosEnable" : false, "adaptiveQosInfo" : { "period" : 10, "linkBandwidthLowerThreshold" : 1, "appBandwidthLowerThreshold" : 1, "packetLossThreshold" : 1 } }
  • 响应示例 返回状态码为201:创建成功,响应体参考CommonRestResponse。 HTTP/1.1 201 Created 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" : { "siteId" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "aclNum" : 2100, "type" : "IPv4", "ruleList" : [ { "ruleId" : 10, "operateType" : 1, "ipRange" : "192.168.1.1/16" } ] } } 返回状态码为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
  • 响应参数 返回状态码为201:创建成功,响应体参考CommonRestResponse。 表4 CommonRestResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errCode string 0~10个字符。 - 错误码。 "0" errMsg string 0~255个字符。 - 错误描述。 "" data REFERENCE 详细请参见表5。 ACL信息。 - 表5 BasicACLPolicyInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 siteId uuid 0~36个字符。 - 站点ID,UUID格式。 "00000000-0000-0000-0000-000000000000" deviceId uuid 0~36个字符。 - 设备ID,UUID格式。 "00000000-0000-0000-0000-000000000000" aclNum int32 [2000-2999] - ACL编号,同一设备的IPv4和IPv6的ACL编号不能相同。 2100 type string 0~8个字符。 IPv4 基础ACL类型,该字段可以设置为以下几种: a) IPv4 b) IPv6 默认为IPv4。 "IPv4" ruleList ARRAY_REFERENCE 1-100个列表项,详细请参见表6。 ACL规则列表。配置ACL必须配置规则。 - 表6 ACLRule对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 ruleId int64 [0-4294967294] - 基础ACL规则优先级。 10 operateType int32 [1-2] - 操作类型,取值范围:1---允许、2---拒绝。 1 ipRange string 0~150个字符。 - IP地址范围,支持IPv4和IPv6,格式:IP地址/掩码或Any。其中IPv4的掩码范围为0-32,IPv6的掩码范围为1-128。若需要配置全地址(即IPv4掩码为0、IPv6前缀为0),可以输入“Any”(不区分大小写)。 IPv4地址如:192.168.1.1/16; IPv6地址如:fc22::1010/64。 "192.168.1.1/16" 返回状态码为400:请求参数错误。 详细信息请参见实际响应消息体。 返回状态码为500:内部异常。 详细信息请参见实际响应消息体。
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 aclPolicy 是 REFERENCE 详细请参见表2。 设备基础ACL信息。 - 表2 BasicACLPolicyInfo对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 siteId 是 uuid 0~36个字符。 - 站点ID,UUID格式。 "00000000-0000-0000-0000-000000000000" deviceId 是 uuid 0~36个字符。 - 设备ID,UUID格式。 "00000000-0000-0000-0000-000000000000" aclNum 是 int32 [2000-2999] - ACL编号,同一设备的IPv4和IPv6的ACL编号不能相同。 2100 type 否 string 0~8个字符。 IPv4 基础ACL类型,该字段可以设置为以下几种: a) IPv4 b) IPv6 默认为IPv4。 "IPv4" ruleList 是 ARRAY_REFERENCE 1-100个列表项,详细请参见表3。 ACL规则列表。配置ACL必须配置规则。 - 表3 ACLRule对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 ruleId 是 int64 [0-4294967294] - 基础ACL规则优先级。 10 operateType 是 int32 [1-2] - 操作类型,取值范围:1---允许、2---拒绝。 1 ipRange 是 string 0~150个字符。 - IP地址范围,支持IPv4和IPv6,格式:IP地址/掩码或Any。其中IPv4的掩码范围为0-32,IPv6的掩码范围为1-128。若需要配置全地址(即IPv4掩码为0、IPv6前缀为0),可以输入“Any”(不区分大小写)。 IPv4地址如:192.168.1.1/16; IPv6地址如:fc22::1010/64。 "192.168.1.1/16"
  • 请求示例 HTTP的示例 POST /controller/campus/v1/sdwan/acl/basic 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 { "siteId" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "aclNum" : 2100, "type" : "IPv4", "ruleList" : [ { "ruleId" : 10, "operateType" : 1, "ipRange" : "192.168.1.1/16" } ] }
  • 响应示例 返回状态码为200:接口调用成功,响应体参考Ipv6BgpRoutePeerResponse。 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" : [ { "siteId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "tnpId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "vpnId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "peers" : [ { "Ipv6PeerIp" : "fc00::1101", "localIp" : "fc00::1102", "peerAs" : "10", "localAs" : "10", "allowAsLoop" : 1, "ebgpMaxHop" : 1, "peerIgnore" : false, "keepAliveTime" : 0, "holdTime" : 0, "md5Encrypt" : false, "md5Key" : "", "keyChainEnable" : false, "keyChainName" : "keyChainName", "bfdEnable" : false, "bfdInfo" : { "minTxInterval" : 1000, "minRxInterval" : 1000, "detectMultiplier" : 3 }, "addressFamilys" : [ { "familyType" : "ipv6-unicast", "advertiseCommunity" : false, "exportRoutePolicy" : { "nodes" : [ { "nodeIndex" : 20060, "mode" : "permit", "matchCondition" : { "ipPrefix" : { "name" : "", "prefixFilters" : [ { "ipv6Address" : "fc00::1", "maskLength" : 64, "greaterEqual" : 64, "lessEqual" : 64 } ] }, "communityFilters" : [ { "name" : "bgpCommunityFilterTest", "communityNodes" : [ { "matchMode" : "permit", "communityMembers" : [ "65520:4555" ] } ], "wholeMatch" : "" } ] }, "applyAction" : { "applyCommunity" : { "communityNumbers" : [ "1000" ], "additive" : "", "none" : "" }, "applyExtCommunity" : { "rtFilters" : [ "65520:4552" ], "additive" : true }, "applyCommunityDelete" : { "communityFilterName" : "communityTest" }, "applyAsPath" : { "asNumbers" : [ "1000" ], "additive" : "", "overwrite" : "", "none" : "" }, "applyMetric" : { "cost" : "24", "sign" : "add" }, "localPreference" : 100, "preferredValue" : 100 }, "nextNode" : { "nextNodeIndex" : 20080 } } ] }, "importRoutePolicy" : { "nodes" : [ { "nodeIndex" : 20060, "mode" : "permit", "matchCondition" : { "ipPrefix" : { "name" : "", "prefixFilters" : [ { "ipv6Address" : "fc00::1", "maskLength" : 64, "greaterEqual" : 64, "lessEqual" : 64 } ] }, "communityFilters" : [ { "name" : "bgpCommunityFilterTest", "communityNodes" : [ { "matchMode" : "permit", "communityMembers" : [ "65520:4555" ] } ], "wholeMatch" : "" } ] }, "applyAction" : { "applyCommunity" : { "communityNumbers" : [ "1000" ], "additive" : "", "none" : "" }, "applyExtCommunity" : { "rtFilters" : [ "65520:4552" ], "additive" : true }, "applyCommunityDelete" : { "communityFilterName" : "communityTest" }, "applyAsPath" : { "asNumbers" : [ "1000" ], "additive" : "", "overwrite" : "", "none" : "" }, "applyMetric" : { "cost" : "24", "sign" : "add" }, "localPreference" : 100, "preferredValue" : 100 }, "nextNode" : { "nextNodeIndex" : 20080 } } ] } } ] } ] } ], "fail" : [ { "errcode" : "0", "errmsg" : "", "data" : { "siteId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "tnpId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "vpnId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "peers" : [ { "Ipv6PeerIp" : "fc00::1101", "localIp" : "fc00::1102", "peerAs" : "10", "localAs" : "10", "allowAsLoop" : 1, "ebgpMaxHop" : 1, "peerIgnore" : false, "keepAliveTime" : 0, "holdTime" : 0, "md5Encrypt" : false, "md5Key" : "", "keyChainEnable" : false, "keyChainName" : "keyChainName", "bfdEnable" : false, "bfdInfo" : { "minTxInterval" : 1000, "minRxInterval" : 1000, "detectMultiplier" : 3 }, "addressFamilys" : [ { "familyType" : "ipv6-unicast", "advertiseCommunity" : false, "exportRoutePolicy" : { "nodes" : [ { "nodeIndex" : 20060, "mode" : "permit", "matchCondition" : { "ipPrefix" : { "name" : "", "prefixFilters" : [ { "ipv6Address" : "fc00::1", "maskLength" : 64, "greaterEqual" : 64, "lessEqual" : 64 } ] }, "communityFilters" : [ { "name" : "bgpCommunityFilterTest", "communityNodes" : [ { "matchMode" : "permit", "communityMembers" : [ "65520:4555" ] } ], "wholeMatch" : "" } ] }, "applyAction" : { "applyCommunity" : { "communityNumbers" : [ "1000" ], "additive" : "", "none" : "" }, "applyExtCommunity" : { "rtFilters" : [ "65520:4552" ], "additive" : true }, "applyCommunityDelete" : { "communityFilterName" : "communityTest" }, "applyAsPath" : { "asNumbers" : [ "1000" ], "additive" : "", "overwrite" : "", "none" : "" }, "applyMetric" : { "cost" : "24", "sign" : "add" }, "localPreference" : 100, "preferredValue" : 100 }, "nextNode" : { "nextNodeIndex" : 20080 } } ] }, "importRoutePolicy" : { "nodes" : [ { "nodeIndex" : 20060, "mode" : "permit", "matchCondition" : { "ipPrefix" : { "name" : "", "prefixFilters" : [ { "ipv6Address" : "fc00::1", "maskLength" : 64, "greaterEqual" : 64, "lessEqual" : 64 } ] }, "communityFilters" : [ { "name" : "bgpCommunityFilterTest", "communityNodes" : [ { "matchMode" : "permit", "communityMembers" : [ "65520:4555" ] } ], "wholeMatch" : "" } ] }, "applyAction" : { "applyCommunity" : { "communityNumbers" : [ "1000" ], "additive" : "", "none" : "" }, "applyExtCommunity" : { "rtFilters" : [ "65520:4552" ], "additive" : true }, "applyCommunityDelete" : { "communityFilterName" : "communityTest" }, "applyAsPath" : { "asNumbers" : [ "1000" ], "additive" : "", "overwrite" : "", "none" : "" }, "applyMetric" : { "cost" : "24", "sign" : "add" }, "localPreference" : 100, "preferredValue" : 100 }, "nextNode" : { "nextNodeIndex" : 20080 } } ] } } ] } ] } } ] } 返回状态码为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/ipv6bgp-peer-info 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 { "peerInfos" : [ { "siteId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "tnpId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "vpnId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "peers" : [ { "Ipv6PeerIp" : "fc00::1101", "localIp" : "fc00::1102", "peerAs" : "10", "localAs" : "10", "allowAsLoop" : 1, "ebgpMaxHop" : 1, "peerIgnore" : false, "keepAliveTime" : 0, "holdTime" : 0, "md5Encrypt" : false, "md5Key" : "", "keyChainEnable" : false, "keyChainName" : "keyChainName", "bfdEnable" : false, "bfdInfo" : { "minTxInterval" : 1000, "minRxInterval" : 1000, "detectMultiplier" : 3 }, "addressFamilys" : [ { "familyType" : "ipv6-unicast", "advertiseCommunity" : false, "exportRoutePolicy" : { "nodes" : [ { "nodeIndex" : 20060, "mode" : "permit", "matchCondition" : { "ipPrefix" : { "name" : "", "prefixFilters" : [ { "ipv6Address" : "fc00::1", "maskLength" : 64, "greaterEqual" : 64, "lessEqual" : 64 } ] }, "communityFilters" : [ { "name" : "bgpCommunityFilterTest", "communityNodes" : [ { "matchMode" : "permit", "communityMembers" : [ "65520:4555" ] } ], "wholeMatch" : "" } ] }, "applyAction" : { "applyCommunity" : { "communityNumbers" : [ "1000" ], "additive" : "", "none" : "" }, "applyExtCommunity" : { "rtFilters" : [ "65520:4552" ], "additive" : true }, "applyCommunityDelete" : { "communityFilterName" : "communityTest" }, "applyAsPath" : { "asNumbers" : [ "1000" ], "additive" : "", "overwrite" : "", "none" : "" }, "applyMetric" : { "cost" : "24", "sign" : "add" }, "localPreference" : 100, "preferredValue" : 100 }, "nextNode" : { "nextNodeIndex" : 20080 } } ] }, "importRoutePolicy" : { "nodes" : [ { "nodeIndex" : 20060, "mode" : "permit", "matchCondition" : { "ipPrefix" : { "name" : "", "prefixFilters" : [ { "ipv6Address" : "fc00::1", "maskLength" : 64, "greaterEqual" : 64, "lessEqual" : 64 } ] }, "communityFilters" : [ { "name" : "bgpCommunityFilterTest", "communityNodes" : [ { "matchMode" : "permit", "communityMembers" : [ "65520:4555" ] } ], "wholeMatch" : "" } ] }, "applyAction" : { "applyCommunity" : { "communityNumbers" : [ "1000" ], "additive" : "", "none" : "" }, "applyExtCommunity" : { "rtFilters" : [ "65520:4552" ], "additive" : true }, "applyCommunityDelete" : { "communityFilterName" : "communityTest" }, "applyAsPath" : { "asNumbers" : [ "1000" ], "additive" : "", "overwrite" : "", "none" : "" }, "applyMetric" : { "cost" : "24", "sign" : "add" }, "localPreference" : 100, "preferredValue" : 100 }, "nextNode" : { "nextNodeIndex" : 20080 } } ] } } ] } ] } ] }
  • 响应示例 返回状态码为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的示例 PATCH /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-direct-route-vlink:vlink-if/GE0%2F0%2F3 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-direct-route-vlink:vlink-if" : { "if-name" : "GE0/0/3", "vlink-route" : [ { "address-family" : "ipv4uni" } ], "vlink-configuration" : { "preference" : 233 } } }
  • URI /restconf/v2/data/huawei-ac-nes-device:nes/ne/{id}/huawei-nce-e-direct-route-vlink:vlink-if/{if-name} 表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" if-name 是 string 1~63个字符。 - interface name "GE0/0/3"
  • 请求参数 表2 header参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 restconf-transaction-id 是 string - - 事务ID。 "00000000-0000-0000-0000-000000000000" 表3 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-e-direct-route-vlink:vlink-if 是 REFERENCE 详细请参见表4。 ARP Vlink直连路由。 -
  • 请求示例 HTTP的示例 POST /controller/campus/v1/sdwan/net/site/inter/connect/ipsec/tunnel 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 { "ipsecTunnelInfos" : [ { "siteId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "id" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "tunnelPortName" : "Tunnel0/0/400", "wanLinkId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "vpnId" : "00000000-0000-0000-0000-000000000000", "ipAddress" : "192.168.0.1/24", "srcIpAddress" : "192.168.1.1", "srcType" : "IP", "srcInterfaceId" : "00000000-0000-0000-0000-000000000000", "dstIpAddress" : "192.168.1.2", "ipsecProfileId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "mtu" : 1500, "TCPmss" : 1200, "securityZone" : "underlay_untrust" } ] }
  • 响应示例 返回状态码为201:接口调用成功,响应体参考IpsecTunnelResponse。 HTTP/1.1 201 Created 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" : [ { "siteId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "id" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "tunnelPortName" : "Tunnel0/0/400", "wanLinkId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "vpnId" : "00000000-0000-0000-0000-000000000000", "ipAddress" : "192.168.0.1/24", "srcIpAddress" : "192.168.1.1", "srcType" : "IP", "srcInterfaceId" : "00000000-0000-0000-0000-000000000000", "dstIpAddress" : "192.168.1.2", "ipsecProfileId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "mtu" : 1500, "TCPmss" : 1200, "securityZone" : "underlay_untrust" } ] } 返回状态码为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
  • 响应参数 返回状态码为201:接口调用成功,响应体参考IpsecTunnelResponse。 表4 IpsecTunnelResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" data ARRAY_REFERENCE 详细请参见表5。 成功添加或更新的Ipsec Tunnel配置。 - 表5 IpsecTunnelInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 siteId string 0~64个字符。 - 对应站点的ID。创建时必填。 "fbb684c8-0d37-496f-bafa-4b06d515j7l6" deviceId string 0~64个字符。 - 对应设备的ID。创建时必填。 "fbb684c8-0d37-496f-bafa-4b06d515j7l6" id string 0~64个字符。 - Ipsec Tunnel ID,更新,删除时必填。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" tunnelPortName string 0~128个字符。 - Ipsec Tunnel端口名,不能重复。创建时必填。 "Tunnel0/0/400" wanLinkId string 0~64个字符。 - Wan链路的ID。创建时必填。 "fbb684c8-0d37-496f-bafa-4b06d515j7l6" vpnId string 0~64个字符。 - 业务VPN ID,和Wan链路的ID二选一。 FW网关不支持配置此项。 "00000000-0000-0000-0000-000000000000" ipAddress string 0~64个字符。 - Ipsec隧道IP地址。创建时必填。 "192.168.0.1/24" srcIpAddress string 0~64个字符。 - Ipsec隧道源IP地址。创建时必填。 "192.168.1.1" srcType string 0~32个字符。 - 源接口类型,可选值:IP、WanLink、LoopBack。 "IP" srcInterfaceId string 0~64个字符。 - 源接口Id,对应LOOPBACK ID或者WANLINK ID;与SRCIPADDRESS二选一。 "00000000-0000-0000-0000-000000000000" dstIpAddress string 0~64个字符。 - Ipsec隧道目的IP地址。创建时必填。 "192.168.1.2" ipsecProfileId string 0~64个字符。 - IPSec模板ID。创建时必填。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" mtu int32 [46-9600] 1500 MTU,取值范围:46-9600,默认1500。 1500 TCPmss int32 [230-2048] 1200 TCP MSS, 取值范围:230-2048,默认1200,建议MSS的值≤MTU的值-40。 FW网关设备不支持配置此项。 1200 securityZone string 0~32个字符。 underlay_untrust 安全域,取值范围:underlay_untrust、自定义安全域。 FW网关设备IPSec隧道必须指定安全域。 非FW网关设备IPSec隧道不支持指定安全域。 "underlay_untrust" 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 ipsecTunnelRequest 是 REFERENCE 详细请参见表2。 创建Ipsec Tunnel配置请求数据。 - 表2 IpsecTunnelRequest对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 ipsecTunnelInfos 否 ARRAY_REFERENCE 0-100个列表项,详细请参见表3。 Ipsec Tunnel列表。 - 表3 IpsecTunnelInfo对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 siteId 否 string 0~64个字符。 - 对应站点的ID。创建时必填。 "fbb684c8-0d37-496f-bafa-4b06d515j7l6" deviceId 否 string 0~64个字符。 - 对应设备的ID。创建时必填。 "fbb684c8-0d37-496f-bafa-4b06d515j7l6" id 否 string 0~64个字符。 - Ipsec Tunnel ID,更新,删除时必填。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" tunnelPortName 否 string 0~128个字符。 - Ipsec Tunnel端口名,不能重复。创建时必填。 "Tunnel0/0/400" wanLinkId 否 string 0~64个字符。 - Wan链路的ID。创建时必填。 "fbb684c8-0d37-496f-bafa-4b06d515j7l6" vpnId 否 string 0~64个字符。 - 业务VPN ID,和Wan链路的ID二选一。 FW网关不支持配置此项。 "00000000-0000-0000-0000-000000000000" ipAddress 否 string 0~64个字符。 - Ipsec隧道IP地址。创建时必填。 "192.168.0.1/24" srcIpAddress 否 string 0~64个字符。 - Ipsec隧道源IP地址。创建时必填。 "192.168.1.1" srcType 否 string 0~32个字符。 - 源接口类型,可选值:IP、WanLink、LoopBack。 "IP" srcInterfaceId 否 string 0~64个字符。 - 源接口Id,对应LOOPBACK ID或者WANLINK ID;与SRCIPADDRESS二选一。 "00000000-0000-0000-0000-000000000000" dstIpAddress 否 string 0~64个字符。 - Ipsec隧道目的IP地址。创建时必填。 "192.168.1.2" ipsecProfileId 否 string 0~64个字符。 - IPSec模板ID。创建时必填。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" mtu 否 int32 [46-9600] 1500 MTU,取值范围:46-9600,默认1500。 1500 TCPmss 否 int32 [230-2048] 1200 TCP MSS, 取值范围:230-2048,默认1200,建议MSS的值≤MTU的值-40。 FW网关设备不支持配置此项。 1200 securityZone 否 string 0~32个字符。 underlay_untrust 安全域,取值范围:underlay_untrust、自定义安全域。 FW网关设备IPSec隧道必须指定安全域。 非FW网关设备IPSec隧道不支持指定安全域。 "underlay_untrust"
  • 响应示例 返回状态码为200:修改AP站点模板IPV6开关配置的消息返回体。 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" : { "ipv6Enable" : false } } 返回状态码为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
共100000条