华为云用户手册

  • 响应参数 返回状态码为200:返回查询的配置文件变更信息 表2 NorthCfgChangeResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 code int32 - - 操作返回码(0:成功;非0:失败)。 0 description string - - 接口调用结果的描述信息。 "enterprise.app.configfilemgr.openapi.configchange.success" data REFERENCE 详细请参见表3。 配置文件变更信息 - 表3 NorthCfgChangeData对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 configChangeInfo ARRAY_REFERENCE 详细请参见表4。 配置文件变更信息 - curPage int32 - - 当前页数 1 totalPage int32 - - 总页数 1 表4 NorthCfgChangeModel对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 neDn string - - 网元的唯一标识 "657770f1-4b9b-3112-a9d3-57b31851163f" changeTime int64 - - 变更时间(UTC时间,精确到毫秒) 1599135850363 oldFile string - - 变更前文件名称 "20200903202115R.cfg" newFile string - - 变更后文件名称 "20200903202357R.cfg" fileType string - - 备份文件类型,"r":运行配置;“s”:启动配置 "r" added string - - 新增的命令 - modified string - - 修改的命令 - baseModified string - - 修改前的命令 - deleted string - - 删除的命令 - addNum int32 - - 新增的行数 0 modifyNum int32 - - 修改的行数 3 deleteNum int32 - - 删除的行数 0
  • 配置NAT Server缺省模板(仅V600版本AR设备) 表1 ConfigNatServer模板参数解释 参数名称 类型 取值范围 参数解释 name String 1~255 NAT Server的名称。不建议使用空格或特殊字符,大小写敏感。 此字段创建后不可修改,修改此参数将导致配置下发失败。 global_vpn_name String 1~31 NAT Server的公网VPN。不建议使用空格或特殊字符,大小写敏感。 global_zone String 1~32 NAT Server的公网安全域。不建议使用空格或特殊字符,大小写敏感。 protocol enum 枚举值,区分大小写。具体取值如下: icmp:表示icmp协议。 tcp:表示tcp协议。 udp:表示udp协议。 ipv6:表示Ipv6封装。 gre:表示通用路由封装协议。 esp:表示封装安全载荷。 ah:表示验证头协议。 sctp:表示流控制传输协议。 承载的协议类型。 global_start_ip String IPv4地址,格式为点分十进制。 global_start_ip:公网起始IP。格式为IPv4类型或IPv6类型。 global_end_ip:公网结束IP。格式为IPv4类型或IPv6类型。 说明: “global_start_ip”和“global_end_ip”同时配置时,不能配置“global_start_port”和“global_end_port”。 global_end_ip String IPv4地址,格式为点分十进制。 global_start_port Integer 0~65535 global_start_port:公网起始端口。仅当协议类型为tcp或udp时,NAT Server支持配置端口号。 global_end_port:公网结束端口。仅当协议类型为tcp或udp时,NAT Server支持配置端口号。 global_end_port Integer 0~65535 inside_start_ip String IPv4地址,格式为点分十进制。 inside_start_ip:私网起始IP。格式为IPv4类型或IPv6类型。 inside_end_ip:私网结束IP。格式为IPv4类型或IPv6类型。 说明: “inside_start_ip”和“inside_end_ip”同时配置时,“inside_start_port”和“inside_end_port”不可同时配置。 inside_end_ip String IPv4地址,格式为点分十进制。 inside_start_port Integer 0~65535。 inside_start_port:私网起始端口。仅当协议类型为tcp或udp时,NAT Server支持配置端口号。 inside_end_port:私网结束端口。仅当协议类型为tcp或udp时,NAT Server支持配置端口号。 inside_end_port Integer 0~65535。 reverse_enable Boolean 布尔型,具体取值如下: true。 false。 NAT Server是否支持反向转换。 如果没有配置该字段,则默认生成正反向Server-map。 inside_vpn_name String 1~31 NAT Server的私网VPN。不建议使用空格或特殊字符,大小写敏感。 下发到设备的命令: nat server name [ vpn-instance vpn-instance-name1 ] [ zone zone-name ] [ protocol protocol-type ] global global-address [ global-address-end ] inside host-address [ host-address-end ] [ no-reverse ] [ vpn-instance vpn-instance-name2 ] 父主题: iMaster NCE-Campus内置缺省模板参数介绍
  • 请求示例 HTTP的示例 POST /restconf/operations/huawei-nce-aoc-config-template-binding:query-template-bindings-with-devices Host: 192.168.1.125:26335 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AUTH-TOKEN: x-yyyyyy { "input": { "template-binding-ids": ["bfa990a2-443b-4312-a94d-be4b584de5f9"], "device-ids": ["8d394835-cb84-38f3-a4d5-36a7f2074b77"] } }
  • 响应参数 返回状态码为200:Successful operation 表4 query-template-bindings-with-devices-output对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-aoc-config-template-binding:output REFERENCE 详细请参见表5。 - - 表5 query-template-bindings-with-devices-output-body对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 template-binding ARRAY_REFERENCE 详细请参见表6。 list template binding. - 返回状态码为400:Bad Request 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:Successful operation HTTP/1.1 200 OK Date: Fri,03 Dec 2021 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "huawei-nce-aoc-config-template-binding:output": { "template-binding": [ { "template-binding-id": "bfa990a2-443b-4312-a94d-be4b584de5f9", "template-binding-name": "1705300910474", "unbound-status": false, "template": [ { "template-id": "d9acd7df-d178-46b2-bac1-da56f034ba04", "template-name": "12" } ], "device": [ { "device-id": "c7f62b8a-b6a0-478b-ad88-933c7aab1bcf", "device-name": "apaas_test", "deploy-status": "un-deploy", "unbound-status": false, "deploy-last-version": true, "deploy-last-variable-version": false, "override-variable": false, "offline-mode": true } ] } ] } } 返回状态码为400:Bad Request HTTP/1.1 400 Bad Request Date: Fri,30 Dec 2022 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 响应示例 HTTP/1.1 200 OK Date: Tue,30 Oct 2018 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "huawei-ac-application-template-north:output" : { "total": 0 "templates": [ { "template-name": "string", "description": "string", "template-dad-id": "string", "is-used": true } ] } }
  • 请求示例 cURL示例 curl -k -s -L -i -X POST \ https://{ip:port}/restconf/operations/huawei-ac-application-template-north:query-application-template \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' \ -H 'x-access-token: x-48ljg7o9vzqq4apgirobnwkabvuq468bryjs7s476mhflcnz5dmk5dhf44ank5vsbv4a4acbs7alikiltcuog7ul05epqrfzte06o6g5dfeo5ec4441jfvbus8btvxjz' \ -d '{ "input": { "app-id": "14a4ad25-5619-4f56-a050-46407d74e8af", "template-name":"", "dad-id":"", "page-index": 1, "page-size": 10, "sort-mode": "ASC", "sort-field": "TEMPLATENAME" } }' HTTP示例 POST /restconf/operations/huawei-ac-application-template-north:query-application-template HTTP/1.1 Host: {ip:port} Content-Type: application/json x-access-token: x-48ljg7o9vzqq4apgirobnwkabvuq468bryjs7s476mhflcnz5dmk5dhf44ank5vsbv4a4acbs7alikiltcuog7ul05epqrfzte06o6g5dfeo5ec4441jfvbus8btvxjz Cache-Control: no-cache body: { "input": { "app-id": "14a4ad25-5619-4f56-a050-46407d74e8af", "template-name":"", "dad-id":"", "page-index": 1, "page-size": 10, "sort-mode": "ASC", "sort-field": "TEMPLATENAME" } }
  • 响应参数 返回状态码为200:提交成功。 表4 queryOutput对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 queryOutput REFERENCE 详细信息请参见表 huawei-ac-application-template-north:output对象的参数列表。 - 表5 huawei-ac-application-template-north:output对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 templates list 详细信息请参见表 huawei-ac-application-template-north:output对象的参数列表。 - 应用模板中已添加的模板列表。 total int - - 应用模板中已添加的模板数量。 表6 huawei-ac-application-template-north:output:templates对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 template-name string - - 模板名称。 template-dad-id string - - 驱动标识。 description string - - 模板组描述 is-used boolean - - 是否被使用 返回状态码为400:参数不正确。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。 表7 错误码描述 Status Code Error Code Error Message Parameter 错误说明 400 0x006e004b 解析请求体发生错误。 错误的参数字段。 请求体body存在错误。 500 0x00c8000c 参数{0}不合法。 {0}:参数名称。 入参有错误。 500 0x00c80012 内部服务异常。 - 系统内部错误,内部服务间调用存在异常。 500 0x00c80006 操作数据库异常。 - 系统内部错误,操作数据库存在异常。 500 0x00c80029 操作异常。 - 系统内部错误。
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 queryInput 是 REFERENCE 详细信息请参见表 queryInput对象的参数列表。 创建应用模板参数。 表2 queryInput对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 input 否 REFERENCE 详细信息请参见表 input对象的参数列表。 - 表3 input对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 app-id 是 string 1-128个字符 - 临时应用标识。 template-name 否 string 0-128个字符 - 过滤条件:根据模板名模糊查询。 snd-id 否 string 0-128个字符 - 过滤条件:根据驱动标识查询。 page-index 否 int int32 - 分页条件:分页索引。 page-size 否 int int32 - 分页条件:每页容量。 sort-mode 否 enumeration ASC;DESC - 排序条件:升序、降序。 sort-field 否 enumeration TEMPLATENAME;DRIVERID - 排序条件:根据模板名称或驱动标识排序。
  • 请求示例 HTTP的示例 post /controller/campus/api/v1/terminal/scanrule HTTPS Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AC CES S-TOKEN:CA48D152F6B19D84:637C38259E6974E17788348128A430FEE150E874752CE754B6BF855281219925 { "id": "f0039bfc-5cf0-1f24-2865-86016a8a83c0", "name": "scanRule", "description": "scanRule", "scanType": [ "Real-time","Periodic" ], "scanPeriod": 30, "scanRangeList": [ { "id": "e555c570-2247-a16e-03e4-033e142474da", "sourceIp": "xxx", "vlanId": 1234, "scanIp": "xxx", "mask": 24, "description": "scanRange" } ], "vendors": [ "huawei","hikvision","dahua","uniview","tplink" ], "categories": "ip-camera" }
  • 响应参数 返回状态码为200:更新成功,响应体参考TerminalScanResponse。 TerminalScanResponse对象的参数列表,详细请参见表4。 返回状态码为400:接口调用失败,响应体参考CommonErrorDto。 CommonErrorDto对象的参数列表,详细请参见表7。 返回状态码为500:内部错误,响应体参考CommonErrorDto。 CommonErrorDto对象的参数列表,详细请参见表7。
  • 响应示例 返回状态码为200:更新成功,响应体参考TerminalScanResponse。 HTTPS 200 OK Date: Jan,13 Fri 2023 10:00:00 GMT Server: example-server Content-Type: application/json { "errcode": "0", "errmsg": "", "data": { "id": "f0039bfc-5cf0-1f24-2865-86016a8a83c0", "name": "scanRule", "description": "scanRule", "scanType": [ "Real-time","Periodic" ], "scanPeriod": 30, "scanRangeList": [ { "id": "e555c570-2247-a16e-03e4-033e142474da", "sourceIp": "xxx", "vlanId": 1234, "scanIp": "xxx", "mask": 24, "description": "scanRange" } ], "vendors": [ "huawei","hikvision","dahua","uniview","tplink" ], "categories": "ip-camera" } } 返回状态码为400:接口调用失败,响应体参考CommonErrorDto。 HTTPS 400 ERROR Date: Jan,13 Fri 2023 10:00:00 GMT Server: example-server Content-Type: application/json { "errcode":"0x00c80014", "errmsg":"data not exist", "errdesc": "", "errreason": "", "errdetail": "", "erradvice": "" } 返回状态码为500:内部错误,响应体参考CommonErrorDto。 HTTPS 500 ERROR Date: Jan,13 Fri 2023 10:00:00 GMT Server: example-server Content-Type: application/json { "errcode":"0x00c80018", "errmsg":"internal error", "errdesc": "", "errreason": "", "errdetail": "", "erradvice": "" }
  • 响应参数 返回状态码为200:配置的设备离线管理SSID密码。 表4 MngVapPskResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 random int32 [0-1] - 密码是否已被设置(0:未设置,1:已设置)。 0 errcode string 0~256个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 ""
  • 请求参数 表2 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 mngVapPskDto 是 REFERENCE 详细请参见表3。 配置的设备离线管理SSID密码。 - 表3 MngVapPskDto对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 passwd 否 password 8~63个字符。 - 该字段可能包含敏感信息和个人数据,请妥善做好保护。 1、密码长度必须在8-63位。 2、密码必须满足复杂度,即至少包含英文大写字母(A~Z)、英文小写字母(a~z)、数字(0~9)、特殊字符(如!、@、#、$、%)等中的三种,不允许包含'、?和空格。 3、密码中不能包含两个以上连续的相同字符。 "Example@123"
  • 响应示例 返回状态码为200:Successful operation HTTP/1.1 200 OK Date: Fri,03 Dec 2021 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "huawei-nce-aoc-config-template-application:variable": [ { "variable-name": "v2c", "variable-value": "value1", "encrypted": false, "path": [ "/snmp-user-uni-gnd:snmpUser/snmp-user-uni-gnd:version" ] } ] } 返回状态码为400:Bad Request HTTP/1.1 400 Bad Request Date: Fri,30 Dec 2022 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求示例 HTTP的示例 GET /restconf/data/huawei-nce-aoc-config-template-application:template-application/a945675d-ccff-4ea3-afb4-8d04ac3100c2/template/a926f75d-ccff-4ea3-afb4-8d04ac3100c2/variable HTTP/1.1 Host: 192.168.1.125:26335 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AUTH-TOKEN: x-yyyyyy
  • URI /restconf/data/huawei-nce-aoc-config-template-application:template-application/{template-application-id}/template/{template-id}/variable 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 template-application-id 是 string 0~128个字节。 - the identifier of the template application. "a945675d-ccff-4ea3-afb4-8d04ac3100c2" template-id 是 string 1~128个字节。 - the identifier of the template. "a926f75d-ccff-4ea3-afb4-8d04ac3100c2"
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 execute-temporary-job 是 REFERENCE 详细请参见表2。 execute temporary job - 表2 execute-temporary-job-input对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-aoc-config-template:input REFERENCE 详细请参见表3。 - - 表3 execute-temporary-job-input-body对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 job-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 "5c261eb5-2f4a-4acc-a747-c77ee1d18083"
  • 请求示例 HTTP的示例 POST /restconf/operations/huawei-nce-aoc-config-template:execute-temporary-job HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AUTH-TOKEN: x-yyyyyy { "huawei-nce-aoc-config-template:input": { "job-id": "5c261eb5-2f4a-4acc-a747-c77ee1d18083" } }
  • 响应示例 返回状态码为204:成功 HTTP/1.1 204 No Content Date: Thu,21 Dec 2023 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: Thu,21 Dec 2023 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求示例 cURL的示例 curl -k -s -L -i -X GET -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Accept-Language: en-US' -H 'X-ACCESS-TOKEN: x-yyyyyy' 'https://192.168.1.125:18002/rest/openapi/conffilemgmtservice/v1/conffile/action/refresh?condition={"sessionId":"1042","operateType":"backup"}' HTTP的示例 GET /rest/openapi/conffilemgmtservice/v1/conffile/action/refresh?condition={"sessionId":"1042","operateType":"backup"} HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy
  • 响应示例 返回状态码为200:获取查询到的设备信息 HTTP/1.1 200 OK Content-Type: application/json;charset=UTF8 { "resultList": [{ "neDn": "e1daadbb-71cd-11e9-82c8-000c291661a5", "neName": "huawei", "errorCode": 0, "errorMsg": "The device is backup.", "startupErrorCode": 0, "runningErrorCode": 0, "backupType": null, "startupFileName": null, "runningFileName": null }], "error_code": 0, "error_msg": "Successful.", "sessionId": 1591, "briefErrorCode": 0, "briefErrorMsg": null, "status": 1 }
  • URI /rest/openapi/conffilemgmtservice/v1/conffile/action/refresh 表1 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 condition 是 string - - 查询条件的格式:{"sessionId":"", "operateType":""} sessionId:备份的sessionId。必填字段,必须是大于0的数值 operateType:备份的类型。必填字段,类型列举:备份:backup,恢复:recover,运行至启动:runtostart {"sessionId":"1042","operateType":"backup"}
  • 接口约束 1.接口最大并发数为2; 2.支持分页查询,当分页查询时,每次查询时的过滤条件(is-cleared,alarm-type-qualifier,perceived-severity,resource,alarm-serial-number)须和首次查询保持一致; 3.对于历史告警查询,当未指定开始时间和结束时间时,系统默认只查询最近3天的历史告警,如果需要查询其他时间范围的告警,需要指定开始时间和结束时间; 4.接口下发的query参数数量受URL长度限制,URL长度限制请参见"URL说明"章节。
  • 请求参数 表2 header参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 fileLocationURI 否 string 1~255个字符。 - 导出告警文件的sftp路径,路径需要存在。例如:sftp://root:root@10.22.44.148:22/home/ftproot/alarm.json "sftp://root:root@10.22.44.148:22/home/ftproot/alarm.json" 无
  • 请求示例 HTTP的示例 GET /restconf/v1/data/ietf-alarms:alarms/alarm-list?limit=2000&is-cleared=false&start-time=2019-05-30T06:35:38Z&end-time=2019-05-30T14:35:38Z Content-Type: application/json Accept: application/json Accept-Language: en-US X-Auth-Token: x-yyy
  • 响应示例 返回状态码为200:Successful operation HTTP/1.1 200 OK Content-Type: application/json { "alarm": [ { "time-created": "2022-08-17T07:00:30.000Z", "is-acked": false, "resource-alarm-parameters": { "perceived-severity": "major", "is-cleared": false, "status-change": [], "last-changed": "2022-08-17T07:00:30.000Z" }, "x733-alarm-parameters": { "event-type": "environmental-alarm" }, "operator-state-change": [], "alarm-parameters": { "repair-action": "Please check whether the device is managed by another network management or system, please contact Huawei Technology Co., Ltd. Technical support engineer to help resolve.", "ne-name": "OSS", "location-info": "DevIP:10.90.126.58;Operation IP:10.185.177.145", "native-probable-cause": "Network element is managed jointly by multiple network management", "probable-cause": "Network element is managed jointly by multiple network management", "root-cause-identifier": false, "ems-time": "2022-08-17T07:00:30.997Z", "alarm-serial-number": "10414", "reason-id": 70014, "tenant-id": "default-organization-id", "tenant": "DefaultOrganization", "alarm-text": "Network element is managed jointly by multiple network management", "other-info": "", "ip-address": "10.185.215.193" }, "common-alarm-parameters": { "alt-resource": [], "resource": "OSS", "resource-url": "", "related-alarm": [], "alarm-type-qualifier": "100000-70014", "impacted-resource": [], "root-cause-resource": [], "alarm-type-id": "environmental-alarm", "layer": "LR_Not_Applicable", "md-name": "Huawei/NCE", "product-type": "OSS" } } ] } 返回状态码为400:Bad request HTTP/1.1 400 Bad Request Date: Mon,30 Dec 2019 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 响应示例 返回状态码为200:Successful operation HTTP/1.1 200 OK Content-Type: application/json { "output": { "subscription-result": "ok" } } 返回状态码为400:Bad request HTTP/1.1 400 Bad Request Date: Mon,30 Dec 2019 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 响应参数 返回状态码为200:Successful operation 表4 DeleteResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 output REFERENCE 详细请参见表5。 去订阅响应 - 表5 DeleteOutput对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 subscription-result string - - 去订阅结果 - 返回状态码为400:Bad request 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 POST /restconf/v1/operations/huawei-nce-notification-action:delete-subscription Content-Type: application/json Accept: application/json Accept-Language: en-US X-Auth-Token: x-yyy { "input": { "identifier": "daa3da2a-ca94-4b62-ac89-8ca03918d703" } }
共100000条