华为云用户手册

  • 响应示例 返回状态码为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": "6be5dfb6-d051-4f09-a3a4-5672e07e68ce", "template-binding-name": "test222", "template-binding-description": "no5 descrition", "create-time": "2024-01-19T08:52:47Z", "create-time-ui": "2024-01-19 08:52:47", "device-count": 1, "deploying-device-count": 0, "deployed-lastest-success-device-count": 1, "unbound-status": false, "template": [ { "template-id": "5da7950e-70dd-46a2-8653-f2f08afaa5b6", "template-name": "campus", "template-binding-status": "last-template-deployed", "template-variable-status": "last-variable-deployed", "deploy-last-version": true } ] } ], "total-count": 1 } } 返回状态码为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
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 query-template-bindings 是 REFERENCE 详细请参见表2。 query template bindings. - 表2 query-template-bindings-input对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-aoc-config-template-binding:input REFERENCE 详细请参见表3。 - - 表3 query-template-bindings-input-body对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 offset 否 int32 [1-2147483647] 1 query page offset, from 1 1 limit 否 int32 [1-2000] 10 query page size 100 query-field 否 string 0~128个字节。 - the filter content, support: like(ne-name,route), ilike(ne-name, route), or like(ne-name,route) and like(deploy-status, failure). the content compliance with restful get api. when use as tempalate-binding, we support like(binding-name, custom) "and(eq(templateid,0a80900d-1e8c-4191-969e-8619d0624edd),ilike(name,vlan), eq(bindingstatus, 1))"
  • URI /restconf/data/huawei-nce-aoc-config-template-application:template-application/{template-application-id} 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 template-application-id 是 string 0~128个字节。 - the identifier of the template application. "a945675d-ccff-4ea3-afb4-8d04ac3100c2"
  • 请求示例 HTTP的示例 PUT /restconf/data/huawei-nce-aoc-config-template-application:template-application/{template-application-id} Host: 192.168.1.125:26335 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AUTH-TOKEN: x-yyyyyy { "huawei-nce-aoc-config-template-application:template-application":[ { "template-application-id":{{app-id}}, "device": [ { "device-id": "8d394835-cb84-38f3-a4d5-36a7f2074b50" } ], "template": [ { "template-id": "a76c5de4-de30-4c2f-a358-42bf89e3b788" } ] } ] }
  • 响应示例 返回状态码为204:Successful operation HTTP/1.1 204 No Content 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 返回状态码为400:Internal Error 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
  • 登录注销 注销当前登录用户。 登录注销请求 DELETE /controller/v2/tokens HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en_US { "token": "CA48D152F6B19D84:637C38259E6974E17788348128A430FEE150E874752CE754B6BF855281219925" } 登录注销响应 HTTP/1.1 200 OK Date: Mon, 23 Apr 2016 17:02:00 GMT Server: example-server { "errcode": "0", "errmsg": "token revoke success." }
  • 认证登录 通过用户名登录来确认使用者的权限。 客户端向服务器下发登录认证请求,服务器返回一个Token和过期时间。 POST /controller/v2/tokens HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en_US { "userName": "admin@ac.branch", "password": "Aac@123456" } 登录认证成功响应: HTTP/1.1 200 OK Date: Mon, 23 Apr 2016 17:02:00 GMT Server: example-server Location: https://192.168.1.125:18002/controller/v2/tokens HTTP/1.1 { "errcode": "0", "errmsg": "get token successfully.", "data": { "expiredDate": "2016-10-25 12:03:37", "token_id": "CA48D152F6B19D84:637C38259E6974E17788348128A430FEE150E874752CE754B6BF855281219925" } } 客户端携带此Token再下发RESTful请求给服务器。 GET /controller/campus/v3/sites?pageIndex=0&pageSize=20 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: CA48D152F6B19D84:637C38259E6974E17788348128A430FEE150E874752CE754B6BF855281219925 Token只能在创建时的IP上使用。 下发RESTful请求时需要在请求头部添加X-ACCESS-TOKEN字段,用于标识用户的临时访问权限,否则下发RESTful请求会失败。 当前过期时间到达后,客户端需要重新向服务器认证以重新 获取Token
  • 响应示例 返回状态码为200:接口执行成功 HTTP/1.1 200 OK { "errorCode": 0, "errorMsg": null, "topoNodes": [ { "nodeId": "eb2d57d5-e56a-4867-b9a5-1e5915ba5e85", "tenantId": null, "siteId": null, "resType": "preDeployAp", "name": "AP-536", "remark": null, "parentNodeId": "d681914f-af8a-4e67-9e0d-199cc2fcf745", "posX": 42.0, "posY": 723.0, "longitude": null, "latitude": null }, { "nodeId": "1be6d950-df08-4893-a515-f9eee403bfd5", "tenantId": null, "siteId": null, "resType": "preDeployAp", "name": "AP-535", "remark": null, "parentNodeId": "d681914f-af8a-4e67-9e0d-199cc2fcf745", "posX": 42.0, "posY": 677.0, "longitude": null, "latitude": null } ], "totalSize": 2 } 返回状态码为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:接口执行成功 表2 OpenApiTopoNodeListResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errorCode int32 - - 状态码 - errorMsg string - - 新增、修改、删除异常时的错误信息 - totalSize int32 - - 拓扑节点总数 - topoNodes ARRAY_REFERENCE 详细请参见表3。 拓扑节点列表 - 表3 OpenApiTopoNodeBaseModel对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 nodeId string - - 对象ID - tenantId string - - 租户ID - siteId string - - 站点ID - resType string - - 资源类型 - name string - - 对象名称 - remark string - - 描述信息 - parentNodeId string - - 父节点ID - posX double - - 节点的X坐标 - posY double - - 节点的Y坐标 - longitude double - - 经度 - latitude double - - 纬度 - 返回状态码为400:参数错误 详细信息请参见实际响应消息体。 返回状态码为403:URL鉴权 详细信息请参见实际响应消息体。 返回状态码为404:rest接口没找到 详细信息请参见实际响应消息体。 返回状态码为406:流控限流 详细信息请参见实际响应消息体。 返回状态码为500:默认ServiceException异常码,应用内部错误 详细信息请参见实际响应消息体。 返回状态码为502:网关错误 详细信息请参见实际响应消息体。 返回状态码为503:服务不可用 详细信息请参见实际响应消息体。 返回状态码为504:表示时间超时,总线超时时间300s 详细信息请参见实际响应消息体。
  • 请求示例 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/network/wlan/region-topo/node-list?params={page : 1, limit : 20, sortColumn : name, sortMode : asc, parentNodeId : 3, resTypes : [ Region ], name : test, remark : , posX : 954, poxY : 305, longitude : 0.0, latitude : 0.0}' HTTP的示例 GET /rest/openapi/network/wlan/region-topo/node-list?params={page : 1, limit : 20, sortColumn : name, sortMode : asc, parentNodeId : 3, resTypes : [ Region ], name : test, remark : , posX : 954, poxY : 305, longitude : 0.0, latitude : 0.0} HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy
  • URI /rest/openapi/network/wlan/region-topo/node-list 表1 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 params 是 string 0~8192个字符。 - 查询拓扑节点的过滤条件(参数项含义可参考OpenApiTopoNodeQueryModel模型)。 必填参数项:page、limit、siteId(站点Id,已规划站点时必填,其他场景不填该参数)。 可选参数项:sortColumn、sortMode、parentNodeId、resTypes、name、remark、posX、poxY、longitude、latitude。 {"page" : 1, "limit" : 20, "sortColumn" : "name", "sortMode" : "asc", "parentNodeId" : "3", "resTypes" : [ "Region" ], "name" : "test", "remark" : "", "posX" : 954, "poxY" : 305, "longitude" : 0.0, "latitude" : 0.0}
  • PBR缺省模板介绍(仅V300版本AR设备支持) 表1 CreateAdvanceACL模板参数解释 参数名称 类型 取值范围 参数解释 acl_operator String merge、remove 创建或删除一条ACL策略。 merge:创建。 remove:删除。 acl_name String 1~64 ACL策略名称,不支持空格,区分大小写,记录的名称不能含有“@”、“%”、“*”等特殊字符。 permit_rule_operator String merge、replace、remove 创建、修改或删除当前ACL的permit规则。 如果source_IP和destination_IP不填,也可以不填。 merge:创建。 replace:修改。 remove:删除。 permit_rule_name Int 0~4294967294 permit规则名称。 permit_source_ip String IPv4地址 ACL permit规则匹配报文的源地址。 permit_destination_ip String IPv4地址 ACL permit规则匹配报文的目的地址。 deny_rule_operator String merge、replace、remove 创建、修改或删除当前ACL的deny规则。 merge:创建。 replace:修改。 remove:删除。 deny_rule_name Int 0~4294967294 deny规则名称。 deny_source_ip String IPv4地址 ACL deny规则匹配报文的源地址。 deny_destination_ip String IPv4地址 ACL deny规则匹配报文的目的地址。 下发到设备的命令行: acl rule name acl_name rule permit_rule_name permit ip source permit_source_ip destination permit_destination_ip rule deny_rule_name deny ip source deny_source_ip destination deny_destination_ip 表2 CreateStaticRouting模板参数解释: 参数名称 类型 取值范围 参数解释 route_operator String merge、remove 创建或删除静态路由。 merge:创建。 remove:删除。 source_vpn_instance String 1~31 源VPN实例名称,必须是设备上已经创建的VPN实例。 dest_ip_address String IPv4地址 目的IP地址及掩码长度。 dest_vpn_instance String 1~31 目的VPN实例名称,必须是设备上已经创建的VPN实例。 只有V300R19C13SPC200之后版本的设备支持通过CreateStaticRouting模板下发配置。 下发到设备的命令行: ip route-static vpn-instance source_vpn_instance dest_ip_address vpn-instance dest_vpn_instance 表3 CreateTrafficClassifierAndBehavior模板参数解释 参数名称 类型 取值范围 参数解释 cls_operator String merge、remove 创建或删除流分类。 merge:创建。 remove:删除。 cls_name String 1~31 流分类名。 不支持空格,区分大小写,记录的名称不能含有“@”、“%”、“*”等特殊字符。 match_acl_operator String merge、remove 创建或删除流分类的匹配规则。 merge:创建。 remove:删除。 acl_name String - 流分类匹配的ACL名称或编号,设备上已存在的ACL名称。 beh_operator String merge、remove 创建流行为或删除流行为。 merge:创建。 remove:删除。 beh_name String 1~31 流行为名称。 filter_action String permit、deny 流行为的报文过滤规则,如果不配置,默认为permit规则。 redirect_operator String merge、replace、remove 配置、修改或删除流行为重定向功能。 merge:创建。 replace:修改。 remove:删除。 redirect_vpn String 1~31 重定向的VPN实例名称,必须是设备上已经创建的VPN实例。 下发到设备的命令行: traffic classfier cls_name operator or if-match acl acl_name traffic behavior beh_name deny traffic behavior beh_name redirect vpn-instance redirect_vpn 表4 CreateTrafficPolicy模板参数解释 参数名称 类型 取值范围 参数解释 policy_name String 1~31 流策略名称,不支持空格,区分大小写,记录的名称不能含有“@”、“%”、“*”等特殊字符。 policy_operator String merge、remove 创建或删除流策略。 merge:创建。 remove:删除。 rule_operator String merge、replace、remove 对流策略绑定的流分类和流行为做配置、修改还是删除。 merge:创建。 replace:修改。 remove:删除。 cls_name String 1~31 流策略绑定的流分类名称,设备上已经存在的流分类。 beh_name String 1~31 流策略绑定的流行为名称,设备上已经存在的流行为。 rule_precedence String 0~100 流策略的优先级。 下发到设备的命令行: traffic policy policy_name match-extended classifier cls_name behavior beh_name 表5 InterfaceStatisticEnable模板参数解释 参数名称 类型 取值范围 参数解释 statistic_direction String both、inbound、outbound 流量统计功能应用在接口的方向。 both:将流量统计功能同时应用在接口的出方向和入方向。 inbound:将流量统计功能同时应用在接口的入方向。 outbound:将流量统计功能同时应用在接口的出方向。 operation String merge、remove 在接口下使能/去使能应用流量统计。 interface_name1 String - 应用流量统计功能的接口,必须是设备上存在的接口。 下发到设备的命令行: interface interface_name1 statistic enable inbound statistic enable outbound 表6 TrafficPolicyBindInterface模板参数解释 参数名称 类型 取值范围 参数解释 traffic_policy String 1~31 应用的流策略名称,必须是备上存在的流策略名称。 operation String remove、merge 在接口上绑定或解除绑定流策略。 merge:在接口上绑定流策略。 remove:在接口上解除绑定流策略。 interface_name1 String - 绑定流策略的接口,必须是设备上存在的接口名称。 下发到设备的命令行: interface interface_name1 traffic-policy traffic_policy inbound 父主题: iMaster NCE-Campus内置缺省模板参数介绍
  • 配置本地admin用户账号过期时间缺省模板(仅V300版本AR设备) 表1 ConfigLocalAdminExpirationTime模板参数解释 参数名称 类型 取值范围 参数解释 enable Boolean true,false 是否使能本地管理员用户的密码策略。如果需要配置过期天数,需要配置为true。 expireday Integer 0~999 密码过期时间。如果本地用户的密码过期时间为0,表示密码永久有效。 下发到设备的命令: local-aaa-user password policy administrator password expire 999 父主题: iMaster NCE-Campus内置缺省模板参数介绍
  • 响应示例 返回状态码为200:返回SLA服务列表信息。 HTTP/1.1 200 OK Content-Type: application/json;charset=UTF-8 { "errorCode": 0, "errorMsg": "快速诊断成功", "sessionId": "10020591" } 返回状态码为400:参数错误。 HTTP/1.1 400 Bad Request Date: Sat,30 Mar 2019 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: Sat,30 Mar 2019 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: Sat,30 Mar 2019 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: Sat,30 Mar 2019 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: Sat,30 Mar 2019 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: Sat,30 Mar 2019 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: Sat,30 Mar 2019 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: Sat,30 Mar 2019 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为888:服务摘机,不提供服务。 HTTP/1.1 888 888 Date: Sat,30 Mar 2019 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 POST -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Accept-Language: en-US' -H 'X-AUTH-TOKEN: x-yyyyyy' 'https://192.168.1.125:18002/rest/openapi/netslaservice/v1/quick-diagnosis' -d '{ "serviceId" : "11", "sourceNeDn" : "NE=40000038", "targetAddress" : "127.0.0.1", "icmpEchoParam" : { "vrfName" : "test", "probeCount" : 3, "interval" : 4, "timeout" : 3, "packetDataSize" : 500, "packetData" : "test", "maxTTL" : 30, "tos" : 0, "byPassRouteTable" : 2, "sourceAddressType" : 1, "sourceAddress" : "127.0.0.1", "ifIndex" : "" } }' HTTP的示例 POST /rest/openapi/netslaservice/v1/quick-diagnosis 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 { "serviceId" : "11", "sourceNeDn" : "NE=40000038", "targetAddress" : "127.0.0.1", "icmpEchoParam" : { "vrfName" : "test", "probeCount" : 3, "interval" : 4, "timeout" : 3, "packetDataSize" : 500, "packetData" : "test", "maxTTL" : 30, "tos" : 0, "byPassRouteTable" : 2, "sourceAddressType" : 1, "sourceAddress" : "127.0.0.1", "ifIndex" : "" } }
  • 响应参数 返回状态码为200:返回SLA服务列表信息。 表4 QuickDiagnosisResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errorCode int32 - 0 错误码。0:成功;1000:失败;1001:参数错误。 - errorMsg string - - 错误消息 - sessionId string - - 任务ID - 返回状态码为400:参数错误。 详细信息请参见实际响应消息体。 返回状态码为403:URL鉴权。 详细信息请参见实际响应消息体。 返回状态码为404:rest接口没找到。 详细信息请参见实际响应消息体。 返回状态码为406:流控限流。 详细信息请参见实际响应消息体。 返回状态码为500:默认ServiceException异常码,应用内部错误。 详细信息请参见实际响应消息体。 返回状态码为502:网关错误。 详细信息请参见实际响应消息体。 返回状态码为503:服务不可用。 详细信息请参见实际响应消息体。 返回状态码为504:表示时间超时,总线超时时间300s。 详细信息请参见实际响应消息体。 返回状态码为888:服务摘机,不提供服务。 详细信息请参见实际响应消息体。
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 quickDiagnosisCondition 是 REFERENCE 详细请参见表2。 SLA任务诊断条件。 - 表2 QuickDiagnosisCondition对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 serviceId 是 string 0~30个字符。 - 服务类型。"11":ICMP Echo "11" sourceNeDn 是 string 1~64个字符。 - 设备Dn号。 "NE=40000038" targetAddress 是 string 1~64个字符。 - 目的IP,当前只支持IPV4 "127.0.0.1" icmpEchoParam 是 REFERENCE 详细请参见表3。 - - 表3 IcmpEchoParam对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 vrfName 否 string 0~31个字符。 - 关联的VRF的名称 "test" probeCount 是 int32 [1-15] - 探测次数 3 interval 是 int32 [1-60] - 发包间隔(s) 4 timeout 是 int32 [1-60] - 超时时间(s) 3 packetDataSize 否 int32 [0-8100] - 报文填充大小(byte) 500 packetData 是 string 1~25个字符。满足正则表达[0-9a-zA-Z]*。 - 报文填充内容 "test" maxTTL 是 int32 [1-255] - 报文最大TTL 30 tos 否 int32 [0-255] - 报文TOS值 0 byPassRouteTable 是 int32 [1-2] - 绕过路由表选项,"1":是,"2":否。 2 sourceAddressType 否 int32 [1-1] - 源地址类型。1:IPV4地址 1 sourceAddress 否 string 1~64个字符。 - 源地址。当前只支持IPV4,缺省为设备发送接口IP。如果源地址类型为1,则必填。 "127.0.0.1" ifIndex 否 int32 - - 源接口索引 -
  • 响应参数 返回状态码为200:提交成功。 表4 submitOutput对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 submitOutput REFERENCE 详细信息请参见表 huawei-ac-application-template-north:output对象的参数列表。 - 返回状态码为400:参数不正确。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。 表5 错误码描述 Status Code Error Code Error Message Parameter 错误说明 400 0x006e004b 解析请求体发生错误。 错误的参数字段。 请求体body存在错误。 500 0x00c80014 参数{0}不存在。 {0}:参数名称。 入参有错误。 500 0x00c80012 内部服务异常。 - 系统内部错误,内部服务间调用存在异常。 500 0x00c80006 操作数据库异常 - 系统内部错误,操作数据库存在异常。 500 0x00c80029 操作异常 - 系统内部错误。
  • 请求示例 cURL示例 curl -k -s -L -i -X POST \ https://{ip:port}/restconf/operations/huawei-ac-application-template-north:submit-template-application \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' \ -H 'x-access-token: x-48ljg7o9vzqq4apgirobnwkabvuq468bryjs7s476mhflcnz5dmk5dhf44ank5vsbv4a4acbs7alikiltcuog7ul05epqrfzte06o6g5dfeo5ec4441jfvbus8btvxjz' \ -d '{ "input": { "app-id": "8e84e1b7-fb8b-4ef1-a22a-aae8785cd1a6", "transaction-id":"b5bdfd64-32bb-45a0-9b9d-1bfaa272e100", "submit":"submit-to-device", "userMode":true } }' HTTP示例 POST /restconf/operations/huawei-ac-application-template-north:submit-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": "8e84e1b7-fb8b-4ef1-a22a-aae8785cd1a6", "transaction-id":"b5bdfd64-32bb-45a0-9b9d-1bfaa272e100", "submit":"submit-to-device", "userMode":true } }
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 submitInput 是 REFERENCE 详细信息请参见表 submitInput对象的参数列表。 创建应用模板参数。 表2 submitInput对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 input 否 REFERENCE 详细信息请参见表 input对象的参数列表。 - 表3 input对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 app-id 是 string 1-128个字符 - 临时应用标识。 transaction-id 否 string 1-128个字符 - 事务标识。iMaster NCE-Campus场景不需要该参数。 userMode 是 boolean true;false - 是否为用户模式。默认值为false,iMaster NCE-Campus使用默认值即可。 submit 是 enumeration submit-to-device - 提交方式:提交到设备。
  • URI /restconf/data/huawei-nce-aoc-config-template-application:template-application/{template-application-id} 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 template-application-id 是 string 0~128个字节。 - the identifier of the template application. "a945675d-ccff-4ea3-afb4-8d04ac3100c2"
  • 请求示例 HTTP的示例 DELETE /restconf/data/huawei-nce-aoc-config-template-application:template-application/a945675d-ccff-4ea3-afb4-8d04ac3100c2 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
  • 响应示例 返回状态码为204:Successful operation HTTP/1.1 204 No Content 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 返回状态码为400:Internal Error 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
  • 响应示例 返回状态码为200: HTTP/1.1 200 OK Server: product only Date: Tue, 28 Sep 2021 03:09:51 GMT Content-Type: application/json;charset=UTF-8 Transfer-Encoding: chunked Connection: keep-alive Keep-Alive: timeout=60 expires: Thu, 01 Jan 1970 00:00:00 GMT pragma: no-cache cache-control: no-cache, no-store, max-age=0 x-trace-enable: false { "ifDataList": [ { "nedn": "d6e21ddb-9395-3220-9ae2-a0a124096d25", "interfaceId": "a4a7a7bd-9f3d-4c15-bb15-2fe083fb9eb4", "ifIndex": 10020, "ifDesc": "Ethernet0/0/47", "ifAlias": "HUAWEI, AC Series, Ethernet0/0/47 Interface", "ipAddress": "169.254.3.1/255.255.255.0", "ifOperStatus": "DOWN", "ifAdminStatus": "DOWN", "ifSpeed": "1000M", "ifRemark": null, "ifMtu": "1500", "ifDuplexMode": "HALF", "ifType": "ETHERNET", "serviceType": 0, "providerNetwork": null, "ifGroup": null, "ifMAC": "**-**-**-**-38-2E-42-34-2E-44-30-2E-43-36-2E-36-30", "trunkname": null }, { "nedn": "d6e21ddb-9395-3220-9ae2-a0a124096d25", "interfaceId": "e2b05c79-a3c2-4749-a6ee-f8560251a825", "ifIndex": 5, "ifDesc": "GigabitEthernet0/0/1", "ifAlias": "HUAWEI, AC Series, GigabitEthernet0/0/1 Interface", "ipAddress": null, "ifOperStatus": "DOWN", "ifAdminStatus": "DOWN", "ifSpeed": "1000M", "ifRemark": null, "ifMtu": "9216", "ifDuplexMode": "HALF", "ifType": "ETHERNET", "serviceType": 0, "providerNetwork": null, "ifGroup": null, "ifMAC": "**-**-**-**-38-2E-42-34-2E-44-30-2E-43-36-2E-36-30", "trunkname": null }, { "nedn": "d6e21ddb-9395-3220-9ae2-a0a124096d25", "interfaceId": "daabe21b-fd0c-4bc0-a1b2-8f2dab682e43", "ifIndex": 6, "ifDesc": "GigabitEthernet0/0/2", "ifAlias": "HUAWEI, AC Series, GigabitEthernet0/0/2 Interface", "ipAddress": null, "ifOperStatus": "DOWN", "ifAdminStatus": "DOWN", "ifSpeed": "1000M", "ifRemark": null, "ifMtu": "9216", "ifDuplexMode": "HALF", "ifType": "ETHERNET", "serviceType": 0, "providerNetwork": null, "ifGroup": null, "ifMAC": "**-**-**-**-38-2E-42-34-2E-44-30-2E-43-36-2E-36-30", "trunkname": null }, { "nedn": "d6e21ddb-9395-3220-9ae2-a0a124096d25", "interfaceId": "8b328bc1-3aa5-47e1-9744-7fb1ca3c2397", "ifIndex": 11, "ifDesc": "GigabitEthernet0/3/1", "ifAlias": "HUAWEI, AC Series, GigabitEthernet0/3/1 Interface", "ipAddress": null, "ifOperStatus": "TESTING", "ifAdminStatus": "DOWN", "ifSpeed": "1000M", "ifRemark": null, "ifMtu": "9216", "ifDuplexMode": "HALF", "ifType": "ETHERNET", "serviceType": 0, "providerNetwork": null, "ifGroup": null, "ifMAC": "**-**-**-**-38-2E-42-34-2E-44-30-2E-43-36-2E-36-30", "trunkname": null }, { "nedn": "d6e21ddb-9395-3220-9ae2-a0a124096d25", "interfaceId": "76ed8d44-d870-452e-9ab7-fe4b1f71d13b", "ifIndex": 12, "ifDesc": "GigabitEthernet0/3/2", "ifAlias": "HUAWEI, AC Series, GigabitEthernet0/3/2 Interface", "ipAddress": null, "ifOperStatus": "TESTING", "ifAdminStatus": "DOWN", "ifSpeed": "1000M", "ifRemark": null, "ifMtu": "9216", "ifDuplexMode": "HALF", "ifType": "ETHERNET", "serviceType": 0, "providerNetwork": null, "ifGroup": null, "ifMAC": "**-**-**-**-38-2E-42-34-2E-44-30-2E-43-36-2E-36-30", "trunkname": null }, { "nedn": "d6e21ddb-9395-3220-9ae2-a0a124096d25", "interfaceId": "56868d8b-2a17-4078-8b57-9f84052cd449", "ifIndex": 13, "ifDesc": "GigabitEthernet0/3/3", "ifAlias": "HUAWEI, AC Series, GigabitEthernet0/3/3 Interface", "ipAddress": null, "ifOperStatus": "TESTING", "ifAdminStatus": "DOWN", "ifSpeed": "1000M", "ifRemark": null, "ifMtu": "9216", "ifDuplexMode": "HALF", "ifType": "ETHERNET", "serviceType": 0, "providerNetwork": null, "ifGroup": null, "ifMAC": "**-**-**-**-38-2E-42-34-2E-44-30-2E-43-36-2E-36-30", "trunkname": null }, { "nedn": "d6e21ddb-9395-3220-9ae2-a0a124096d25", "interfaceId": "9ab9c761-60a3-4b11-9d40-7941cb93e11f", "ifIndex": 14, "ifDesc": "GigabitEthernet0/3/4", "ifAlias": "HUAWEI, AC Series, GigabitEthernet0/3/4 Interface", "ipAddress": null, "ifOperStatus": "TESTING", "ifAdminStatus": "DOWN", "ifSpeed": "1000M", "ifRemark": null, "ifMtu": "9216", "ifDuplexMode": "HALF", "ifType": "ETHERNET", "serviceType": 0, "providerNetwork": null, "ifGroup": null, "ifMAC": "**-**-**-**-38-2E-42-34-2E-44-30-2E-43-36-2E-36-30", "trunkname": null }, { "nedn": "d6e21ddb-9395-3220-9ae2-a0a124096d25", "interfaceId": "fd9155af-a32e-48e7-a510-f1e7bcc6945c", "ifIndex": 1, "ifDesc": "InLoopBack0", "ifAlias": "HUAWEI, AC Series, InLoopBack0 Interface", "ipAddress": "127.0.0.1/255.0.0.0", "ifOperStatus": "DOWN", "ifAdminStatus": "DOWN", "ifSpeed": "0", "ifRemark": null, "ifMtu": "1500", "ifDuplexMode": null, "ifType": "LOOPBACK", "serviceType": 0, "providerNetwork": null, "ifGroup": null, "ifMAC": "**-**-**-**-30-2E-30-30-2E-30-30-2E-30-30-2E-30-30", "trunkname": null }, { "nedn": "d6e21ddb-9395-3220-9ae2-a0a124096d25", "interfaceId": "c0115f0d-a4ee-4661-9d88-bbbfb71fff9b", "ifIndex": 2, "ifDesc": "NULL0", "ifAlias": "HUAWEI, AC Series, NULL0 Interface", "ipAddress": null, "ifOperStatus": "DOWN", "ifAdminStatus": "DOWN", "ifSpeed": "0", "ifRemark": null, "ifMtu": "1500", "ifDuplexMode": null, "ifType": "NULL", "serviceType": 0, "providerNetwork": null, "ifGroup": null, "ifMAC": "**-**-**-**-30-2E-30-30-2E-30-30-2E-30-30-2E-30-30", "trunkname": null }, { "nedn": "d6e21ddb-9395-3220-9ae2-a0a124096d25", "interfaceId": "eec6b3b7-947f-45b7-b148-fc9100b47705", "ifIndex": 15, "ifDesc": "Vlanif1", "ifAlias": "HUAWEI, AC Series, Vlanif1 Interface", "ipAddress": "169.254.1.1/255.255.255.0", "ifOperStatus": "DOWN", "ifAdminStatus": "DOWN", "ifSpeed": "1000M", "ifRemark": null, "ifMtu": "1500", "ifDuplexMode": null, "ifType": "VLANIF", "serviceType": 0, "providerNetwork": null, "ifGroup": null, "ifMAC": "**-**-**-**-38-2E-42-34-2E-44-30-2E-43-36-2E-36-30", "trunkname": null } ], "error_code": 0, "error_msg": "Successful.", "totalCount": 606, "currentPage": 1, "totalPage": 61 }
  • 响应参数 返回状态码为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-ACCESS-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" } ] }
共100000条
提示

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