华为云用户手册

  • 响应示例 返回状态码为200:修改成功,响应体参考DeviceApiResponse。 HTTP/1.1 200 OK Date: Thu,01 Sep 2022 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "", "data" : { "name" : "device", "description" : "this is device", "ip" : "10.254.254.254", "backupIp" : "10.254.254.253", "deviceGroupId" : "5c37d9e8-cdf6-11e8-a4fc-286ed488df6b", "series" : "Cisco Catalyst", "enableRadius" : true, "radiusParam" : { "accountingKey" : "******", "authenKey" : "******", "coaPort" : 1700, "accountingPeriod" : 5, "macPwdEnable" : false, "macAuthPwd" : "******", "radiusServiceTypeEnable" : false, "radiusServiceTypeDevice" : 8, "radiusServiceTypeTerminal" : 4 }, "enablePortal" : true, "portalParam" : { "protol" : "CMCC Portal", "portalKey" : "******", "urlKey" : "******", "stations" : ["10.254.254.254"], "enableUserSync" : false, "port" : 80, "portalServiceTypeEnable" : true, "portalServiceTypeTerminal" : 4 }, "enableTacacs" : true, "tacacsParam" : { "key" : "******" }, "id" : "5c37d9e8-cdf6-11e8-a4fc-286ed488df6b" } } 返回状态码为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/accesscfg/device/authdevice 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 { "name" : "device", "description" : "this is device", "ip" : "10.254.254.254", "backupIp" : "10.254.254.253", "deviceGroupId" : "5c37d9e8-cdf6-11e8-a4fc-286ed488df6b", "deviceGroupName" : "5c37d9e8-cdf6-11e8-a4fc-286ed488df6b", "series" : "Cisco Catalyst", "apn" : "APN-1", "enableRadius" : true, "radiusParam" : { "accountingKey" : "Example@123", "authenKey" : "Example@123", "coaPort" : 1700, "accountingPeriod" : 5, "macPwdEnable" : false, "macAuthPwd" : "Example@123", "radiusServiceTypeEnable" : false, "radiusServiceTypeDevice" : 8, "radiusServiceTypeTerminal" : 4 }, "enablePortal" : true, "portalParam" : { "protol" : "CMCC Portal", "portalKey" : "Example@123", "urlKey" : "Example@123", "stations" : ["10.254.254.254"], "enableUserSync" : false, "port" : 80, "portalServiceTypeEnable" : true, "portalServiceTypeTerminal" : 4, "portalIp" : "10.254.254.254", "httpProtocol" : "HTTPS" }, "enableTacacs" : true, "tacacsParam" : { "key" : "Example@123" }, "deviceGroupInfos" : [ { "devGroupId" : "5c37d9e8-cdf6-11e8-a4fc-286ed488df6b", "devGroupName" : "devGroupName1" } ], "id" : "5c37d9e8-cdf6-11e8-a4fc-286ed488df6b" }
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 device 是 REFERENCE 详细请参见表2。 待修改认证设备参数。 - 表2 DeviceApiDto对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 name 是 string 1~64个字符。 - 设备名称,1~64位的字符串,且不可包含特殊字符?!~@#$%^&*().。 "device" description 否 string 0~255个字符。 - 设备描述,0~255位字符,不能以=+-@作为开头。 "this is device" ip 是 string 1~128个字符。 - ipV4地址,enablePortal为false时支持掩码。 "10.254.254.254" backupIp 否 string 0~128个字符。 - 备份ip地址,交换机或WAC双链路部署时填写,enablePortal为false时支持掩码 "10.254.254.253" deviceGroupId 否 string 0~64个字符。 - 设备组标识。该字段和deviceGroupInfos不同时生效,如果deviceGroupInfos入参有信息优先生效deviceGroupInfos字段信息 "5c37d9e8-cdf6-11e8-a4fc-286ed488df6b" deviceGroupName 否 string 0~64个字符。 - 设备组名称。 "5c37d9e8-cdf6-11e8-a4fc-286ed488df6b" series 是 string Huawei Engine Cisco Catalyst H3C S Huawei NAC Cisco WLC Aruba OS Other Huawei USG Huawei ME60/NE40E Cisco Crystal Huawei V600 5GC - 设备系列,Crystal同Catalyst。选择5GC系列后,系列不支持修改,且不支持配置Portal和Tacacs。 "Cisco Catalyst" apn 否 string 0~64个字符。 - APN名称。 "APN-1" enableRadius 否 boolean true false false 是否已配置Radius对接参数。当enableRadius为true,radiusParam必填,为false时radiusParam无需填写。 true radiusParam 否 REFERENCE 详细请参见表3。 Radius参数信息 - enablePortal 否 boolean true false false 是否已配置Portal对接参数。当enablePortal为true,portalParam必填,为false时portalParam无需填写。 true portalParam 否 REFERENCE 详细请参见表4。 Potral参数信息 - enableTacacs 否 boolean true false false 是否已配置HWTACA CS 对接参数。当enableTacacs为true,tacacsParam必填,为false时tacacsParam无需填写。 true tacacsParam 否 REFERENCE 详细请参见表5。 TACACS参数信息 - deviceGroupInfos 否 ARRAY_REFERENCE 0-10个列表项,详细请参见表6。 多个设备组信息。该字段和deviceGroupId不同时生效,如果deviceGroupInfos入参有信息优先生效该字段信息 - id 是 string 1~64个字符。 - 认证设备ID,uuid格式。 "5c37d9e8-cdf6-11e8-a4fc-286ed488df6b"
  • 请求示例 HTTP的示例 DELETE /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-route-policy:ext-community-filter 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-route-policy:ext-community-filter 表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"
  • 响应示例 返回状态码为200:修改成功,返回配置后的端口配置信息,结构体参见ResponseDto。 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:校验异常,结构体参见ResponseDto。 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 { "errcode" : "0", "errmsg" : "" }
  • 响应参数 返回状态码为200:修改成功,返回配置后的端口配置信息,结构体参见ResponseDto。 表4 ResponseDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 "" 返回状态码为400:校验异常,结构体参见ResponseDto。 ResponseDto对象的参数列表,详细请参见表4。
  • URI /controller/campus/v1/networkservice/networkconfig/net/lswport/devices/{deviceId}/changeInterfaceMode 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 uuid 36个字符。 - 设备ID。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e"
  • 请求示例 HTTP的示例 PUT /controller/campus/v1/networkservice/networkconfig/net/lswport/devices/fbb684c8-0d37-496f-bafa-4b06d5151e2e/changeInterfaceMode 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 { "interfaceNames" : ["GigabitEthernet0/0/1","GigabitEthernet0/0/2"], "targetMode" : "100GE" }
  • 响应示例 返回状态码为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 { "enableSRPolicy" : true } 返回状态码为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 { "errcode" : "0", "errmsg" : "" }
  • 请求示例 HTTP的示例 GET /controller/campus/v1/lanwan/tunnel/srpolicy 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:Success。 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 { "totalRecords" : 100, "progress" : 0.9, "data" : [ { "id" : "00000000-0000-0000-0000-000000000000", "name" : "TemplateBinding1", "templateId" : "00000000-0000-0000-0000-000000000000", "createTime" : "1713880927744", "description" : "this is TemplateBinding1", "totalDeviceNum" : 100, "deployedLastestSuccessDeviceCount" : 100, "templateBindingStatus" : "last-template-partly-deployed", "deployLastVersion" : true, "templateName" : "this is template1", "devices" : { "totalRecords" : 100, "data" : [ { "id" : "00000000-0000-0000-0000-000000000000", "name" : "device1", "ip" : "127.0.0.1", "siteName" : "site1", "deployStatus" : "deployment-successed", "deployTime" : "1713880927744", "deployLastVersion" : true, "deployErrorMsg" : {"errorCode":"0x00c8000c","errorType":"APPLICATION","message":"The request failed because the mandatory node is empty"} } ] } } ] } 返回状态码为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 { "errcode" : "0", "errmsg" : "" } 返回状态码为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 /v1/networkservice/hierarchy-template/template-groups/batch-delete/details 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" : 1, "pageSize" : 10, "templateName" : "template1", "bindingName" : "binding1", "deviceName" : "device1", "siteName" : "site1", "deleteTemplateGroupInput" : { "deleteIds" : ["00000000-0000-0000-0000-000000000000"] }, "id" : "00000000-0000-0000-0000-000000000000" }
  • 响应参数 返回状态码为200:Success。 表4 TemplateGroupBindingResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 totalRecords int32 [0-20000] - 总记录数量。 100 progress double [0-1] - 部署进度。 0.9 data ARRAY_REFERENCE 0-20个列表项,详细请参见表5。 绑定关系列表。 - 表5 TemplateBinding对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 id string 36个字符。 - 绑定关系ID,UUID格式。 "00000000-0000-0000-0000-000000000000" name string 1~128个字符。 - 绑定名称。 "TemplateBinding1" templateId string 1~128个字符。 - 模板ID。 "00000000-0000-0000-0000-000000000000" createTime int64 [1577808000000-4733481600000] - 创建绑定时间。 "1713880927744" description string 0~1024个字符。 - 绑定描述。 "this is TemplateBinding1" totalDeviceNum int32 [0-200000] - 设备总数 100 deployedLastestSuccessDeviceCount int32 [0-200000] - 部署成功设备数量 100 templateBindingStatus string 0~32个字符。 - 部署状态。 last-template-partly-deployed:未全部部署, last-template-deployed:全部部署。 "last-template-partly-deployed" deployLastVersion boolean true false - 是否部署最新版本。 true templateName string 0~1024个字符。 - 模板名称。 "this is template1" devices REFERENCE 详细请参见表6。 设备列表。 - 表6 TemplateGroupBindingDevicesResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 totalRecords int32 [0-200000] - 总记录数量。 100 data ARRAY_REFERENCE 0-100个列表项,详细请参见表7。 绑定关系列表。 - 表7 TemplateBindingDevices对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 id string 36个字符。 - 设备ID,UUID格式。 "00000000-0000-0000-0000-000000000000" name string 1~128个字符。 - 设备名称。 "device1" ip string 0~20个字符。 - IP地址。 "127.0.0.1" siteName string 0~1024个字符。 - 站点名称。 "site1" deployStatus string 8~32个字符。 - 部署状态。 un-deploy:未部署, deploying:部署中, deployment-successed:部署成功, deployment-failed:部署失败, in-queue:队列中。 "deployment-successed" deployTime int64 [1577808000000-4733481600000] - 部署时间,时间戳格式。 "1713880927744" deployLastVersion boolean true false - 是否部署最新版本。 true deployErrorMsg string 0~10000个字符。 - 部署失败信息。 {"errorCode":"0x00c8000c","errorType":"APPLICATION","message":"The request failed because the mandatory node is empty"} 返回状态码为400:校验异常。 CommonDto对象的参数列表,详细请参见表4。 返回状态码为500:内部服务错误。 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:查询成功,响应体参考QueryPredefinedUrlClassificationsResponse。 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" : "", "totalRecords" : 1, "data" : [ { "cid" : 1, "name" : "P2P", "description" : "P2P网站" } ] } 返回状态码为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的示例 GET /controller/campus/v1/sdwan/policy/security/url-classifications 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:查询成功,响应体参考QueryPredefinedUrlClassificationsResponse。 表1 QueryPredefinedUrlClassificationsResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" totalRecords int32 - - 总的数据条数。 1 data ARRAY_REFERENCE 0-1000个列表项,详细请参见表2。 URL模板信息。 - 表2 PredefinedurlProfileInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 cid int32 - - URL预分类的大类ID。 1 name string 0~64个字符。 - URL类别名称。 "P2P" description string 0~128个字符。 - 描述。 "P2P网站" 返回状态码为400:请求参数错误。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 DELETE /controller/campus/v1/networkservice/networkconfig/net/lswport/devices/fbb684c8-0d37-496f-bafa-4b06d5151e2e/ethtrunk-ports/Eth-Trunk1 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
  • URI /controller/campus/v1/networkservice/networkconfig/net/lswport/devices/{deviceId}/ethtrunk-ports/{name} 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 uuid - - 设备ID。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" name 是 string 10~12个字符。 - EthTrunk端口名称,必须是Eth-Trunk[数字]的格式,数字最大511。 "Eth-Trunk1"
  • 响应示例 返回状态码为200:删除交换机EthTrunk端口成功,结构体参见ResponseDto。 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" : "" }
  • 响应示例 返回状态码为200:SSID全部删除成功,返回结构体参见APDeleteSsidResponse。 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" : [ "de5813f8ff1e41f5ba9c324da70b49ed" ], "fail" : [ { "errcode" : "0302000020", "errmsg" : "The site ID format is incorrect or the site does not exist", "id" : "de5813f8ff1e41f5ba9c324da70b49ed" } ] } 返回状态码为207:SSID部分删除成功,返回结构体参见APDeleteSsidResponse。 HTTP/1.1 207 Multi-Status 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" : [ "de5813f8ff1e41f5ba9c324da70b49ed" ], "fail" : [ { "errcode" : "0302000020", "errmsg" : "The site ID format is incorrect or the site does not exist", "id" : "de5813f8ff1e41f5ba9c324da70b49ed" } ] } 返回状态码为400:SSID删除失败,返回结构体参见APDeleteSsidResponse。 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 { "errcode" : "0", "errmsg" : "", "success" : [ "de5813f8ff1e41f5ba9c324da70b49ed" ], "fail" : [ { "errcode" : "0302000020", "errmsg" : "The site ID format is incorrect or the site does not exist", "id" : "de5813f8ff1e41f5ba9c324da70b49ed" } ] } 返回状态码为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/v3/networkconfig/site/fbde1c5d-5b94-49e3-a912-48641015e45c/apssid/action/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 { "ids" : [ "de5813f8ff1e41f5ba9c324da70b49ed" ] }
  • 响应示例 返回状态码为201:创建IPv4静态路由返回参数。 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" : "", "success" : { "linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "coreStaticInfoList" : [ { "id" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkName" : "ConnectLink", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "deviceName" : "Core-1", "deviceType" : "LSW", "platform" : "platform", "priority" : 120, "destIp" : "192.168.10.0/24", "nextHopType" : "ip-address", "nextHopIpAddress" : "192.168.10.1", "isTracked" : false, "trackTargetIpAddress" : "192.168.10.1", "configSource" : "LANWAN" } ], "gatewayStaticInfoList" : [ { "id" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkName" : "ConnectLink", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "deviceName" : "Core-1", "deviceType" : "LSW", "platform" : "platform", "priority" : 120, "destIp" : "192.168.10.0/24", "nextHopType" : "ip-address", "nextHopIpAddress" : "192.168.10.1", "isTracked" : false, "trackTargetIpAddress" : "192.168.10.1", "configSource" : "LANWAN" } ] }, "fail" : { "linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "failCoreRouteStaticList" : { "errcode" : "0", "errmsg" : "", "routeInfo" : [ { "id" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkName" : "ConnectLink", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "deviceName" : "Core-1", "deviceType" : "LSW", "platform" : "platform", "priority" : 120, "destIp" : "192.168.10.0/24", "nextHopType" : "ip-address", "nextHopIpAddress" : "192.168.10.1", "isTracked" : false, "trackTargetIpAddress" : "192.168.10.1", "configSource" : "LANWAN" } ] }, "failGatewayRouteStaticList" : { "errcode" : "0", "errmsg" : "", "routeInfo" : [ { "id" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkName" : "ConnectLink", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "deviceName" : "Core-1", "deviceType" : "LSW", "platform" : "platform", "priority" : 120, "destIp" : "192.168.10.0/24", "nextHopType" : "ip-address", "nextHopIpAddress" : "192.168.10.1", "isTracked" : false, "trackTargetIpAddress" : "192.168.10.1", "configSource" : "LANWAN" } ] } } } 返回状态码为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/v1/lanwan/interconnection/route/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 { "linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "coreStaticInfoList" : [ { "id" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkName" : "ConnectLink", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "deviceName" : "Core-1", "deviceType" : "LSW", "platform" : "platform", "priority" : 120, "destIp" : "192.168.10.0/24", "nextHopType" : "ip-address", "nextHopIpAddress" : "192.168.10.1", "isTracked" : false, "trackTargetIpAddress" : "192.168.10.1", "configSource" : "LANWAN" } ], "gatewayStaticInfoList" : [ { "id" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkName" : "ConnectLink", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "deviceName" : "Core-1", "deviceType" : "LSW", "platform" : "platform", "priority" : 120, "destIp" : "192.168.10.0/24", "nextHopType" : "ip-address", "nextHopIpAddress" : "192.168.10.1", "isTracked" : false, "trackTargetIpAddress" : "192.168.10.1", "configSource" : "LANWAN" } ] }
  • 响应参数 返回状态码为201:创建IPv4静态路由返回参数。 表4 RouteStaticResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 "" success REFERENCE 详细请参见表5。 配置IPv4静态路由成功时的返回数据。 - fail REFERENCE 详细请参见表7。 配置IPv4静态路由失败时的返回数据。 - 表5 RouteLinkStaticInfos对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 linkId string 36个字符。 - 互联接口标识,创建和更新时必填。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" coreStaticInfoList ARRAY_REFERENCE 0-128个列表项,详细请参见表6。 核心侧设备IPv4静态路由详细信息。 - gatewayStaticInfoList ARRAY_REFERENCE 0-128个列表项,详细请参见表6。 网关侧设备IPv4静态路由详细信息。 - 表6 RouteStaticInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 id string 36个字符。 - 单条IPv4静态路由标识。创建不填。查询返回。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" linkId string 36个字符。 - 互联标识,创建不填,查询返回。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" linkName string 0~64个字符。 - 互联接口名称, 创建、更新不填,查询返回。 "ConnectLink" deviceId string 36个字符。 - 设备标识。创建时必填。查询返回。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" deviceName string 0~64个字符。 - 设备名称,创建、更新不填,查询返回。 "Core-1" deviceType string 0~10个字符。 - 设备类型,创建、更新不填,查询返回。 "LSW" platform string 0~10个字符。 - 是否是pnf设备的标识 "platform" priority int32 [1-255] 60 静态路由优先级。priority的值越小,优先级越高。 120 destIp string 0~64个字符。 - 静态路由目的地址。格式:IPV4/掩码。 "192.168.10.0/24" nextHopType string 0~64个字符。 ip-address 静态路由下一跳类型,取值范围:ip-address、black-hole。black-hole表示黑洞下一跳。仅网关侧设备支持。 "ip-address" nextHopIpAddress string 0~64个字符。 - 静态路由下一跳IP地址。当nextHopType为black-hole时,nextHopIpAddress无需填写。若linkId对应的核心侧和网关侧都存在,并且下一跳为对端主IP地址,则不需要填充此项,否则需要填充。 "192.168.10.1" isTracked boolean true false false 静态路由是否与NQA联动。仅网关侧设备支持。 false trackTargetIpAddress string 0~64个字符。 - NQA探测的目的IP地址。若isTracked为true,则trackTargetIpAddress必填,否则不需要填充。仅网关侧设备支持。 "192.168.10.1" configSource string 0~32个字符。 - 配置源 "LANWAN" 表7 FailRouteStaticInfos对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 linkId string 36个字符。 - 互联接口标识。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" failCoreRouteStaticList REFERENCE 详细请参见表8。 失败的核心侧IPv4静态路由集合。 - failGatewayRouteStaticList REFERENCE 详细请参见表8。 失败的网关侧IPv4静态路由集合。 - 表8 FailRouteStaticInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 "" routeInfo ARRAY_REFERENCE 0-128个列表项,详细请参见表6。 设备IPv4静态路由详细信息。 - 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 routeLinkStaticInfo 是 REFERENCE 详细请参见表2。 创建LANWAN互联IPv4静态路由参数。一次操作只能创建基于一个互联口信息的路由。 - 表2 RouteLinkStaticInfos对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 linkId 是 string 36个字符。 - 互联接口标识,创建和更新时必填。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" coreStaticInfoList 否 ARRAY_REFERENCE 0-128个列表项,详细请参见表3。 核心侧设备IPv4静态路由详细信息。 - gatewayStaticInfoList 否 ARRAY_REFERENCE 0-128个列表项,详细请参见表3。 网关侧设备IPv4静态路由详细信息。 - 表3 RouteStaticInfo对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 id 否 string 36个字符。 - 单条IPv4静态路由标识。创建不填。查询返回。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" linkId 否 string 36个字符。 - 互联标识,创建不填,查询返回。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" linkName 否 string 0~64个字符。 - 互联接口名称, 创建、更新不填,查询返回。 "ConnectLink" deviceId 否 string 36个字符。 - 设备标识。创建时必填。查询返回。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" deviceName 否 string 0~64个字符。 - 设备名称,创建、更新不填,查询返回。 "Core-1" deviceType 否 string 0~10个字符。 - 设备类型,创建、更新不填,查询返回。 "LSW" platform 否 string 0~10个字符。 - 是否是pnf设备的标识 "platform" priority 否 int32 [1-255] 60 静态路由优先级。priority的值越小,优先级越高。 120 destIp 是 string 0~64个字符。 - 静态路由目的地址。格式:IPV4/掩码。 "192.168.10.0/24" nextHopType 否 string 0~64个字符。 ip-address 静态路由下一跳类型,取值范围:ip-address、black-hole。black-hole表示黑洞下一跳。仅网关侧设备支持。 "ip-address" nextHopIpAddress 否 string 0~64个字符。 - 静态路由下一跳IP地址。当nextHopType为black-hole时,nextHopIpAddress无需填写。若linkId对应的核心侧和网关侧都存在,并且下一跳为对端主IP地址,则不需要填充此项,否则需要填充。 "192.168.10.1" isTracked 否 boolean true false false 静态路由是否与NQA联动。仅网关侧设备支持。 false trackTargetIpAddress 否 string 0~64个字符。 - NQA探测的目的IP地址。若isTracked为true,则trackTargetIpAddress必填,否则不需要填充。仅网关侧设备支持。 "192.168.10.1" configSource 否 string 0~32个字符。 - 配置源 "LANWAN"
  • 请求示例 HTTP的示例 PUT /controller/campus/v1/sdwan/policy/traffic/internet/00000000-0000-0000-0000-000000000000/centralized-access/batch 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 { "centralizedAccessInfo" : [ { "areaId" : "00000000-0000-0000-0000-000000000000", "areaName" : "area_1", "description" : "centralized access", "centralizedSiteInfos" : [ { "siteId" : "00000000-0000-0000-0000-000000000000", "siteName" : "site1", "priority" : "1" } ], "enableIpv6" : false } ] }
  • 响应参数 返回状态码为200:修改成功,响应体参考CentralizedAccessBatchResponse。 CentralizedAccessBatchResponse对象的参数列表,详细请参见表4。 返回状态码为202:请求正在处理中,请求处理详情请通过“查询业务编排结果”接口,确认是否处理成功。响应体参考CentralizedAccessBatchResponse。 返回状态码为400:请求参数错误,无响应体。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误,无响应体。 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:修改成功,响应体参考CentralizedAccessBatchResponse。 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" : [ { "areaId" : "00000000-0000-0000-0000-000000000000", "areaName" : "area_1", "description" : "centralized access", "centralizedSiteInfos" : [ { "siteId" : "00000000-0000-0000-0000-000000000000", "siteName" : "site1", "priority" : "1" } ], "enableIpv6" : false } ], "fail" : [ { "errcode" : "0x00c8000c", "errmsg" : "The parameter is invalid.", "data" : { "areaId" : "00000000-0000-0000-0000-000000000000", "areaName" : "area_1", "description" : "centralized access", "centralizedSiteInfos" : [ { "siteId" : "00000000-0000-0000-0000-000000000000", "siteName" : "site1", "priority" : "1" } ], "enableIpv6" : false } } ], "processInstanceId" : "" } 返回状态码为202:请求正在处理中,请求处理详情请通过“查询业务编排结果”接口,确认是否处理成功。响应体参考CentralizedAccessBatchResponse。 HTTP/1.1 202 Accepted 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
共100000条
提示

您即将访问非华为云网站,请注意账号财产安全