华为云用户手册

  • 请求示例 HTTP的示例 GET /controller/campus/v3/networkconfig/site/fbde1c5d-5b94-49e3-a912-48641015e45c/apdhcp 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
  • 响应参数 返回状态码为200:当前站点的全局DHCP配置信息,返回结构体参见ApDhcpConfigResponsesDto。 表2 ApDhcpConfigResponsesDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" data REFERENCE 详细请参见表3。 - - 表3 ApDhcpConfigApiDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 ip string - - 单播IP地址。当dhcpEnable为true或不填时,必填。 "192.168.1.1" mask string 255.255.252.0 255.255.254.0 255.255.255.0 255.255.255.128 255.255.255.192 255.255.255.224 255.255.255.240 255.255.255.248 255.255.255.252 - 子网掩码。当dhcpEnable为true或不填时,必填。 "255.255.255.0" dnsConfig REFERENCE 详细请参见表4。 - - tenancyConfig REFERENCE 详细请参见表5。 租期(不填时,默认值为1天)。 - masterWins string - - 主wins,单播IP地址(主,备wins不能重复)。 "192.168.1.1" slaveWins string - - 备wins,单播IP地址。 "192.168.1.2" ipBindingMacConfigList ARRAY_REFERENCE 0-8个列表项,详细请参见表6。 静态绑定列表,最大8条。IP,MAC都不能重复,结构体参见IpBindingMacConfigApiDto。 - lanVlanId integer [1-4094] - 不能是已配置的业务VLAN,且修改该VLAN会造成NAT、IPSec用户下线。当dhcpEnable为true或不填时,必填。 3911 dhcpEnable boolean true false - dhcp使能开关。取值false时,关闭dhcp功能,其余值不需要填值。不填值或取值true时,打开dhcp功能。 true 表4 DnsConfigApiDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 dnsServerMode string systemsetting custom - DNS服务器模式(systemsetting为“系统DNS配置”;custom为“自定义”)。 "systemsetting" priorDnsServer string - - 主DNS服务器IP地址,不能与备DNS服务器IP重复。不能为广播,组播IP。当dnsServerMode为custom模式时,该参数生效,且必填 "192.168.1.10" standbyDnsServer string - - 备DNS服务器IP地址,不能与主DNS服务器IP重复。不能为广播,组播IP。当dnsServerMode为custom模式时,该参数生效 "192.168.1.11" 表5 TenancyConfigApiDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 day integer [0-999] - 天,取值范围:0-999。day,hour,minute全为0时表示无限。 999 hour integer [0-23] - 小时,取值范围:0-23。 23 minute integer [0-59] - 分钟,取值范围:0-59。 59 表6 IpBindingMacConfigApiDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 staticIpAddress string - - IP地址,不能与列表中其他IP重复。IP为上面网段(IP+mask计算得出)中的可分配IP地址,且不能为网关IP(上面配置IP)。 "192.168.1.10" staticMacAddress string - - MAC地址,不能与列表中其他MAC地址重复。MAC不能为广播(全F),组播(第一段2进制表示以“1”结尾)。 "00:00:00:00:00:00" 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:删除成功,响应体参考SecurityPolicyResponse。 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" : "00000000-0000-0000-0000-000000000000", "vpnId" : "00000000-0000-0000-0000-000000000000", "name" : "test_1", "status" : 1, "isActive" : true, "internetToUserRules" : [ { "id" : "00000000-0000-0000-0000-000000000000", "priority" : 1, "action" : "deny", "protocolNum" : 6, "sourceIp" : "192.168.0.0/24", "targetIp" : "192.168.0.0/24", "sourcePort" : 6, "endSourcePort" : 6, "targetPort" : 6, "endTargetPort" : 6, "ipsProfile" : "strict", "avProfile" : "default", "urlProfile" : "default", "sourceIpAddressSets" : [ "sourceIpAddressSet" ], "targetIpAddressSets" : [ "targetIpAddressSet" ], "sourceGeoLocationSets" : [ { "key" : "", "name" : "" } ], "targetGeoLocationSets" : [ { "key" : "", "name" : "" } ], "sourceDomainSets" : [ "sourceDomainSet" ], "targetDomainSets" : [ "targetDomainSet" ], "sourceFeeds" : "ipFeed01", "ipFeed02" , "targetFeeds" : "ipFeed01", "ipFeed02" , "appGroups" : [ "appGroup" ], "effectiveTimeId" : "00000000-0000-0000-0000-000000000000", "effectiveTimeName" : "effectiveTimeName", "fileProfile" : "fileProfile01" } ], "userToInternetRules" : [ { "id" : "00000000-0000-0000-0000-000000000000", "priority" : 1, "action" : "deny", "protocolNum" : 6, "sourceIp" : "192.168.0.0/24", "targetIp" : "192.168.0.0/24", "sourcePort" : 6, "endSourcePort" : 6, "targetPort" : 6, "endTargetPort" : 6, "ipsProfile" : "strict", "avProfile" : "default", "urlProfile" : "default", "sourceIpAddressSets" : [ "sourceIpAddressSet" ], "targetIpAddressSets" : [ "targetIpAddressSet" ], "sourceGeoLocationSets" : [ { "key" : "", "name" : "" } ], "targetGeoLocationSets" : [ { "key" : "", "name" : "" } ], "sourceDomainSets" : [ "sourceDomainSet" ], "targetDomainSets" : [ "targetDomainSet" ], "sourceFeeds" : "ipFeed01", "ipFeed02" , "targetFeeds" : "ipFeed01", "ipFeed02" , "appGroups" : [ "appGroup" ], "effectiveTimeId" : "00000000-0000-0000-0000-000000000000", "effectiveTimeName" : "effectiveTimeName", "fileProfile" : "fileProfile01" } ], "policyType" : false, "securityZone" : { "securityInterZones" : [ [ "test_1" ] ] }, "enableSecurityZones" : true, "securityZones" : { "sourceZones" : [ "test_1" ], "destZones" : [ "test_2" ] } } ], "fail" : [ { "errcode" : "0x00c8000c", "errmsg" : "The parameter is invalid.", "data" : { "id" : "00000000-0000-0000-0000-000000000000", "vpnId" : "00000000-0000-0000-0000-000000000000", "name" : "test_1", "status" : 1, "isActive" : true, "internetToUserRules" : [ { "id" : "00000000-0000-0000-0000-000000000000", "priority" : 1, "action" : "deny", "protocolNum" : 6, "sourceIp" : "192.168.0.0/24", "targetIp" : "192.168.0.0/24", "sourcePort" : 6, "endSourcePort" : 6, "targetPort" : 6, "endTargetPort" : 6, "ipsProfile" : "strict", "avProfile" : "default", "urlProfile" : "default", "sourceIpAddressSets" : [ "sourceIpAddressSet" ], "targetIpAddressSets" : [ "targetIpAddressSet" ], "sourceGeoLocationSets" : [ { "key" : "", "name" : "" } ], "targetGeoLocationSets" : [ { "key" : "", "name" : "" } ], "sourceDomainSets" : [ "sourceDomainSet" ], "targetDomainSets" : [ "targetDomainSet" ], "sourceFeeds" : "ipFeed01", "ipFeed02" , "targetFeeds" : "ipFeed01", "ipFeed02" , "appGroups" : [ "appGroup" ], "effectiveTimeId" : "00000000-0000-0000-0000-000000000000", "effectiveTimeName" : "effectiveTimeName", "fileProfile" : "fileProfile01" } ], "userToInternetRules" : [ { "id" : "00000000-0000-0000-0000-000000000000", "priority" : 1, "action" : "deny", "protocolNum" : 6, "sourceIp" : "192.168.0.0/24", "targetIp" : "192.168.0.0/24", "sourcePort" : 6, "endSourcePort" : 6, "targetPort" : 6, "endTargetPort" : 6, "ipsProfile" : "strict", "avProfile" : "default", "urlProfile" : "default", "sourceIpAddressSets" : [ "sourceIpAddressSet" ], "targetIpAddressSets" : [ "targetIpAddressSet" ], "sourceGeoLocationSets" : [ { "key" : "", "name" : "" } ], "targetGeoLocationSets" : [ { "key" : "", "name" : "" } ], "sourceDomainSets" : [ "sourceDomainSet" ], "targetDomainSets" : [ "targetDomainSet" ], "sourceFeeds" : "ipFeed01", "ipFeed02" , "targetFeeds" : "ipFeed01", "ipFeed02" , "appGroups" : [ "appGroup" ], "effectiveTimeId" : "00000000-0000-0000-0000-000000000000", "effectiveTimeName" : "effectiveTimeName", "fileProfile" : "fileProfile01" } ], "policyType" : false, "securityZone" : { "securityInterZones" : [ [ "test_1" ] ] }, "enableSecurityZones" : true, "securityZones" : { "sourceZones" : [ "test_1" ], "destZones" : [ "test_2" ] } } } ] } 返回状态码为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/sdwan/policy/security/security-policies/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 { "effectImmediate" : true, "securityPolicyInfo" : [ { "id" : "00000000-0000-0000-0000-000000000000", "vpnId" : "00000000-0000-0000-0000-000000000000", "name" : "test_1", "status" : 1, "isActive" : true, "internetToUserRules" : [ { "id" : "00000000-0000-0000-0000-000000000000", "priority" : 1, "action" : "deny", "protocolNum" : 6, "sourceIp" : "192.168.0.0/24", "targetIp" : "192.168.0.0/24", "sourcePort" : 6, "endSourcePort" : 6, "targetPort" : 6, "endTargetPort" : 6, "ipsProfile" : "strict", "avProfile" : "default", "urlProfile" : "default", "sourceIpAddressSets" : [ "sourceIpAddressSet" ], "targetIpAddressSets" : [ "targetIpAddressSet" ], "sourceGeoLocationSets" : [ { "key" : "", "name" : "" } ], "targetGeoLocationSets" : [ { "key" : "", "name" : "" } ], "sourceDomainSets" : [ "sourceDomainSet" ], "targetDomainSets" : [ "targetDomainSet" ], "sourceFeeds" : "ipFeed01", "ipFeed02" , "targetFeeds" : "ipFeed01", "ipFeed02" , "appGroups" : [ "appGroup" ], "effectiveTimeId" : "00000000-0000-0000-0000-000000000000", "effectiveTimeName" : "effectiveTimeName", "fileProfile" : "fileProfile01" } ], "userToInternetRules" : [ { "id" : "00000000-0000-0000-0000-000000000000", "priority" : 1, "action" : "deny", "protocolNum" : 6, "sourceIp" : "192.168.0.0/24", "targetIp" : "192.168.0.0/24", "sourcePort" : 6, "endSourcePort" : 6, "targetPort" : 6, "endTargetPort" : 6, "ipsProfile" : "strict", "avProfile" : "default", "urlProfile" : "default", "sourceIpAddressSets" : [ "sourceIpAddressSet" ], "targetIpAddressSets" : [ "targetIpAddressSet" ], "sourceGeoLocationSets" : [ { "key" : "", "name" : "" } ], "targetGeoLocationSets" : [ { "key" : "", "name" : "" } ], "sourceDomainSets" : [ "sourceDomainSet" ], "targetDomainSets" : [ "targetDomainSet" ], "sourceFeeds" : "ipFeed01", "ipFeed02" , "targetFeeds" : "ipFeed01", "ipFeed02" , "appGroups" : [ "appGroup" ], "effectiveTimeId" : "00000000-0000-0000-0000-000000000000", "effectiveTimeName" : "effectiveTimeName", "fileProfile" : "fileProfile01" } ], "policyType" : false, "securityZone" : { "securityInterZones" : [ [ "test_1" ] ] }, "enableSecurityZones" : true, "securityZones" : { "sourceZones" : [ "test_1" ], "destZones" : [ "test_2" ] } } ] }
  • 响应示例 返回状态码为200:查询成功,响应体参考DeviceAlarmStatus。 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" : "error", "data" : { "deviceTotalCount" : 5, "normalDeviceCount" : 1, "warningDeviceCount" : 1, "faultyDeviceCount" : 1, "offlineDeviceCount" : 1, "unregistedDeviceCount" : 1, "alarmCriticalCount" : 1, "alarmMajorCount" : 1, "alarmMinorCount" : 1, "alarmWarningCount" : 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
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 queryParam 是 REFERENCE 详细请参见表2。 查询参数。 - 表2 DeviceAlarmStatusQueryParam对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 siteId 是 string - - 站点标识,uuid格式。 "ea25fdbf-8dee-4823-bac2-5bfe8e3359ca" deviceCategory 是 string 1~5个字符。 - 设备类型,该字段可以设置为以下几种: a) AP:接入点 b) LSW:交换机 c) FW:防火墙 d) AR:接入路由器 e) WAC:WAC设备 f) ALL:所有设备 "AP"
  • 请求示例 HTTP的示例 POST /controller/campus/v1/oamservice/device/alarm 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" : "ea25fdbf-8dee-4823-bac2-5bfe8e3359ca", "deviceCategory" : "AP" }
  • 响应参数 返回状态码为200:查询成功,响应体参考DeviceAlarmStatus。 表3 DeviceAlarmStatus对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "error" data REFERENCE 详细请参见表4。 返回数据模型 - 表4 DeviceAlarmStatusDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 deviceTotalCount integer - - 设备总数。 5 normalDeviceCount integer - - 正常设备总数。 1 warningDeviceCount integer - - 提示设备总数。 1 faultyDeviceCount integer - - 故障设备总数。 1 offlineDeviceCount integer - - 离线设备总数。 1 unregistedDeviceCount integer - - 未注册设备总数。 1 alarmCriticalCount integer - - 紧急告警总数。 1 alarmMajorCount integer - - 严重告警总数。 1 alarmMinorCount integer - - 一般告警总数。 1 alarmWarningCount integer - - 提示告警总数。 1 返回状态码为400:参数非法,查询失败,无响应体。 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:修改设备成功,响应体参考BatchUpdateNameResult。 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 { "errorCode" : "0", "errorMessage" : "设备不存在", "success" : [ { "errorCode" : "0", "errorMessage" : "设备不存在", "deviceId" : "00000000-0000-0000-0000-000000000001", "deviceNewName" : "newAR1", "deviceOldName" : "oldAR1" } ], "fail" : [ { "errorCode" : "0", "errorMessage" : "设备不存在", "deviceId" : "00000000-0000-0000-0000-000000000001", "deviceNewName" : "newAR1", "deviceOldName" : "oldAR1" } ] } 返回状态码为400:设备ID格式错误时返回,响应体参考ErrorResponse。 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 { "errorCode" : "0x00c80035", "errorMessage" : "参数非法" } 返回状态码为500:服务内部异常时返回,响应体参考ErrorResponse。 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 { "errorCode" : "0x00c80035", "errorMessage" : "参数非法" }
  • 请求示例 HTTP的示例 PUT /v1/devicemgr/access-approvals/action/batch-update-name 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 { "devices" : [ { "deviceId" : "00000000-0000-0000-0000-000000000001", "deviceNewName" : "newAR1" } ] }
  • 响应参数 返回状态码为200:修改设备成功,响应体参考BatchUpdateNameResult。 表4 BatchUpdateNameResult对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errorCode string 1~10个字符。 - 错误码,0表示成功,1表示失败,2表示部分成功 "0" errorMessage string 1~100个字符。 - 错误原因 "设备不存在" success ARRAY_REFERENCE 0-1000个列表项,详细请参见表5。 修改成功的设备信息列表。 - fail ARRAY_REFERENCE 0-1000个列表项,详细请参见表5。 修改失败的设备信息列表。 - 表5 UpdateNameData对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errorCode string 1~10个字符。 - 错误码,0表示成功,1表示失败 "0" errorMessage string 1~100个字符。 - 错误原因 "设备不存在" deviceId string 1~64个字符。 - 设备ID。 "00000000-0000-0000-0000-000000000001" deviceNewName string 0~64个字符。 - 设备新名称,设备名称不能包含"?"或者制表符TAB。 "newAR1" deviceOldName string 0~64个字符。 - 设备旧名称,设备名称不能包含"?"或者制表符TAB。 "oldAR1" 返回状态码为400:设备ID格式错误时返回,响应体参考ErrorResponse。 ErrorResponse对象的参数列表,详细请参见表5。 返回状态码为500:服务内部异常时返回,响应体参考ErrorResponse。 ErrorResponse对象的参数列表,详细请参见表5。
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 updateParameters 是 REFERENCE 详细请参见表2。 批量修改设备入参模型。 - 表2 BatchUpdateNameParameters对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 devices 是 ARRAY_REFERENCE 1-1000个列表项,详细请参见表3。 设备名称列表 - 表3 DeviceNameDto对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 string 1~64个字符。 - 设备ID "00000000-0000-0000-0000-000000000001" deviceNewName 否 string 0~64个字符。 - 设备新名称,设备名称不能包含"?"或者制表符TAB "newAR1"
  • 请求示例 HTTP的示例 DELETE /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-cli:command-aliases 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-cli:command-aliases 表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:更新站点成功,响应体参考SiteResponse。 SiteResponse对象的参数列表,详细请参见表11。 返回状态码为202:请求正在处理中,请求处理详情请通过“查询业务编排结果”接口,确认是否处理成功。响应体参考SiteResponse。 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:更新站点成功,响应体参考SiteResponse。 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", "name" : "site1", "locations" : [ { "name" : "Beijing", "address" : "Beijing", "floor" : "5F", "postcode" : "100000", "latitude" : "39.92", "longitude" : "116.46" } ], "devices" : [ { "deviceId" : "a99f794e-b510-438c-a75d-de59f02347eb", "locationName" : "nanjing" } ], "siteType" : "single-gateway", "interLink" : { "type" : "l3-interface", "enableGre" : false, "vlanMin" : 4000, "vlanMax" : 4008, "extendVlans" : ["1:9"], "portPairs" : [ { "device1PortId" : "a99f794e-b510-438c-a75d-de59f02347eb", "device2PortId" : "a99f794e-b510-438c-a75d-de59f02347eb", "device1Id" : "a99f794e-b510-438c-a75d-de59f02347eb", "device1PortType" : "GE", "device1PortNum" : "0/0/1", "device1PortAddress" : "192.168.101.1", "device1PortMask" : 24, "device2Id" : "a99f794e-b510-438c-a75d-de59f02347eb", "device2PortType" : "GE", "device2PortNum" : "0/0/1", "device2PortAddress" : "192.168.101.1", "device2PortMask" : 24 } ], "mtu" : 1500, "mss" : 1200 }, "role" : ["sd-wan-edge","evpn-rr"], "controlPoints" : ["a99f794e-b510-438c-a75d-de59f02347eb"], "timeZone" : "(UTC+08:00)Beijing,Chongqing,Hong Kong,Urumqi", "enableSummerConfig" : "", "enableAutoConfig" : true, "daylightSavingTime" : { "name" : "Atlantic/Canary", "offset" : "01:00", "enableWeekDay" : false, "startTime" : { "month" : "Jan", "time" : "23:59", "week" : "first", "weekday" : "Mon", "day" : 21 }, "stopTime" : { "month" : "Jan", "time" : "23:59", "week" : "first", "weekday" : "Mon", "day" : 21 } }, "contact" : { "responsiblePerson" : "Jack Lee", "phoneNumber" : "152xxxxxxxx", "emails" : ["xxx@xxx.xxx"] }, "description" : "sdwan Site", "tag" : "tagHub", "isolated" : false, "enhancedMode" : false } ], "fail" : [ { "errcode" : "0", "errmsg" : "", "data" : { "id" : "a99f794e-b510-438c-a75d-de59f02347eb", "name" : "site1", "locations" : [ { "name" : "Beijing", "address" : "Beijing", "floor" : "5F", "postcode" : "100000", "latitude" : "39.92", "longitude" : "116.46" } ], "devices" : [ { "deviceId" : "a99f794e-b510-438c-a75d-de59f02347eb", "locationName" : "nanjing" } ], "siteType" : "single-gateway", "interLink" : { "type" : "l3-interface", "enableGre" : false, "vlanMin" : 4000, "vlanMax" : 4008, "extendVlans" : ["1:9"], "portPairs" : [ { "device1PortId" : "a99f794e-b510-438c-a75d-de59f02347eb", "device2PortId" : "a99f794e-b510-438c-a75d-de59f02347eb", "device1Id" : "a99f794e-b510-438c-a75d-de59f02347eb", "device1PortType" : "GE", "device1PortNum" : "0/0/1", "device1PortAddress" : "192.168.101.1", "device1PortMask" : 24, "device2Id" : "a99f794e-b510-438c-a75d-de59f02347eb", "device2PortType" : "GE", "device2PortNum" : "0/0/1", "device2PortAddress" : "192.168.101.1", "device2PortMask" : 24 } ], "mtu" : 1500, "mss" : 1200 }, "role" : ["sd-wan-edge","evpn-rr"], "controlPoints" : ["a99f794e-b510-438c-a75d-de59f02347eb"], "timeZone" : "(UTC+08:00)Beijing,Chongqing,Hong Kong,Urumqi", "enableSummerConfig" : "", "enableAutoConfig" : true, "daylightSavingTime" : { "name" : "Atlantic/Canary", "offset" : "01:00", "enableWeekDay" : false, "startTime" : { "month" : "Jan", "time" : "23:59", "week" : "first", "weekday" : "Mon", "day" : 21 }, "stopTime" : { "month" : "Jan", "time" : "23:59", "week" : "first", "weekday" : "Mon", "day" : 21 } }, "contact" : { "responsiblePerson" : "Jack Lee", "phoneNumber" : "152xxxxxxxx", "emails" : ["xxx@xxx.xxx"] }, "description" : "sdwan Site", "tag" : "tagHub", "isolated" : false, "enhancedMode" : false } } ], "processInstanceId" : "" } 返回状态码为202:请求正在处理中,请求处理详情请通过“查询业务编排结果”接口,确认是否处理成功。响应体参考SiteResponse。 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
  • 请求示例 HTTP的示例 PUT /controller/campus/v1/sdwan/net/sites 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 { "sites" : [ { "id" : "a99f794e-b510-438c-a75d-de59f02347eb", "name" : "site1", "locations" : [ { "name" : "Beijing", "address" : "Beijing", "floor" : "5F", "postcode" : "100000", "latitude" : "39.92", "longitude" : "116.46" } ], "devices" : [ { "deviceId" : "a99f794e-b510-438c-a75d-de59f02347eb", "locationName" : "nanjing" } ], "siteType" : "single-gateway", "interLink" : { "type" : "l3-interface", "enableGre" : false, "vlanMin" : 4000, "vlanMax" : 4008, "extendVlans" : ["1:9"], "portPairs" : [ { "device1PortId" : "a99f794e-b510-438c-a75d-de59f02347eb", "device2PortId" : "a99f794e-b510-438c-a75d-de59f02347eb", "device1Id" : "a99f794e-b510-438c-a75d-de59f02347eb", "device1PortType" : "GE", "device1PortNum" : "0/0/1", "device1PortAddress" : "192.168.101.1", "device1PortMask" : 24, "device2Id" : "a99f794e-b510-438c-a75d-de59f02347eb", "device2PortType" : "GE", "device2PortNum" : "0/0/1", "device2PortAddress" : "192.168.101.1", "device2PortMask" : 24 } ], "mtu" : 1500, "mss" : 1200 }, "role" : ["sd-wan-edge","evpn-rr"], "controlPoints" : ["a99f794e-b510-438c-a75d-de59f02347eb"], "timeZone" : "(UTC+08:00)Beijing,Chongqing,Hong Kong,Urumqi", "enableSummerConfig" : "", "enableAutoConfig" : true, "daylightSavingTime" : { "name" : "Atlantic/Canary", "offset" : "01:00", "enableWeekDay" : false, "startTime" : { "month" : "Jan", "time" : "23:59", "week" : "first", "weekday" : "Mon", "day" : 21 }, "stopTime" : { "month" : "Jan", "time" : "23:59", "week" : "first", "weekday" : "Mon", "day" : 21 } }, "contact" : { "responsiblePerson" : "Jack Lee", "phoneNumber" : "152xxxxxxxx", "emails" : ["xxx@xxx.xxx"] }, "description" : "sdwan Site", "tag" : "tagHub", "isolated" : false, "enhancedMode" : false } ] }
  • 请求示例 HTTP的示例 PUT /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" : [ { "config-status" : "configured-database-success", "last-committed-time" : "2022-01-01 00:00:00", "related-pkg-version" : "1.0.1", "edit-state" : "RUNNING", "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
  • 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"
  • 响应示例 返回状态码为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 { "huawei-nce-e-ifm:interface" : [ { "config-status" : "configured-database-success", "last-committed-time" : "2022-01-01 00:00:00", "related-pkg-version" : "1.0.1", "edit-state" : "RUNNING", "name" : "10GE0/0/0", "ifm-class" : "main-interface", "type" : "10GE", "parent-if-name" : "10GE0/0/0", "number" : "0/0/0", "level" : "L3", "vpn-instance" : "vpn1", "admin-status" : "down", "description" : "the interface for underlay", "bandwidth" : { "bandwidth" : 20, "bandwidth-kbps" : 20 }, "trunk" : { "members" : [ { "interface-name" : "10GE0/0/0" } ] }, "ethernet" : { "negotiation-mode" : "enabled", "combo-mode" : "copper", "duplex" : "full", "speed" : "1000M" } } ] } 返回状态码为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 /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-ifm:interface 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:操作成功。 表3 interface-list对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-e-ifm:interface ARRAY_REFERENCE 详细请参见表4。 接口配置参数。 - 表4 nes-ne-interface对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 config-status string reserved initial configuring-database configured-database-success configured-database-failed configuring-device configured-device-success configured-device-failed reserved 配置状态,对应保留未用状态、初始状态、数据库存储中状态、预配置状态、数据库存储失败状态、部署中状态、成功状态、失败状态;不支持编辑,仅查询返回。 "configured-database-success" last-committed-time string 0~255个字符。 - 最后提交时间,该特性最后提交时间;不支持编辑,仅查询返回。 "2022-01-01 00:00:00" related-pkg-version string 0~255个字符。 - 包版本,插件包版本;不支持编辑,仅查询返回。 "1.0.1" edit-state string RUNNING CANDIDATE UNDEPLOYING UNDEPLOYED - 编辑状态,对应运行状态、候选状态、取消部署状态、未部署状态;不支持编辑,仅查询返回。 "RUNNING" name string 1~63个字符。 - 接口名称。名称规则:接口类别为主接口时,由物理类型、接口号拼接而成,如GE0/0/0、LoopBack1,接口类别为子接口时,由父接口名称、英文点、接口号拼接而成,如GE0/0/0.1、LoopBack1.1,单一主键字段。 "10GE0/0/0" ifm-class string main-interface sub-interface - 接口类别,主接口或子接口。 "main-interface" type string GigabitEthernet GEBrief 10GE LoopBack Eth-Trunk Tunnel Vlanif 25GE 40GE 100GE 400GE Vbdif Nve - 物理类型,AR6700V支持范围:GE、Nve、Vbdif、LoopBack。 "10GE" parent-if-name string 1~63个字符。 - 父接口名称,当接口类别为子接口时配置。 "10GE0/0/0" number string 1~63个字符。 - 接口号。物理类型为GE时,格式为A/B/C,其他物理类型时格式为数字。 "0/0/0" level string L3 L2 - 接口类型,L2或L3,AR6700V仅支持L3。 "L3" vpn-instance string 1~31个字符。 _public_ 接口所属的VPN,当接口类型为L3时配置。GE口、Vbdif绑定的VPN互斥,Nve口仅能绑定GE口已经绑定的VPN。 "vpn1" admin-status string down up - 接口的管理状态。该节点支持的能力因接口类型而异。 "down" description string 1~242个字符。 - 接口描述。 "the interface for underlay" bandwidth REFERENCE 详细请参见表5。 带宽配置。 - trunk REFERENCE 详细请参见表6。 Eth-Trunk成员,AR6700V不支持。 - ethernet REFERENCE 详细请参见表8。 接口物理属性,AR6700V不支持。 - 表5 bandwidth对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 bandwidth int64 [1-1000000] - 带宽Mbps。 20 bandwidth-kbps int64 [1-1000000] - 带宽Kbps。AR6700V-L款型不支持。 20 表6 trunk对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 members ARRAY_REFERENCE 详细请参见表7。 Eth-Trunk成员。 - 表7 trunk-members对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 interface-name string 1~63个字符。 - 接口名称,单一主键字段。 "10GE0/0/0" 表8 ethernet对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 negotiation-mode string enabled disabled - 协商模式。 "enabled" combo-mode string copper fiber - 接口工作模式。 "copper" duplex string full half - 双工模式。 "full" speed string 10M 100M 1000M 10G 25G 40G 100G 400G - 速率。 "1000M" 返回状态码为400:请求参数错误。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • URI /restconf/v2/data/huawei-ac-nes-device:nes/ne/{id}/huawei-nce-e-ifm:interface 表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:查询成功。 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" : { "cliEnable" : false, "modifiable" : false } }
  • 请求示例 HTTP的示例 GET /controller/campus/v1/networkservice/networkconfig/net/cliap 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:查询成功。 表1 CliApResponseDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" data REFERENCE 详细请参见表2。 设备本地CLI配置开关返回数据 - 表2 CliApOutDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 cliEnable boolean true false - 设备本地CLI配置开关状态。 false modifiable boolean true false - msp是否授权租户修改设备本地CLI配置开关。当modifiable为false时,需要向MSP申请授权后,才能修改设备本地CLI配置开关。 false
  • 响应示例 返回状态码为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
共100000条
提示

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