华为云用户手册

  • 响应参数 返回状态码为200:成功返回接口信息 表6 ApiIfResponseV2对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 error_code int32 - 0 错误码。 - error_msg string - Successful. 错误消息。 - totalCount int32 - - 满足条件的总数 - totalPage int32 - - 满足条件的总页数 - currentPage int32 - - 当前页数 - ifDataList ARRAY_REFERENCE 详细请参见表7。 接口列表 - 表7 ApiIfDataV2对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 nedn string 1~255个字符。 - 设备DN - interfaceId string 0~255个字符。 - 接口DN,一旦创建无法修改,必填 - ifIndex integer - - 接口索引,从设备上获取,无法修改 - ifDesc string 1~255个字符。 - 接口名称,从设备上获取,无法修改 - ifAlias string 0~255个字符。 - 接口别名,从设备上获取,可修改 - ipAddress string 0~255个字符。 - ip地址 - ifOperStatus string UP DOWN TESTING UNKNOWN DORMANT NOTPRESENT LOWLAYERDOWN - 接口运行态 - ifAdminStatus string UP DOWN PLANNING - 接口管理态, 可修改 - ifSpeed string 0~255个字符。 - 接口速率 - ifRemark string 0~255个字符。 - 备注,可修改 - ifMtu string 0~255个字符。 - MTU - ifDuplexMode string FULL HALF AUTO AUTOFULL AUTOHALF - 双工模式 - ifType string OTHER ETHERNET ETH-TRUNK VIRTUAL_ETHERNET ATM POS SERIAL VLANIF E1 T1 CPOS TUNNEL LOOPBACK IP-TRUNK VIRTUAL-TEMPLATE RING-IF MFR MP-GROUP AUX E3 T3 METH null RPR EPON WLAN-ESS GPON WLAN-DBSS WLAN-MESH VBDIF NVE CELLULAR - 接口类型 - serviceType int32 - - 接口成员口类型 - providerNetwork string 0~255个字符。 - 供应商 - ifGroup string 0~255个字符。 - 所属分组 - ifMAC string 0~48个字符。 - MAC地址 - trunkname string 0~48个字符。 - 所属的trunk的trunkname -
  • 请求示例 cURL的示例 curl -k -s -L -i -X GET -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Accept-Language: en-US' -H 'X-AC CES S-TOKEN: x-rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88bybuqp7xmlup9htd5gpg4bmmrufvnt4aan' -G --data-urlencode 'condition={"logOp": "and","complex": [{"logOp": "or","simple": [{"name": "iftype","operator": "equal","caseSensitive": true,"value": "3"},{"name": "trunkname","operator": "begin with","caseSensitive": true,"value": "NE"}]},{"simple": [{"name": "nedn","operator": "equal","value": "0c074aed-c897-34e4-8220-b478961b2039"}]}]}"&orderBy="{"field":"INTERFACEID","asc":true}' 'https://192.168.1.125:18002/rest/openapi/networkinventoryservice/v2/interfaces' HTTP的示例 GET /rest/openapi/networkinventoryservice/v2/interfaces?condition=%7B%22logOp%22%3A%20%22and%22,%22complex%22%3A%20%5B%7B%22logOp%22%3A%20%22or%22,%22simple%22%3A%20%5B%7B%22name%22%3A%20%22iftype%22,%22operator%22%3A%20%22equal%22,%22caseSensitive%22%3A%20true,%22value%22%3A%20%223%22%7D,%7B%22name%22%3A%20%22trunkname%22,%22operator%22%3A%20%22begin%20with%22,%22caseSensitive%22%3A%20true,%22value%22%3A%20%22NE%22%7D%5D%7D,%7B%22simple%22%3A%20%5B%7B%22name%22%3A%20%22nedn%22,%22operator%22%3A%20%22equal%22,%22value%22%3A%20%220c074aed-c897-34e4-8220-b478961b2039%22%7D%5D%7D%5D%7D%22%26orderBy%3D%22%7B%22field%22%3A%22INTERFACEID%22,%22asc%22%3Atrue%7D HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
  • 响应示例 返回状态码为200:成功 HTTP/1.1 200 OK Content-Type: application/json { "huawei-nce-aoc-gnd-config-state:output": { "feature-instance": [ { "feature-instance-id": "8d394835-cb84-38f3-a4d5-36a7f2075084", "feature-instance-name": "/huawei-ac-nes-device:nes/huawei-ac-nes-device:ne/8d394835-cb84-38f3-a4d5-36a7f2075084/aaaminignd:aaaminignd/test", "operator": "admin", "last-oper-time": "2023-02-17 18:09:20", "state-update-time": "2023-02-17 18:09:22", "oper-type": "Add", "config-state": "success" } ], "count": 1 } }
  • 响应参数 返回状态码为200:成功 表4 query-gnd-config-state-by-feature-instances-output对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-aoc-gnd-config-state:output REFERENCE 详细请参见表5。 - - 表5 query-gnd-config-state-by-feature-instances-output-body对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 feature-instance ARRAY_REFERENCE 详细请参见表6。 The output of feature instance - count int32 [-2147483648-2147483647] - Output count 1 表6 query-gnd-config-state-by-feature-instances-output-body-feature-instance对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 feature-instance-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 "featureinstanceid" feature-instance-name string 0~2048个字节。 - 特性实例名称 "featureinstancename" operator string 0~255个字节。 - 操作者 "operator" last-oper-time string 0~255个字节。 - 最后操作时间 "lastopertime" state-update-time string 0~255个字节。 - 开始更新时间 "state-update-time" error-info string 0~2048个字节。 - 错误信息 "errorinfo" oper-type string add delete update - 0=增加; 1=删除; 2=更新. "add" config-state string success alarm pre-config fail sending - 0=成功; 1=告警 ; 2=预配置; 3=失败; 4=发送中 "success" source-path string 0~255个字节。 - 源路径 "sourcepath"
  • 请求示例 HTTP的示例 POST /restconf/operations/huawei-nce-aoc-gnd-config-state:query-gnd-config-state-by-feature-instances HTTP/1.1 Host: 192.168.1.125:26335 Content-Type: application/json X-ACCESS-TOKEN: x-yyyyyy { "input": { "offset": 1, "limit": 10, "device-id": "8d394835-cb84-38f3-a4d5-36a7f2075084", "sort-field": "-last-oper-time", "feature-path": "/huawei-ac-nes-device:nes/ne/aaaminigndjava:aaaminigndjava" } }
  • 示例:修改指定pool1的DHCP地址池 URI: /restconf/v2/data/huawei-ac-nes-device:nes/ne/{ neId }/huawei-nce-e-dhcpv4:global-ip-pool/ pool1 Table1 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" ip-pool-name 是 string 1~128个字节。 - Key,名称。 "pool1" HTTP的示例 PUT /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-dhcpv4:global-ip-pool/pool1 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 { "huawei-nce-e-dhcpv4:global-ip-pool" : [ { "config-status" : "configured-database-success", "last-committed-time" : "2022-01-01 00:00:00", "related-pkg-version" : "1.0.1", "edit-state" : "RUNNING", "gateway-list" : [ { "gateway-ip" : "192.168.1.1", "mask" : 24 } ], "section" : [ { "section-index" : 1, "start-ip" : "192.168.10.1", "end-ip" : "192.168.10.100" } ], "dns-list" : [ { "dns-ip" : "192.168.100.1" } ], "excluded-ip-address" : [ { "start-ip-address" : "192.168.10.10", "end-ip-address" : "192.168.10.120" } ], "static-bind" : [ { "static-bind-ip" : "192.168.100.1", "static-bind-mac" : "01-01-01-01-01-01" } ], "option" : [ { "option-code" : 7, "ip-addresses" : [ u'"192.168.1.1"' ] , "ascii-string" : "test", "hex-string" : "00", "cipher-string" : "Example@123", "sub-options" : { "sub-option" : [ { "sub-option-code" : 1, "ascii-string" : "test" } ] } } ], "ip-pool-name" : "pool1", "vpn-instance" : "overlay_vpn", "network-ipv4-address" : "192.168.10.1", "network-mask" : 24, "domain-name" : "test.com" } ] }
  • 示例:修改指定ip-pool-name为pool1和section-index为1的section URI: /restconf/v2/data/huawei-ac-nes-device:nes/ne/{ neId }/huawei-nce-e-dhcpv4:global-ip-pool/ pool1/1 Table1 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" ip-pool-name 是 string 1~128个字节。 - Key,名称。 "pool1" section-index 是 int64 [0-255] - Key,序号。 1 HTTP的示例 PUT /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-dhcpv4:global-ip-pool/pool1/1 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 { "huawei-nce-e-dhcpv4:section" : [ { "section-index" : 1, "start-ip" : "192.168.10.1", "end-ip" : "192.168.10.100 } ] }
  • 示例:批量修改DHCP地址池 URI: /restconf/v2/data/huawei-ac-nes-device:nes/ne/{id}/huawei-nce-e-dhcpv4:global-ip-pool 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 id 是 string 36个字节。满足正则表达[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}。 - 设备ID。 "00000000-0000-0000-0000-000000000000" 请求示例 HTTP的示例 PUT /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-dhcpv4:global-ip-pool 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 { "huawei-nce-e-dhcpv4:global-ip-pool" : [ { "config-status" : "configured-database-success", "last-committed-time" : "2022-01-01 00:00:00", "related-pkg-version" : "1.0.1", "edit-state" : "RUNNING", "gateway-list" : [ { "gateway-ip" : "192.168.1.1", "mask" : 24 } ], "section" : [ { "section-index" : 1, "start-ip" : "192.168.10.1", "end-ip" : "192.168.10.100" } ], "dns-list" : [ { "dns-ip" : "192.168.10.1" } ], "excluded-ip-address" : [ { "start-ip-address" : "192.168.10.110", "end-ip-address" : "192.168.10.120" } ], "static-bind" : [ { "static-bind-ip" : "192.168.10.1", "static-bind-mac" : "01-01-01-01-01-01" } ], "option" : [ { "option-code" : 7, "ip-addresses" : [ u'"192.168.10.1"' ] , "ascii-string" : "test", "hex-string" : "00", "cipher-string" : "Example@123", "sub-options" : { "sub-option" : [ { "sub-option-code" : 1, "ascii-string" : "test" } ] } } ], "ip-pool-name" : "pool1", "vpn-instance" : "overlay_vpn", "network-ipv4-address" : "192.168.10.0", "network-mask" : 24, "domain-name" : "test.com" } ] }
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 uninstallPluginReq 是 REFERENCE 详细请参见表2。 创建插件卸载任务请求参数。 - 表2 UninstallPluginReq对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 pluginType 是 string 1~64个字符。 - 插件类型;22-无线非经/loT插卡;当前仅支持22类型插件。 "22" siteInfos 是 ARRAY_REFERENCE 1-100个列表项,详细请参见表3。 站点和款型信息。 -
  • 服务价值 企业分支多、设备类型多样、安全威胁增多,企业对网络统一管控、统一运维、统一安全处置的诉求激增。华为乾坤实现云、网、端一体化管控保障,解决企业诉求,主要价值如表1所示。 表1 华为乾坤价值 用户诉求 华为乾坤价值 无专业网络运维能力,希望快速开局、云端统一运维 网络自动化部署和编排,扫码开局、智能校验;云端网络巡检、健康监测,降低运维难度。 无专业安全运维能力,而且满足国家等保要求难度比较大 安全事件云端自动处置+安全专家7*24小时云端值守,提供等保方案包一站式满足等保要求。 应用体验保障优化 提供3D Wi-Fi仿真、网络大屏等应用可视和应用保障服务,提升应用体验。 摄像头、传感器、电表等物联终端统一纳管 提供物联感知、物联安全服务,使终端快速接入网络、统一运维、统一监控安全风险。
  • 响应示例 返回状态码为200:创建成功,返回结构体参见APTunelServiceResponseDto。 HTTP/1.1 200 OK Date: Thu,13 Sep 2018 10:00:00 GMT Server: example-server Content-Type: application/json { "errcode" : "0", "errmsg" : "", "data" : [ { "id" : "00000000000000000000000000000000", "name" : "tunnel1", "master-ip" : "192.168.0.1", "backup-ip" : "192.168.0.2", "auto-restore-enable" : true, "auto-restore-delay" : "100", "vlan" : "20,30-200,500", "dtls" : "disable", "backupDtls" : "disable" } ] }
  • 请求示例 HTTP的示例 POST /controller/campus/v1/networkservice/networkconfig/net/aptunnel/sites/fbb684c8-0d37-496f-bafa-4b06d5151e2e/config 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" : "00000000000000000000000000000000", "name" : "tunnel1", "master-ip" : "192.168.0.1", "backup-ip" : "192.168.0.2", "auto-restore-enable" : true, "auto-restore-delay" : 100, "vlan" : "20,30-200,500", "dtls" : "disable", "dtlsKey" : "tunnelkey", "backupDtls" : "disable", "backupDtlsKey" : "tunnelkey" }
  • 响应参数 返回状态码为200:创建成功,返回结构体参见APTunelServiceResponseDto。 表4 APTunelServiceResponseDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 "" data ARRAY_REFERENCE 0-8个列表项,详细请参见表5。 隧道配置列表,结构体参见ApTunnelDto。 - 表5 ApTunnelDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 id string 32个字符。 - 隧道ID。创建时不要填写,修改时必填。 "00000000000000000000000000000000" name string 1~35个字符。 - 隧道名称。取值范围:1~35个半角字符,不能以双引号开头或结尾且不能包含空格和问号。不支持修改。 "tunnel1" master-ip string 7~15个字符。 - 主隧道IP。 "192.168.0.1" backup-ip string 7~15个字符。 - 备隧道IP。 "192.168.0.2" auto-restore-enable boolean true false false 自动恢复。默认值为false。 true auto-restore-delay int32 [60-600] - 自动恢复延时(单位秒)。 100 vlan string 1~30000个字符。 - 2-4094范围内的整数或段,多个整数或段间用“,”分割,最多可输入10组。且配置的隧道VLAN不能与管理VLAN相同,否则隧道VLAN不生效。 "20,30-200,500" dtls string 1~20个字符。 - 主隧道传输层数据包安全协议。取值范围:disable---不配置、psk---秘钥、mandatory-cert---证书。 "disable" dtlsKey password 1~64个字符。 - 该字段可能包含敏感信息和个人数据,请妥善做好保护。 主隧道认证秘钥,当传输层数据包安全协议选择psk时生效。取值范围:8~32个字符,至少包含大写字母、小写字母、数字或特殊字符中的两种,不能包含问号和空格。 "tunnelkey" backupDtls string 1~20个字符。 - 备隧道传输层数据包安全协议。取值范围:disable---不配置、psk---秘钥、mandatory-cert---证书。 "disable" backupDtlsKey password 1~64个字符。 - 该字段可能包含敏感信息和个人数据,请妥善做好保护。 备隧道认证秘钥,当传输层数据包安全协议选择psk时生效。取值范围:8~32个字符,至少包含大写字母、小写字母、数字或特殊字符中的两种,不能包含问号和空格。 "tunnelkey"
  • 请求参数 表2 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 body 是 REFERENCE 详细请参见表3。 站点内AP隧道配置参数体,结构体参见ApTunnelDto。 - 表3 ApTunnelDto对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 id 否 string 32个字符。 - 隧道ID。创建时不要填写,修改时必填。 "00000000000000000000000000000000" name 是 string 1~35个字符。 - 隧道名称。取值范围:1~35个半角字符,不能以双引号开头或结尾且不能包含空格和问号。不支持修改。 "tunnel1" master-ip 是 string 7~15个字符。 - 主隧道IP。 "192.168.0.1" backup-ip 否 string 7~15个字符。 - 备隧道IP。 "192.168.0.2" auto-restore-enable 否 boolean true false false 自动恢复。默认值为false。 true auto-restore-delay 否 int32 [60-600] - 自动恢复延时(单位秒)。 100 vlan 是 string 1~30000个字符。 - 2-4094范围内的整数或段,多个整数或段间用“,”分割,最多可输入10组。且配置的隧道VLAN不能与管理VLAN相同,否则隧道VLAN不生效。 "20,30-200,500" dtls 否 string 1~20个字符。 - 主隧道传输层数据包安全协议。取值范围:disable---不配置、psk---秘钥、mandatory-cert---证书。 "disable" dtlsKey 否 password 1~64个字符。 - 该字段可能包含敏感信息和个人数据,请妥善做好保护。 主隧道认证秘钥,当传输层数据包安全协议选择psk时生效。取值范围:8~32个字符,至少包含大写字母、小写字母、数字或特殊字符中的两种,不能包含问号和空格。 "tunnelkey" backupDtls 否 string 1~20个字符。 - 备隧道传输层数据包安全协议。取值范围:disable---不配置、psk---秘钥、mandatory-cert---证书。 "disable" backupDtlsKey 否 password 1~64个字符。 - 该字段可能包含敏感信息和个人数据,请妥善做好保护。 备隧道认证秘钥,当传输层数据包安全协议选择psk时生效。取值范围:8~32个字符,至少包含大写字母、小写字母、数字或特殊字符中的两种,不能包含问号和空格。 "tunnelkey"
  • URI /controller/campus/v1/networkservice/networkconfig/net/aptunnel/sites/{siteId}/config 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 siteId 是 string 36个字符。 - 站点ID。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e"
  • 响应示例 返回状态码为200:接口信息查询成功 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 { "error_code" : "0", "error_msg" : "Successful", "totalCount" : 1, "nextmarker" : "", "ApiIfDataList" : [ { "nedn" : "e46412b1-003a-385c-bd10-6c218ce09ef4", "interfaceId" : "4451b04d-64b7-4d5a-aadc-637387068d57", "ifIndex" : "668", "ifDesc" : "XGigabitEthernet1/8/0/0", "ifAlias" : "Link to remote", "ipAddress" : "10.136.10.66/24", "ifOperStatus" : "UP", "ifAdminStatus" : "DOWN", "ifSpeed" : "20G", "ifMtu" : "1500", "ifDuplexMode" : "FULL", "ifType" : "ETHERNET", "ifMAC" : "**-**-**-**-7E-9F" } ] }
  • 请求示例 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-5hfumrpevvir04ph3vemg7rv3ynxdgumrwjvnyhh04k5gbnv9cums76mthpd2qek9f9ifw44juqns9dfti04oafz85upmm1hhitchj6o6neoalrx2r1e1dmqk8de7vnv' -G --data-urlencode 'condition={"neDn": "e46412b1-003a-385c-bd10-6c218ce09ef4","ifDesc": "XGigabitEthernet","ifSpee":["20000000000"],"sortColumn":"IFINDEX","sortOrder":"ifDesc"}' 'https://192.168.1.125:18002/rest/openapi/networkinventoryservice/v1/interfaces' HTTP的示例 GET /rest/openapi/networkinventoryservice/v1/interfaces?condition=%7B%22neDn%22%3A%20%22e46412b1-003a-385c-bd10-6c218ce09ef4%22,%22ifDesc%22%3A%20%22XGigabitEthernet%22,%22ifSpee%22%3A%5B%2220000000000%22%5D,%22sortColumn%22%3A%22IFINDEX%22,%22sortOrder%22%3A%22ifDesc%22%7D HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
  • 响应参数 返回状态码为200:接口信息查询成功 表2 ApiIfQueryResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 error_code int32 - 0 错误码。 "0" error_msg string - Successful. 错误消息。 "Successful" totalCount int32 - - 符合当前条件的总个数 1 nextmarker string - - 下一片反馈信息 "" ApiIfDataList ARRAY_REFERENCE 详细请参见表3。 接口列表 - 表3 ApiIfData对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 nedn string 1~255个字符。 - 设备DN "e46412b1-003a-385c-bd10-6c218ce09ef4" interfaceId string 0~255个字符。 - 接口DN,一旦创建无法修改,必填 "4451b04d-64b7-4d5a-aadc-637387068d57" ifIndex integer - - 接口索引,从设备上获取,无法修改 "668" ifDesc string 1~255个字符。 - 接口名称,从设备上获取,无法修改 "XGigabitEthernet1/8/0/0" ifAlias string 0~255个字符。 - 接口别名,从设备上获取,可修改 "Link to remote" ipAddress string 0~255个字符。 - ip地址 "10.136.10.66/24" ifOperStatus string UP DOWN TESTING UNKNOWN DORMANT NOTPRESENT LOWLAYERDOWN - 接口运行态 "UP" ifAdminStatus string UP DOWN PLANNING - 接口管理态, 可修改 "DOWN" ifSpeed string 0~255个字符。 - 接口速率 "20G" ifRemark string 0~255个字符。 - 备注,可修改 - ifMtu string 0~255个字符。 - MTU "1500" ifDuplexMode string FULL HALF AUTO AUTOFULL AUTOHALF - 双工模式 "FULL" ifType string OTHER ETHERNET ETH-TRUNK VIRTUAL_ETHERNET ATM POS SERIAL VLANIF E1 T1 CPOS TUNNEL LOOPBACK IP-TRUNK VIRTUAL-TEMPLATE RING-IF MFR MP-GROUP AUX E3 T3 METH NULL RPR EPON WLAN-ESS GPON WLAN-DBSS WLAN-MESH VBDIF NVE CELLULAR - 接口类型 "ETHERNET" serviceType int32 - - 接口成员口类型 - providerNetwork string 0~255个字符。 - 供应商 - ifGroup string 0~255个字符。 - 所属分组 - ifMAC string 0~48个字符。 - MAC地址 "**-**-**-**-7E-9F"
  • URI /rest/openapi/networkinventoryservice/v1/interfaces 表1 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 condition 是 string - - 必需字段: 01. neDn:网络设备dn,精确搜索。 其他为非必需字段: 02. pageBegin:起始行数,正整数。 03. pageLength:10, 20, 50, 100, 500其中之一,默认500; 04. ifIndex:根据接口索引精确查询的关键字; 05. ifDesc:根据接口名称模糊查询的关键字; 06. ifAlias:根据接口别名模糊查询的关键字; 07. ipAddress:根据接口IP地址模糊查询的关键字; 08. ifSpeed:根据接口速率精确筛选的关键字; List,纯数字集合举例:"ifSpeed":["20000000000"] 09. ifRemark:根据接口备注模糊查询的关键字; 10. ifMtu:根据接口mtu精确筛选的关键字; 11. ifType:根据接口type精确筛选的关键字; List, 支持Ethernet,Eth-Trunk,Virtual-Ethernet,Atm,Pos,Serial,Vlanif,E1,T1,Cpos,Tunnel,LoopBack,Ip-Trunk,Virtual-Template,Ring-if,MFR,Mp-group,Aux,E3,T3,MEth,NULL,Rpr,Epon,Wlan-Ess,Gpon,Wlan-Dbss,Wlan-Mesh,Vbdif,Nve,Cellular,Other 举例:"ifType":["Ethernet","Eth-Trunk"] 12. ifOperStatus:List,根据接口运行态精确筛选的关键字; List,支持Up,Down,Testing,Unknown,Dormant,Notpresent,Lowlayerdown 举例:"ifOperStatus":["Up","Down"] 13. ifAdminStatus:根据接口管理态精确筛选的关键字; List,支持Up,Down,Planning 举例:"ifAdminStatus":["Up","Down"] 14. ifDuplexMode:根据接口双工模式精确筛选的关键字;List,支持full,half,auto,autoFull,autoHalf 15. queryType:指定查询的接口类型, 5仅查询物理口; 16. sortColumn:指定查询结果排序列;支持IFINDEX,IPADDRESS,IFDESC,IFALIAS,IFREMARK,IFPHYSADDRESS 17. sortOrder:指定查询结果排序;支持asc,desc "{\"neDn\": \"e46412b1-003a-385c-bd10-6c218ce09ef4\",\"IfDesc\": \"XGigabitEthernet\",\"ifSpee\":[\"20000000000\"],\"sortColumn\":\"IFINDEX\",\"sortOrder\":\"desc\"}"
  • 修改应用模板参数请求示例 cURL示例 curl -k -s -L -i -X POST \ https://{ip:port}/restconf/operations/huawei-ac-application-template-north:update-template-application \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' \ -H 'x-access-token: x-48ljg7o9vzqq4apgirobnwkabvuq468bryjs7s476mhflcnz5dmk5dhf44ank5vsbv4a4acbs7alikiltcuog7ul05epqrfzte06o6g5dfeo5ec4441jfvbus8btvxjz' \ -d '{ "input": { "app-id": "2f75451b-876b-4bc7-861d-650bfae51fe7", "member-type": "PA RAM ETER", "oper-type": "UPDATE", "members": { "member-id": "collectFieldBits", "member-value": "bytes", "extension": "notencrypt" } } }' HTTP示例 POST /restconf/operations/huawei-ac-application-template-north:update-template-application HTTP/1.1 Host: {ip:port} Content-Type: application/json x-access-token: x-48ljg7o9vzqq4apgirobnwkabvuq468bryjs7s476mhflcnz5dmk5dhf44ank5vsbv4a4acbs7alikiltcuog7ul05epqrfzte06o6g5dfeo5ec4441jfvbus8btvxjz Cache-Control: no-cache body: { "input": { "app-id": "2f75451b-876b-4bc7-861d-650bfae51fe7", "member-type": "PARAMETER ", "oper-type": "UPDATE", "members": { "member-id": "matchFieldBits", "member-value": "protocol", "extension": "notencrypt" } } }
  • 增加应用模板请求示例 cURL示例 curl -k -s -L -i -X POST \ https://{ip:port}/restconf/operations/huawei-ac-application-template-north:update-template-application \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' \ -H 'x-access-token: x-48ljg7o9vzqq4apgirobnwkabvuq468bryjs7s476mhflcnz5dmk5dhf44ank5vsbv4a4acbs7alikiltcuog7ul05epqrfzte06o6g5dfeo5ec4441jfvbus8btvxjz' \ -d '{ "input": { "app-id": "2f75451b-876b-4bc7-861d-650bfae51fe7", "member-type": "TEMPLATE", "oper-type": "ADD", "members": { "member-id": "CreateACL", "member-value": "", "extension": "AR5001" } } }' HTTP示例 POST /restconf/operations/huawei-ac-application-template-north:update-template-application HTTP/1.1 Host: {ip:port} Content-Type: application/json x-access-token: x-48ljg7o9vzqq4apgirobnwkabvuq468bryjs7s476mhflcnz5dmk5dhf44ank5vsbv4a4acbs7alikiltcuog7ul05epqrfzte06o6g5dfeo5ec4441jfvbus8btvxjz Cache-Control: no-cache body: { "input": { "app-id": "2f75451b-876b-4bc7-861d-650bfae51fe7", "member-type": "TEMPLATE", "oper-type": "ADD", "members": { "member-id": "CreateACL", "member-value": "", "extension": "AR5001" } } }
  • 响应参数 返回状态码为204:提交成功。 返回状态码为400:参数不正确。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。 表5 错误码描述 Status Code Error Code Error Message Parameter 错误说明 400 0x006e004b 解析请求体发生错误。 错误的参数字段。 请求体body存在错误。 500 0x00c8000c 参数为不合法。 {0}:参数名称。 入参有错误。 500 0x00c80012 内部服务异常。 - 系统内部错误,内部服务间调用存在异常。 500 0x00c80006 操作数据库异常。 - 系统内部错误,操作数据库存在异常。
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 updateInput 是 REFERENCE 详细信息请参见表 updateInput对象的参数列表。 创建应用模板参数。 表2 updateInput对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 input 否 REFERENCE 详细信息请参见表 input对象的参数列表。 - 表3 input对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 app-id 是 string 1-128个字符 - 临时应用标识。 oper-type 是 enumeration ADD;UPDATE;REMOVE - 对应用数据的操作类型:创建应用数据、修改应用数据、删除应用数据。 必须先执行ADD添加应用模板,再执行UPDATE更新应用模板参数。 member-type 是 enumeration TEMPLATE;TEMPLATEGROUP;PARAMETER - 应用数据类型:模板、模板组、参数。 如果oper-type为UPDATE,必须配置为PARAMETER。 member 是 list 详细信息请参见表 member对象的参数列表。 - 应用数据列表。 表4 member对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 member-id 是 string 1-128个字符 - 应用数据名称,已存在的应用模板名称,由数字,大小写英文字母,特殊符号“-”,“_”,“@”和“$” 组成的字符串。 member-value 否 string 0-256个字符 - 应用数据值。member-id如果配置为已存在的应用模板名称,member-value建议为空。 extension 否 string 0-128个字符 - 应用数据扩展:对于参数是加密方式: notencrypt:不加密。 encrypt:加密。 对于模板是驱动标识。 tenant-id 否 string 0-128个字符 - 租户的id信息
  • 响应示例 返回状态码为200:返回操作是否成功 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 { "errorCode" : "", "errorMsg" : "", "data" : [ { "operErrorCode" : "", "resultMsg" : "", "tenantId" : "", "name" : "", "objId" : "", "siteId" : "", "parentObjId" : "" } ] } 返回状态码为400:参数错误 HTTP/1.1 400 Bad Request 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 返回状态码为403:URL鉴权 HTTP/1.1 403 Forbidden 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 返回状态码为404:rest接口没找到 HTTP/1.1 404 Not Found 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 返回状态码为406:流控限流 HTTP/1.1 406 Not Acceptable 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 返回状态码为500:默认ServiceException异常码,应用内部错误 HTTP/1.1 500 Internal Server Error 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 返回状态码为502:网关错误 HTTP/1.1 502 Bad Gateway 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 返回状态码为503:服务不可用 HTTP/1.1 503 Service Unavailable 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 返回状态码为504:表示时间超时,总线超时时间300s HTTP/1.1 504 Gateway Timeout 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
  • 响应参数 返回状态码为200:返回操作是否成功 OpenApiOperationApResponse对象的参数列表,详细请参见表4。 返回状态码为400:参数错误 详细信息请参见实际响应消息体。 返回状态码为403:URL鉴权 详细信息请参见实际响应消息体。 返回状态码为404:rest接口没找到 详细信息请参见实际响应消息体。 返回状态码为406:流控限流 详细信息请参见实际响应消息体。 返回状态码为500:默认ServiceException异常码,应用内部错误 详细信息请参见实际响应消息体。 返回状态码为502:网关错误 详细信息请参见实际响应消息体。 返回状态码为503:服务不可用 详细信息请参见实际响应消息体。 返回状态码为504:表示时间超时,总线超时时间300s 详细信息请参见实际响应消息体。
  • 请求示例 cURL的示例 curl -k -s -L -i -X POST -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/network/wlan/region-topo/aps/action/delete' -d '{ "siteId" : "", "parentObjId" : "", "objIds" : [ "" ] }' HTTP的示例 POST /rest/openapi/network/wlan/region-topo/aps/action/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 { "siteId" : "", "parentObjId" : "", "objIds" : [ "" ] }
  • 响应示例 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 "parameters": [ { "parameter-name": "string", "parameter-value": "string", "is-encrypt": true, "status": "NORMAL", "parameter-description": "string", "parameter-version": "string" } ] } }
  • 请求示例 cURL示例 curl -k -s -L -i -X POST \ https://{ip:port}/restconf/operations/huawei-ac-application-template-north:query-parameters \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' \ -H 'x-access-token: x-48ljg7o9vzqq4apgirobnwkabvuq468bryjs7s476mhflcnz5dmk5dhf44ank5vsbv4a4acbs7alikiltcuog7ul05epqrfzte06o6g5dfeo5ec4441jfvbus8btvxjz' \ -d '{ "input": { "app-id": 2f75451b-876b-4bc7-861d-650bfae51fe7, "parameter-name": "", "page-index": 1, "page-size": 10, "sort-mode": "ASC", "sort-field": "PARAMETERKEY" } }' HTTP示例 POST /restconf/operations/huawei-ac-application-template-north:query-parameters HTTP/1.1 Host: {ip:port} Content-Type: application/json x-access-token: x-48ljg7o9vzqq4apgirobnwkabvuq468bryjs7s476mhflcnz5dmk5dhf44ank5vsbv4a4acbs7alikiltcuog7ul05epqrfzte06o6g5dfeo5ec4441jfvbus8btvxjz Cache-Control: no-cache body: { "input": { "app-id": 2f75451b-876b-4bc7-861d-650bfae51fe7, "parameter-name": "", "page-index": 1, "page-size": 10, "sort-mode": "ASC", "sort-field": "PARAMETERKEY" } }
  • 响应参数 返回状态码为200:提交成功。 表4 queryOutput对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 queryOutput REFERENCE 详细信息请参见表 huawei-ac-application-template-north:output对象的参数列表。 - 表5 huawei-ac-application-template-north:output对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 parameters list 详细信息请参见表 huawei-ac-application-template-north:output:parameters对象的参数列表。 - 应用模板中已添加的参数列表。 total int - - 应用模板中已添加的参数数量。 表6 huawei-ac-application-template-north:output:parameters对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 parameter-name string - - 参数名称。 parameter-value string - - 参数值。 is-encrypt string - - 参数是否加密。 status string - - 状态 parameter-description string - - 参数描述 parameter-version string - - 参数版本 返回状态码为400:参数不正确。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。 表7 错误码描述 Status Code Error Code Error Message Parameter 错误说明 400 0x006e004b 解析请求体发生错误。 错误的参数字段。 请求体body存在错误。 500 0x00c80006 操作数据库异常。 - 系统内部错误,操作数据库存在异常。
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 queryInput 是 REFERENCE 详细信息请参见表 queryInput对象的参数列表。 创建应用模板参数。 表2 queryInput对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 input 否 REFERENCE 详细信息请参见表 input对象的参数列表。 - 表3 input对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 app-id 是 string 1-128个字符 - 临时应用标识。 parameter-name 否 string 0-128个字符 - 过滤条件:根据参数名模糊查询。 page-index 否 int int32 - 分页条件:分页索引。 page-size 否 int int32 - 分页条件:每页容量。 sort-mode 否 enumeration ASC;DESC - 排序条件:升序、降序。 sort-field 否 enumeration PARAMETERKEY - 排序条件:根据参数名称排序。
共100000条
提示

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