华为云用户手册

  • 响应示例 返回状态码为200:删除站点成功,响应体参考deleteSiteOut。 HTTP/1.1 200 OK Date: Sun,16 Feb 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" : ["ea25fdbf-8dee-4823-bac2-5bfe8e3359ca"], "fail" : [ { "errcode" : "0", "errmsg" : "", "data" : "ea25fdbf-8dee-4823-bac2-5bfe8e3359ca" } ] } 返回状态码为400:参数校验异常,无响应体。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 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,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 响应参数 返回状态码为200:接口调用成功,响应体参考QueryOpsParamResponse。 表2 QueryOpsParamResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" totalRecords int32 - - 总的数据条数。 1 pageSize int32 - - 每页显示数量。 10 pageIndex int32 - - 当前页数。 1 data ARRAY_REFERENCE 0-10个列表项,详细请参见表5。 OPS参数信息。 - 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:接口调用成功,响应体参考QueryOpsParamResponse。 HTTP/1.1 200 OK Date: Sun,16 Feb 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, "pageSize" : 10, "pageIndex" : 1, "data" : [ { "siteId" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "cloudType" : "HUAWEI", "publicKey" : "xxxx-xxxx-xxxx", "secretKey" : "********", "regionId" : "cn-north-1", "vpcId" : "00000000-0000-0000-0000-000000000000", "activeNextHopId" : "00000000-0000-0000-0000-000000000000", "standbyNextHopId" : "00000000-0000-0000-0000-000000000000" } ] } 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 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,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • URI /controller/campus/v1/sdwan/net/cloud/ops 表1 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 siteId 否 uuid 0~36个字符。 - 站点ID,UUID格式。 "00000000-0000-0000-0000-000000000000" pageIndex 否 int32 [1-65535] 1 当前页数,默认是1。 - pageSize 否 int32 [1-100] 20 每页显示数量,默认是20。 -
  • 请求示例 HTTP的示例 GET /controller/campus/v1/sdwan/net/cloud/ops?siteId=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
  • 响应示例 返回状态码为200:操作成功。 { "errcode": "0", "errmsg": "", "successList": [ "de5813f8ff1e41f5ba9c324da70b49ed1c2e" ], "failList": [ "de5813f8ff1e41f5ba9c324da70b49ed1c1e" ] } 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 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,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求示例 HTTP的示例 { "type": "on", "acDeviceId": "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "siteId": "e8f87269-0108-44d4-97cd-4fe7b0b3ded5", "apDeviceIds": [ "fbb684c8-0d37-496f-bafa-4b06d5151e2e" ] }
  • 请求示例 HTTP的示例 PUT /controller/campus/v2/banner/banner 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" : "", "templateName" : "templateName", "bannerBefore" : "header shell information Telecom Italia S.p.A.", "bannerAfter" : "UNAUTHORIZED ACCESS TO THIS NETWORK DEVICE IS PROHIBITED You must haveexplicit permission to access or configure this deviceAll activities performed on this device may be logged based on TISecurity Policy" }
  • 响应示例 返回状态码为200:接口调用成功,响应体参考CommonResponse。 HTTP/1.1 200 OK Date: Sun,16 Feb 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:Invalid tag value HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 响应参数 返回状态码为200:查询成功,响应体参考QuerySiteLoadBalanceRes。 表2 QuerySiteLoadBalanceRes对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" loadBalanceMode string 1~36个字符。 PREFER_LOCAL LOCAL_AND_PEER - 负载分担模式。 "LOCAL_AND_PEER" 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 GET /controller/campus/v1/sdwan/policy/traffic/traffic-steering-policies/site/load-balance-mode/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
  • 响应示例 返回状态码为200:查询成功,响应体参考QuerySiteLoadBalanceRes。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "", "loadBalanceMode" : "LOCAL_AND_PEER" } 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 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,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • URI /controller/campus/v1/sdwan/policy/traffic/traffic-steering-policies/site/load-balance-mode/{siteId} 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 siteId 是 string 1~64个字符。 - 站点ID。 "00000000-0000-0000-0000-000000000000"
  • 响应示例 返回状态码为200:查询成功,响应体参考GetPolicyResponse。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "1", "errmsg" : "error", "data" : [ { "deviceId" : "356da474-d2da-4a90-a119-e07408684e97", "signatureDatabaseType" : "ip-reputation", "version" : "2017010101", "status" : -1, "lastUpgradeTime" : 0, "nextUpgradeTime" : 0 } ] } 返回状态码为400:请求参数错误,无响应体。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 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,16 Feb 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/oamservice/saupgrade/sites/ea25fdbf-8dee-4823-bac2-5bfe8e3359cad 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:查询成功,响应体参考GetPolicyResponse。 表2 GetPolicyResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~10个字符。 - 错误码。 "1" errmsg string - - 错误信息。 "error" data ARRAY_REFERENCE 1-100个列表项,详细请参见表3。 升级策略详情。 - 表3 UpgradePolicydetail对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 deviceId string 36个字符。 - 设备标识,UUID格式。 "356da474-d2da-4a90-a119-e07408684e97" signatureDatabaseType string ip-reputation antivirus intrusion-prevention file-reputation cnc application - 设备特征库升级类型。 "ip-reputation" version string 1~36个字符。 - 设备特征库版本。 "2017010101" status integer -1 0 1 3 10 11 - 设备特征库升级状态。取值如下:-1---升级失败,0---未配置,1---初始化 ,3---未要求升级 ,10---升级完成,11---升级中。 -1 lastUpgradeTime int64 [0-1568044800561] - 上次特征库升级时间,UTC时间格式(毫秒)。 0 nextUpgradeTime int64 [0-1568044800561] - 下次特征库升级时间,UTC时间格式(毫秒)。 0 返回状态码为400:请求参数错误,无响应体。 详细信息请参见实际响应消息体。 返回状态码为500:服务内部错误,无响应体。 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 GET /controller/campus/v1/performanceservice/endpointbehavior/realtimeflow?siteId=9dffc44b-1824-42a4-ac48-616e3f0eaa2a&tagId=31f35021-e656-472a-8937-9c6d6da76e6e 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:接口调用成功,响应体参考FlowDistrResp。 HTTP/1.1 200 OK Date: Sun,16 Feb 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" : [ { "targetName" : "humanflow", "counts" : [ { "count" : "123", "stamp" : 1565049600000 } ] } ] } 返回状态码为400:参数非法,查询失败。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • URI /controller/campus/v1/performanceservice/endpointbehavior/realtimeflow 表1 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 siteId 否 string - - 站点ID,UUID格式。不传默认租户级查询. "9dffc44b-1824-42a4-ac48-616e3f0eaa2a" tagId 否 string - - 标签ID,UUID格式,若不设置,则默认查询站点下所有设备。 "31f35021-e656-472a-8937-9c6d6da76e6e"
  • SNMP缺省模板介绍(仅V300版本AR设备) 如果SNMP首次下发到设备失败,必须将SNMP配置回滚到首次下发之前,然后重新对设备下发SNMP配置。 为保证更好的安全性,建议使用SNMPv3版本。 通过以下模板完成SNMPv2功能的配置,配置流程如下: 步骤 配置功能 使用模板 step1 创建ACL CreateACL模板,参考ACL缺省模板介绍ACL缺省模板介绍(仅V300版本AR设备)。 step2 创建团体名 SNMPCommunity模板(表1),其中SNMPCommunity的community_acl依赖模板CreateACL的acl_num。 step3 创建traphost SNMPv2TrapHost模板(表2),其中SNMPv2TrapHost的security_name依赖模板SNMPCommunity的community_name。 通过以下模板完成SNMPv3功能的配置,配置流程如下: 步骤 配置功能 使用模板 step1 创建V3用户组和用户名 SNMPv3CreateUser模板(表3)。 step2 创建traphost SNMPv3TrapHost模板(表4),其中SNMPv3TrapHost的user_name依赖模板SNMPv3CreateUser的user_name。 表1 SNMPCommunity模板参数介绍 参数名称 类型 取值范围 参数说明 community_acl Int 只支持基本ACL范围:2000~2999 团体名关联ACL编号,为已创建的ACL。 community_name String 8~32或88 SNMP团体名称,字符串形式,不支持空格,区分大小写。 当输入的字符串长度在8-32之间时,系统默认为是明文输入,会对明文加密。 当输入的字符串长度为88时,系统默认为密文输入,讲判断该密文能否解析。 说明: 至少包含两种字符,包括:大写字母、小写字母、数字、特殊字符。 index String 1~32 SNMP团体名索引,区分大小写。 下发到设备的命令行: snmp-agent community read community_name acl 2001 community_name为密文形式。 表2 SNMPv2TrapHost模板参数介绍 参数名称 类型 取值范围 参数说明 snmp_host String - 目的主机的IP地址,支持IPv4地址格式。 snmp_port Int 1~65535 目的主机用于接收Trap报文的端口号。 vpn_instance_name String 1~31 VPN实例名,不支持空格,区分大小写。 snmp_param_name String 1~32 目的主机使用的Trap报文发送参数信息列表名称,区分大小写。 queue_size Int 1~1000,缺省值为100 报文队列长度。 complexity_check Boolean true或false 配置团体名、SNMPv3用户认证密码和SNMPv3用户加密密码复杂度检查功能。 source_interface String - 发送Trap报文的源接口类型和编号: GigabitEthernet:例如:GigabitEthernet0/0/1。 GigabitEthernet子接口:例如:GigabitEthernet0/0/1.10。 XGigabitEthernet:例如:XGigabitEthernet0/0/2。 XGigabitEthernet子接口:例如:XGigabitEthernet0/0/2.10。 Ethernet:例如:Ethernet1/0/1。 Ethernet子接口:例如:Ethernet1/0/1.10。 LoopBack :例如:LoopBack10。 Tunnel :例如:Tunnel10/0/10。 Vlanif:例如:Vlanif10。 Etrunk:例如:Eth-Trunk3。 security_name String 可输入的字符串长度: 1~32(明文) 48~68(密文) 生成Trap报文的主体名。 下发到设备的命令行: snmp-agent sys-info version v2c snmp-agent target-host trap-hostname snmp_host address snmp_host udp-port snmp_port vpn-instance vpn_instance_name trap-paramsname snmp_param_name snmp-agent target-host trap-paramsname snmp_param_name v2c securityname security_name snmp-agent trap source source_interface snmp-agent trap enable undo snmp-agent trap enable feature-name bgp trap-name ESTABLISHED undo snmp-agent trap enable feature-name bgp trap-name BACKWARD snmp-agent trap queue-size queue_size snmp-agent complexity-check disable security_name为密文形式。 表3 SNMPv3CreateUser模板参数介绍 参数名称 类型 取值范围 参数说明 user_name String 1~32 用户名,字符串形式,不支持空格,区分大小写。 user_group String 1~32 SNMPv3用户对应的组名,字符串形式,不支持空格,区分大小写。 priv_algorithm String 取值为: aes128:AES-128 aes256:AES-256 使用aes128或aes256加密算法对报文中的PDU部分进行加密。 auth_key String - 表示认证协议为HMAC-SHA-96的认证密码。规则如下: 不可以和priv_key相同。 长度范围为8-64字符。 至少包含2种特殊字符:大写字母、小写字母、数字、特殊字符(不包括空格)。 字符要先转换成ASCII码,ASCII码只保留后两位,使用英文冒号“:”隔开。例如:“Example@1234”对应ASCII码“\u0045\u0078\u0061\u006d\u0070\u006c\u0065\u0040\u0031\u0032\u0033\u0034”,则输入为:“45:78:61:6d:70:6c:65:40:31:32:33:34”。 priv_key String - 加密算法为AES-128或AES-256的加密密码。规则如下: 不可以和auth_key相同。 长度范围为8-64字符。 至少包含2种特殊字符:大写字母、小写字母、数字、特殊字符(不包括空格)。 字符要先转换成ASCII码,ASCII码只保留后两位,使用英文冒号“:”隔开。例如:“Example@123”对应ASCII码“\u0041\u0064\u006d\u0069\u006e\u0040\u0031\u0032\u0033”,则输入为:“45:78:61:6d:70:6c:65:40:31:32:33”。 security_level String 取值为: no-auth-no-priv:既不认证也不加密 auth-no-priv:认证但不加密 auth-priv:既认证又加密 SNMPv3用户组的安全级别。 下发到设备的命令行: snmp-agent group v3 user_group authentication write-view ViewDefault notify-view ViewDefault snmp-agent usm-user v3 user_name snmp-agent usm-user v3 user_name group user_group snmp-agent usm-user v3 user_name authentication-mode sha auth_key snmp-agent usm-user v3 user_name privacy-mode priv_algorithm priv_key auth_key和priv_algorithm priv_key为密文形式。 表4 SNMPv3TrapHost模板参数介绍 参数名称 类型 取值范围 参数说明 snmp_host ip address - 目的主机的IP地址,支持IPv4地址格式。 snmp_port Int 1~65535 目的主机用于接收Trap报文的端口号。 snmp_param_name String 1~32 目的主机使用的Trap报文发送参数信息列表名称,区分大小写。 vpn_instance_name String 1~31 VPN实例名,不支持空格,区分大小写。 queue_size Int 1~1000,缺省值为100 报文队列长度。 complexity_check Boolean true或false 配置团体名、SNMPv3用户认证密码和SNMPv3用户加密密码复杂度检查功能。 source_interface String - 发送Trap报文的源接口类型和编号: GigabitEthernet:例如:GigabitEthernet0/0/1。 GigabitEthernet子接口:例如:GigabitEthernet0/0/1.10。 XGigabitEthernet:例如:XGigabitEthernet0/0/2。 XGigabitEthernet子接口:例如:XGigabitEthernet0/0/2.10。 Ethernet:例如:Ethernet1/0/1。 Ethernet子接口:例如:Ethernet1/0/1.10。 LoopBack :例如:LoopBack10。 Tunnel :例如:Tunnel0/0/10。 Vlanif:例如:Vlanif10。 Eth-Trunk:例如:Eth-Trunk3。 user_name String 1~32 用户名,字符串形式,不支持空格,区分大小写。 security_level String 取值为: no-auth-no-priv:既不认证也不加密 auth-no-priv:认证但不加密 auth-priv:既认证又加密 SNMPv3用户组的安全级别。 下发到设备的命令行: snmp-agent target-host trap-hostname snmp_host address snmp_host udp-port snmp_port vpn-instance vpn_instance_name trap-paramsname snmp_param_name snmp-agent target-host trap-paramsname snmp_param_name v3 securityname user_name security_level snmp-agent trap source source_interface snmp-agent trap enable undo snmp-agent trap enable feature-name bgp trap-name ESTABLISHED undo snmp-agent trap enable feature-name bgp trap-name BACKWARD snmp-agent trap queue-size queue_size snmp-agent complexity-check disable security_name为密文形式。 父主题: iMaster NCE-Campus内置缺省模板参数介绍
  • 响应示例 返回状态码为200:文件查询成功返回。响应体参考QueryFileResponse HTTP/1.1 200 OK Date: Sun,16 Feb 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" : 20, "totalRecords" : 1, "fileInfoList" : [ { "fileId" : "7d4ea473-dc8b-4acc-8cf9-0a550cbb09e6", "subFileDetails" : [ { "fileId" : "7d4ea473-dc8b-4acc-8cf9-0a550cbb09e6", "subFileDetails" : [ { ... } ], "currentUserUpload" : true, "fileType" : 20, "feature" : 22, "version" : "1.1", "fileName" : "test.xml", "description" : "文件描述", "tenantName" : "tenant", "fileSize" : "0", "offset" : 0, "sizeUnit" : "B", "uploadProgress" : 100, "createTime" : "2022-10-25 21:01:35", "iconString" : null, "storageTypesSupport" : [ { ... } ], "fileServerName" : " FusionInsight ", "manualRecord" : 0, "status" : 1, "needToReboot" : false, } ], "currentUserUpload" : true, "fileType" : 20, "feature" : 22, "version" : "1.1", "fileName" : "test.xml", "description" : "文件描述", "tenantName" : "tenant", "fileSize" : "0", "offset" : 0, "sizeUnit" : "B", "uploadProgress" : 100, "createTime" : "2022-10-25 21:01:35", "iconString" : "", "storageTypesSupport" : [ "" ], "fileServerName" : "FusionInsight", "manualRecord" : 0, "status" : 1, "needToReboot" : false } ] } 返回状态码为400:参数错误。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 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,16 Feb 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/baseservice/api/v1/filemgr/files/action/batch-query 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 [ "1" ]
  • 请求示例 HTTP的示例 DELETE /controller/campus/v1/networkservice/networkconfig/profile/apvpn/encryptionpolicy/fbb684c8-0d37-496f-bafa-4b06db151e2e 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
  • 响应示例 返回状态码为204:配置成功。 HTTP/1.1 204 No Content Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "" }
  • URI /controller/campus/v1/networkservice/networkconfig/profile/apvpn/encryptionpolicy/{id} 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 id 是 string 32~36个字符。 - 策略ID。 "fbb684c8-0d37-496f-bafa-4b06db151e2e"
  • 请求示例 HTTP的示例 POST /controller/campus/v1/oamservice/certification/device/certificate 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 { "deviceId" : "00000000-0000-0000-0000-000000000000", "caServerId" : "00000000-0000-0000-0000-000000000000", "algorithm" : "rsa", "algLength" : "4096", "entity" : { "ipAddress" : "10.1.1.1", "fqdn" : "test.abc.com", "email" : "user@abc.com", "country" : "cn", "state" : "jiangsu", "organization" : "huawei", "department" : "huawei" }, "transportNetworkPortId" : "00000000-0000-0000-0000-000000000000", "challengePwd" : "password", "vpnId" : "18bd7aec-f163-4091-bc5e-d6c19725d72c", "vpnInstanceName" : "vpn1", "sourceInterface" : "loopback1", "urlMode" : 0, "sslClientVersion" : "tls1.2", "sslClientCipher" : 16, "pkiDomain" : "default" }
  • 响应示例 返回状态码为200:更新成功,响应体参考ReplaceDeviceCertificateResponseDto。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "", "certificationStatus" : "1" } 返回状态码为400:校验异常,无响应体。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 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,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 响应参数 返回状态码为200:更新成功,响应体参考ReplaceDeviceCertificateResponseDto。 表4 ReplaceDeviceCertificateResponseDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 1~64个字符。 - 错误码。 "0" errmsg string 1~64个字符。 - 错误信息。 "" certificationStatus string 1~64个字符。 - 该字段可能包含敏感信息和个人数据,请妥善做好保护。 证书状态(0:初始化,1:申请中,2:申请成功,3:申请失败)。 "1" 返回状态码为400:校验异常,无响应体。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误,无响应体。 详细信息请参见实际响应消息体。
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 replaceDeviceCertificateDto 是 REFERENCE 详细请参见表2。 替换设备证书。 - 表2 ReplaceDeviceCertificateDto对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 string 0~64个字符。 - 设备ID。 "00000000-0000-0000-0000-000000000000" caServerId 是 string 0~64个字符。 - CA服务器ID。 该字段对应UI页面上是:UI【选择CA服务】 "00000000-0000-0000-0000-000000000000" algorithm 是 string 0~16个字符。 - 密钥算法(支持算法:RSA),只支持小写。 该字段对应UI页面上是:UI【密钥算法】 "rsa" algLength 是 string 0~8个字符。 - 密钥长度,该字段可以设置为以下几种: a) 2048, b) 3072, c) 4096 RSA长度小于3072, 安全性较低,建议使用较为安全的协议版本。 该字段对应UI页面上是:UI【密钥长度】 "4096" entity 否 REFERENCE 详细请参见表3。 - - transportNetworkPortId 否 uuid 0~256个字符。 - TNP ID,underlay场景使用,不支持IPv6链路。 "00000000-0000-0000-0000-000000000000" challengePwd 否 password 0~128个字符。 - 该字段可能包含敏感信息和个人数据,请妥善做好保护。 SCEP证书申请通用挑战密码。 "password" vpnId 否 string 0~64个字符。 - vpnID,overlay场景使用。 "18bd7aec-f163-4091-bc5e-d6c19725d72c" vpnInstanceName 否 string 0~64个字符。 - vpn实例名称,overlay场景使用。 该字段对应UI页面上是:UI【vpn实例名称】 "vpn1" sourceInterface 否 string 0~64个字符。 - 源接口名,overlay场景使用。 该字段对应UI页面上是:UI【源接口名】 "loopback1" urlMode 否 int32 [0-1] - 协议类型,该字段的取值范围是0:http, 1:https。 HTTPS协议比HTTP协议有更多安全保证,建议选择HTTPS协议。 该字段对应UI页面上是:UI【协议类型】 0 sslClientVersion 否 string 0~6个字符。 - tls版本,当urlMode字段是1时,必须设置该字段。 该字段的取值是tls1.1或tls1.2。 TLS1.1是不安全的协议,推荐使用更安全的TLS1.2协议。 该字段对应UI页面上是:UI【版本】 "tls1.2" sslClientCipher 否 int32 [1-31] - 认证和加密算法,当urlMode字段是1时,必须设置该字段。 该字段的取值范围是,rsa-3des-cbc-sha,权重为1;rsa-aes-128-cbc-sha,权重为2;rsa-aes-128-sha256,权重为4;rsa-aes-256-sha256,权重为8;ecdhe_rsa_aes256_gcm_sha384,权重为16。可以同时支持多种算法,比如需要同时支持rsa-3des-cbc-sha和rsa-aes-128-cbc-sha时,则该字段值为3(1+2)。 基于高安全性角度考虑,不建议配置rsa-3des-cbc-sha、rsa-aes-128-cbc-sha、rsa-aes-128-sha256和rsa-aes-256-sha256。 该字段对应UI页面上是:UI【认证和加密算法】 16 pkiDomain 否 string 0~64个字符。 - PKI域,支持设备替换default域证书。 取值范围:default 不填写该字段时: a) V600设备将替换证书到证书域nce_campus_netconf, b) AR6700V及AR6700V-L设备将替换证书到证书域default_om, b) 其他设备将替换证书到证书域default。 填写该字段时,值只能填写为default: a) V600设备中,只有V600R023C10及以上版本的AR设备支持填写此字段,将替换证书到证书域default;其他V600设备不支持此字段。 b) AR6700V及AR6700V-L设备将替换证书到证书域default_om, b) 非V600设备,将替换证书到证书域default。 该字段对应UI页面上是:UI【PKI 域名 】 "default" 表3 Entity对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 ipAddress 否 string - - 该字段可能包含敏感信息和个人数据,请妥善做好保护。 IP地址。 该字段对应UI页面上是:UI【IP】 "10.1.1.1" fqdn 否 string 0~64个字符。 - 该字段可能包含敏感信息和个人数据,请妥善做好保护。 FQDN名称。 该字段对应UI页面上是:UI【FQDN名称】 "test.abc.com" email 否 string 0~64个字符。 - 该字段可能包含敏感信息和个人数据,请妥善做好保护。 电子邮箱地址。 该字段对应UI页面上是:UI【电子邮箱地址】 "user@abc.com" country 否 string 0~2个字符。 - 该字段可能包含敏感信息和个人数据,请妥善做好保护。 实体所属的国家代码。 "cn" state 否 string 0~32个字符。 - 该字段可能包含敏感信息和个人数据,请妥善做好保护。 实体所属的州或省。 "jiangsu" organization 否 string 0~32个字符。 - 该字段可能包含敏感信息和个人数据,请妥善做好保护。 实体所属的组织。 "huawei" department 否 string 0~191个字符。 - 实体所属的部门,支持输入多个部门,部门间以逗号分隔。字符类型可以是大小写字母、空格和特殊字符":"、".",使用逗号分隔部门,最多允许输入五个逗号且逗号前后不能全部为空格或为空,使用逗号分隔的单个OU长度不超过31位字符。 "huawei"
  • 请求示例 HTTP的示例 PATCH /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-dhcpv4:relay 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-dhcpv4:relay" : { "global" : { "trust-option82" : true, "reply-forward-all" : true } } }
共99354条