0% found this document useful (0 votes)
108 views

01-03 API Tables

Uploaded by

Aykut Yilmaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
108 views

01-03 API Tables

Uploaded by

Aykut Yilmaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 712

CloudEngine 8800, 7800, 6800, and 5800 Series Switches

RESTful API Reference 3 API Tables

3 API Tables

About This Chapter

3.1 CPU Information


3.2 System Information
3.3 Configuration Management
3.4 License
3.5 Entity Management
3.6 PIM
3.7 Interface Management
3.8 File Management
3.9 Channel Management
3.10 Information Management
3.11 SSH
3.12 AAA User Management
3.13 User Access
3.14 SNMP
3.15 VLAN
3.16 Layer 2 and Layer 3 Interface Information
3.17 MSTP
3.18 TRILL Configurations
3.19 ARP
3.20 Ping
3.21 Trace

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 4


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.22 LLDP
3.23 BFD Information
3.24 VRRP
3.25 IP Protocol Stack
3.26 HWTACACS
3.27 OPS Applications
3.28 Python API
3.29 HTTP
3.30 Stack Management
3.31 ZTP Management

3.1 CPU Information


Operation URI Description

GET /devm/cpuInfos/cpuInfo Query a board's CPU usage.

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<cpuInfo>
<position></position>
<entIndex></entIndex>
<systemCpuUsage></systemCpuUsage>
<ovloadThreshold></ovloadThreshold>
<unovloadThreshold></unovloadThreshold>
</cpuInfo>

Table 3-1 describes elements in requests.

Table 3-1 Elements


Element Description

position Specifies position information.

entIndex Specifies a device index.

systemCpuUsage Specifies a board's CPU usage.

ovloadThreshold Specifies an overload threshold.

unovloadThreshold Specifies an overload clearance threshold.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<cpuInfo>
<position chassis="1" slot="17">17</position>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 5


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<entIndex>17891329</entIndex>
<systemCpuUsage>5</systemCpuUsage>
<ovloadThreshold>95</ovloadThreshold>
<unovloadThreshold>75</unovloadThreshold>
</cpuInfo>
<cpuInfo>
<position chassis="1" slot="18">18</position>
<entIndex>17956865</entIndex>
<systemCpuUsage>3</systemCpuUsage>
<ovloadThreshold>95</ovloadThreshold>
<unovloadThreshold>75</unovloadThreshold>
</cpuInfo>
<cpuInfo>
<position chassis="1" slot="3">3</position>
<entIndex>16973825</entIndex>
<systemCpuUsage>5</systemCpuUsage>
<ovloadThreshold>95</ovloadThreshold>
<unovloadThreshold>75</unovloadThreshold>
</cpuInfo>
<cpuInfo>
<position chassis="1" slot="4">4</position>
<entIndex>17039361</entIndex>
<systemCpuUsage>3</systemCpuUsage>
<ovloadThreshold>95</ovloadThreshold>
<unovloadThreshold>75</unovloadThreshold>
</cpuInfo>

Table 3-2 describes elements in responses.

Table 3-2 Elements


Element Description

position Specifies position information.

entIndex Specifies a device index.

systemCpuUsage Specifies a board's CPU usage.

ovloadThreshold Specifies an overload threshold.

unovloadThreshold Specifies an overload clearance threshold.

Table 3-3 describes status codes in responses.

Table 3-3 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 6


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.2 System Information


Global Attribute
Operation URI Description

GET /system/systemInfo Obtains the global system


information, such as the
system name, ESN number,
and system MAC address.

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<systemInfo>
</systemInfo>

l Response example (XML format):


<?xml version="1.0" encoding="UTF-8"?>
<systemInfo>
<sysName>HUAWEI</sysName>
<sysContact>R&D Beijing, Huawei Technologies co.,Ltd.</sysContact>
<sysLocation>Beijing China</sysLocation>
<sysDesc>Huawei Versatile Routing Platform Software
VRP (R) software, Version 8.180 (NE40E-X16 V800R018C00SPC500B036)
Copyright (C) 2012-2018 Huawei Technologies Co., Ltd.
HUAWEI NE40E-X16
</sysDesc>
<sysObjectId>1.3.6.1.4.1.2011.2.62.2.10</sysObjectId>
<sysGmtTime>1530527777</sysGmtTime>
<sysUpTime>30167</sysUpTime>
<sysService>78</sysService>
<platformName>VRP</platformName>
<platformVer>V800R018C00SPC500</platformVer>
<productName>NE40E-X16</productName>
<productVer>V800R018C00SPC500</productVer>
<patchVer>
</patchVer>
<esn>391091252449570</esn>
<mac>38BA-ABE5-1F05</mac>
<lsRole>admin</lsRole>
<authenFlag>false</authenFlag>
</systemInfo>

Table 3-4 shows the description of elements in response.

Table 3-4 The description of elements in response

Element Description

sysName Host name of the device

platformName Platform name

platformVer Platform version

productName Product name

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 7


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

productVer Product version

patchVer Patch version

esn ESN number of a device

mac MAC address of a device

Table 3-5 shows the description of status codes in response.

Table 3-5 The description of status codes in response


Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented


because the request is incorrect in syntax
or the information attribute in the request
is incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.3 Configuration Management

3.3.1 Check Whether Running Configurations Are Consistent


with the Specified Configuration File
Operat URI Description
ion

GET /cfg/cfgFiles/cfgFile Check whether running


configurations are
consistent with the
specified configuration file.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<cfgFile>
<fileName>vrpcfg.zip</fileName>
<fileCurrentChanges>
<fileCurrentChange>
<index/>
<configChange/>
</fileCurrentChange>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 8


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

</fileCurrentChanges>
</cfgFile>

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<data>
<cfg xmlns="http://www.huawei.com/netconf/vrp" format-version="1.0"
content-version="1.0">
<cfgFiles>
<cfgFile>
<fileName>vrpcfg.zip</fileName>
<fileCurrentChanges>
<fileCurrentChange>
<configChange> #&#13;
</configChange>
<index>0</index>
</fileCurrentChange>
<fileCurrentChange>
<configChange>- isis 1&#13;
</configChange>
<index>1</index>
</fileCurrentChange>
<fileCurrentChange>
<configChange> #&#13;
</configChange>
<index>2</index>
</fileCurrentChange>
</fileCurrentChanges>
</cfgFile>
</cfgFiles>
</cfg>
</data>
</rpc-reply>

Table 3-6 describes elements in responses.

Table 3-6 Elements


Element Description

configChang Specifies whether configurations are changed.


e

Table 3-7 describes status codes in responses.

Table 3-7 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 9


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.3.2 Save the Configuration File


Operat URI Description
ion

POST /_copy Save the configuration file.

l Request example
<copy-config>
<target>
<startup/>
</target>
<source>
<running/>
</source>
</copy-config>

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<ok/>
</rpc-reply>

Table 3-8 describes status codes in responses.

Table 3-8 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the request is incorrect in
syntax or the information attribute in the request is incorrect.

500 Internal Server The request operation failed because of internal errors in
Error services or unidentified processing errors.

3.3.3 Roll Back Configurations to the Specified File

Operat URI Description


ion

POST /cfg/rollbackByFile Roll back configurations to


the specified file.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<rollbackByFile>
<fileName>1.cfg</fileName>
</rollbackByFile>

Table 3-9 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 10


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-9 Elements


Element Description

fileName Specifies the name of a configuration file.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<ok/>
</rpc-reply>

Table 3-10 describes status codes in responses.

Table 3-10 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the request is incorrect in
syntax or the information attribute in the request is incorrect.

500 Internal Server The request operation failed because of internal errors in
Error services or unidentified processing errors.

3.4 License

3.4.1 Check License File Information


Operat URI Description
ion

POST /lcs/lcsVerify Check license file


information.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<lcsVerify>
<lcsFileName>flash:/CloudEngine12800V100R005_20150522110406.dat
</lcsFileName>
</lcsVerify>

Table 3-11 describes elements in requests.

Table 3-11 Elements


Element Description

lcsFileName Specifies the name of a license file.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 11


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-12 describes status codes in responses.

Table 3-12 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the request is incorrect in
syntax or the information attribute in the request is incorrect.

500 Internal Server The request operation failed because of internal errors in
Error services or unidentified processing errors.

3.4.2 Activate a License File


Operation URI Description

POST /lcs/lcsActive Activate a license file.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<lcsActive>
<lcsFileName>CloudEngine12800V100R005_20150522110406.dat
</lcsFileName>
</lcsActive>

Table 3-13 describes elements in requests.

Table 3-13 Elements in requests

Element Description

lcsFileName Specifies the name of a license file.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-14 describes status codes in responses.

Table 3-14 Description of status codes in responses

Status Code Description

200 OK The operation succeeds.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 12


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request cannot be implemented because the request is
incorrect in syntax or the information attribute in the request is
incorrect.

500 Internal Server Internal errors in services cause a request failure or an unidentified
Error request.

3.5 Entity Management


Restarting a Device
Operation URI Description

POST /devm/reboot Restarts a device.

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<reboot>
<saveConfig>true</saveConfig>
</reboot>

Table 3-15 shows the description of elements in request.

Table 3-15 The description of elements in request


Element Description

saveConfig l true: saves environmental


configurations.
l false: does not saves environmental
configurations.

l Response example (XML format):


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-16 shows the description of status codes in response.

Table 3-16 The description of status codes in response


Status Code Description

200 OK The operation succeeds.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 13


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request cannot be implemented


because the request is incorrect in syntax
or the information attribute in the request
is incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

Entity Information
Operation URI Description

GET /devm/phyEntitys Obtains entity information.

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<phyEntitys>
<phyEntity>
<entClass>mpuModule</entClass>
<entStandbyState/>
<position/>
</phyEntity>
</phyEntitys>

Table 3-17 shows the description of elements in request.

Table 3-17 The description of elements in request

Element Description

entClass Specifies the entity type. mpuModule


indicates the MPU.

l Response example (XML format):


<?xml version="1.0" encoding="UTF-8"?>
<phyEntitys>
<phyEntity>
<entClass>mpuModule</entClass>
<position>17</position>
<entStandbyState>master</entStandbyState>
</phyEntity>
<phyEntity>
<entClass>mpuModule</entClass>
<position>18</position>
<entStandbyState>slave</entStandbyState>
</phyEntity>
</phyEntitys>

Table 3-18 shows the description of elements in response.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 14


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-18 The description of elements in response


Element Description

entClass Specifies the entity type. mpuModule


indicates the MPU.

position Specifies the entity location.

entStandbyState Specifies the entity status. The value can


be master and slave.

Table 3-19 shows the description of status codes in response.

Table 3-19 The description of status codes in response


Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented


because the request is incorrect in syntax
or the information attribute in the request
is incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.6 PIM

3.6.1 PIM Interface

3.6.1.1 Create a PIM Interface


Operation URI Description

POST /pim/pimafspro/ Create a PIM interface.


pimAfsIfCfgs/pimAfsIfCfg

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<pimAfsIfCfg>
<vrfName>_public_</vrfName>
<addressFamily>ipv4unicast</addressFamily>
<ifName>10GE1/0/1</ifName>
<pimsmEnable>true</pimsmEnable>
</pimAfsIfCfg>

Table 3-20 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 15


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-20 Elements


Element Description

vrfName Specifies a VPN instance name.

addressFamily Specifies the IPv4 or IPv6 address family.


The value is an enumerated type and
case-sensitive.
ipv4unicast: IPv4 unicast address family
ipv6unicast: IPv6 unicast address family

ifName Specifies an interface name.

pimsmEnable Enables or disables PIM on an interface.


The value is a Boolean data type.
true: enables PIM on an interface.
false: disables PIM on an interface.
The default value is false.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-21 describes status codes in responses.

Table 3-21 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.6.1.2 Delete a PIM Interface


Operation URI Description

DELETE /pim/pimafspro/ Delete a PIM interface.


pimAfsIfCfgs/pimAfsIfCfg

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<pimAfsIfCfg operation="delete">

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 16


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<vrfName>_public_</vrfName>
<addressFamily>ipv4unicast</addressFamily>
<ifName>10GE1/0/1</ifName>
</pimAfsIfCfg>

Table 3-22 describes elements in requests.

Table 3-22 Elements


Element Description

vrfName Specifies a VPN instance name.

addressFamily Specifies the IPv4 or IPv6 address family.


The value is an enumerated type and
case-sensitive.
ipv4unicast: IPv4 unicast address family
ipv6unicast: IPv6 unicast address family

ifName Specifies an interface name.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-23 describes status codes in responses.

Table 3-23 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.6.1.3 Modify a PIM Interface


Operation URI Description

PUT /pim/pimafspro/ Modify a PIM interface.


pimAfsIfCfgs/pimAfsIfCfg

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<pimAfsIfCfg>
<vrfName>_public_</vrfName>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 17


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<addressFamily>ipv4unicast</addressFamily>
<ifName>10GE1/0/1</ifName>
<pimsmEnable>false</pimsmEnable>
</pimAfsIfCfg>

Table 3-24 describes elements in requests.

Table 3-24 Elements


Element Description

vrfName Specifies a VPN instance name.

addressFamily Specifies the IPv4 or IPv6 address family.


The value is an enumerated type and
case-sensitive.
ipv4unicast: IPv4 unicast address family
ipv6unicast: IPv6 unicast address family

ifName Specifies an interface name.

pimsmEnable Enables or disables PIM on an interface.


The value is a Boolean data type.
true: enables PIM on an interface.
false: disables PIM on an interface.
The default value is false.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-25 describes status codes in responses.

Table 3-25 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 18


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.6.1.4 Query a PIM Interface


Operation URI Description

GET /pim/pimafspro/ Query a PIM interface.


pimAfsIfCfgs/pimAfsIfCfg

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<pimAfsIfCfg>
<vrfName/>
<addressFamily/>
<ifName/>
<pimsmEnable/>
</pimAfsIfCfg>

Table 3-26 describes elements in requests.

Table 3-26 Elements


Element Description

vrfName Specifies a VPN instance name.

addressFamily Specifies the IPv4 or IPv6 address family.


The value is an enumerated type and
case-sensitive.
ipv4unicast: IPv4 unicast address family
ipv6unicast: IPv6 unicast address family

ifName Specifies an interface name.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?> <pimAfsIfCfgs>
<pimAfsIfCfgs>
<pimAfsIfCfg>
<vrfName>vrf2</vrfName>
<addressFamily>ipv4unicast</addressFamily>
<ifName>10GE1/0/1</ifName>
</pimAfsIfCfg>
</pimAfsIfCfgs>

Table 3-27 shows elements in responses.

Table 3-27 Elements


Element Description

vrfName Indicates a VPN instance name.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 19


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

addressFamily Indicates the IPv4 or IPv6 address family.


The value is an enumerated type and
case-sensitive.
ipv4unicast: IPv4 unicast address family
ipv6unicast: IPv6 unicast address family

ifName Indicates an interface name.

Table 3-28 describes status codes in responses.

Table 3-28 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.7 Interface Management

3.7.1 Configure a Logical Interface

3.7.1.1 Create a Logical Interface


Operation URI Description

POST /ifm/interfaces/interface Create a logical interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<ifName>Vlanif1</ifName>
<ifPhyType>Vlanif</ifPhyType>
<ifNumber>1</ifNumber>
<ifAdminStatus>up</ifAdminStatus>
</interface>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 20


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-29 describes elements in requests.

Table 3-29 Elements

Element Description

ifName Specifies an interface name.

ifPhyType Specifies an interface's physical type.

ifNumber Specifies the number of an interface.

ifAdminStatus Specifies an interface's management


status.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-30 describes status codes in responses.

Table 3-30 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.7.1.2 Delete a Logical Interface


Operation URI Description

DELETE /ifm/interfaces/interface Delete a logical interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interface operation="delete">
<ifName>Eth-Trunk1</ifName>
</interface>

Table 3-31 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 21


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-31 Elements


Element Description

ifName Specifies an interface name.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-32 describes status codes in responses.

Table 3-32 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.7.2 Query Interface Information

3.7.2.1 Query Interface Attributes


Operation URI Description

GET /ifm/interfaces Query information about all


interfaces.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface>
<ifName></ifName>
<ifPhyType>GigabitEthernetGigabitEthernet10GEGigabitEthernet</
ifPhyType>
</interface>
</interfaces>

Table 3-33 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 22


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-33 Elements

Element Description

ifPhyType Specifies an interface type.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface>

<ifName>Gigabitethernet1/0/0Gigabitethernet0/1/010GE1/0/1Gigabitethernet4/0/6<
/ifName>
</interface>
</interfaces>

Table 3-34 describes elements in responses.

Table 3-34 Elements

Element Description

ifName Specifies an interface name.

Table 3-35 describes status codes in responses.

Table 3-35 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.7.2.2 Query an Interface's Dynamic Information


Operation URI Description

GET /ifm/interfaces/interface Query an interface's


dynamic information.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 23


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<ifName>10GE1/0/1</ifName>
<ifDynamicInfo/>
</interface>

Table 3-36 describes elements in requests.

Table 3-36 Elements

Element Description

ifName Specifies an interface name.

ifDynamicInfo Specifies an interface's dynamic


information.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface>
<ifDynamicInfo>
<ifOperStatus>up</ifOperStatus>
<ifPhyStatus>up</ifPhyStatus>
<ifLinkStatus>up</ifLinkStatus>
<ifOpertMTU>1500</ifOpertMTU>
<ifOperSpeed>100000000</ifOperSpeed>
<ifV4State>up</ifV4State>
<ifV6State>down</ifV6State>
<ifCtrlFlapDamp>false</ifCtrlFlapDamp>
<ifOperMac>383a-6b11-0300</ifOperMac>
<lineProtocolUpTime/>
<isOffline>false</isOffline>
<ifLinkQualityGrade>GOOD</ifLinkQualityGrade>
</ifDynamicInfo>
</interface>
</interfaces>

Table 3-37 describes elements in responses.

Table 3-37 Elements

Element Description

ifName Specifies an interface name.

ifDynamicInfo Specifies an interface's dynamic


information.

ifOperStatus Specifies an interface's running status.

ifPhyStatus Specifies an interface's physical status.

ifLinkStatus Specifies an interface's link layer protocol


status.

ifOpertMTU Specifies an interface's dynamic MTU.

ifOperSpeed Specifies an interface's bandwidth.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 24


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

ifV4State Specifies an interface's IPv4 protocol


status.

ifV6State Specifies an interface's IPv6 protocol


status.

ifCtrlFlapDamp Specifies whether the interface status is


suppressed.

Table 3-38 describes status codes in responses.

Table 3-38 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.7.2.3 Query an Interface's Trap Generation Threshold


Operation URI Description

GET /ifm/interfaces/interface/ Query an interface's trap


ifTrapThreshold generation threshold.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface>
<ifName>10GE1/0/1</ifName>
<ifTrapThreshold/>
</interface>
</interfaces>

Table 3-39 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 25


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-39 Elements

Element Description

ifName Specifies an interface name.

ifTrapThres Specifies an interface's trap generation threshold.


hold

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface>
<ifName>10GE1/0/1</ifName>
<ifTrapThreshold>
<inputRisingRate>100</inputRisingRate>
<inputResumeRate>100</inputResumeRate>
<outputRisingRate>100</outputRisingRate>
<outputResumeRate>100</outputResumeRate>
</ifTrapThreshold>
</interface>
</interfaces>

Table 3-40 describes elements in responses.

Table 3-40 Elements

Element Description

ifName Specifies an interface name.

ifTrapThres Specifies an interface's trap generation threshold.


hold

inputRising Specifies an alarm generation threshold for the inbound bandwidth


Rate usage.

inputResum Specifies an alarm clearance threshold for the inbound bandwidth


eRate usage.

outputRisin Specifies an alarm generation threshold for the outbound bandwidth


gRate usage.

outputResu Specifies an alarm clearance threshold for the outbound bandwidth


meRate usage.

Table 3-41 describes status codes in responses.

Table 3-41 Status codes

Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 26


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.7.2.4 Query Traffic Statistics on an Interface


Operation URI Description

GET /ifm/interfaces/interface/ Query traffic statistics on an


ifStatistics interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface>
<ifName>10GE1/0/1</ifName>
<ifStatistics/>
</interface>
</interfaces>

Table 3-42 describes elements in requests.

Table 3-42 Elements


Element Description

ifName Specifies an interface name.

ifStatistics Specifies traffic statistics on an interface.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface>
<ifStatistics>
<receiveByte>0</receiveByte>
<sendByte>0</sendByte>
<receivePacket>5199468</receivePacket>
<sendPacket>5613</sendPacket>
<rcvUniPacket>5889</rcvUniPacket>
<rcvMutiPacket>319787</rcvMutiPacket>
<rcvBroadPacket>4873792</rcvBroadPacket>
<sendUniPacket>5313</sendUniPacket>
<sendMutiPacket>0</sendMutiPacket>
<sendBroadPacket>300</sendBroadPacket>
<rcvErrorPacket>0</rcvErrorPacket>
<rcvDropPacket>0</rcvDropPacket>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 27


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<sendErrorPacket>0</sendErrorPacket>
<sendDropPacket>0</sendDropPacket>
</ifStatistics>
</interface>
</interfaces>

Table 3-43 describes elements in responses.

Table 3-43 Elements


Element Description

ifName Specifies an interface name.

ifStatistics Specifies traffic statistics on an interface.

receiveByte Specifies the number of bytes that the interface received.

sendByte Specifies the number of the bytes that the interface sent.

receivePack Specifies the number of packets that the interface received.


et

sendPacket Specifies the number of packets that the interface sent.

rcvUniPack Specifies the number of unicast packets that the interface received.
et

rcvMutiPac Specifies the number of multicast packets that the interface received.
ket

rcvBroadPa Specifies the number of broadcast packets that the interface received.
cket

sendUniPac Specifies the number of unicast packets that the interface sent.
ket

sendMutiPa Specifies the number of multicast packets that the interface sent.
cket

sendBroadP Specifies the number of broadcast packets that the interface sent.
acket

rcvErrorPac Specifies the number of error packets that the interface received.
ket

rcvDropPac Specifies the total number of packets that were sent to the interface but
ket dropped by the interface.

sendErrorPa Specifies the number of error packets that the interface sent .
cket

sendDropPa Specifies the number of dropped packets that the interface sent.
cket

Table 3-44 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 28


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-44 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.7.2.5 Query Traffic Statistics That Can Be Cleared from an Interface


Operation URI Description

GET /ifm/interfaces/interface/ifClearedStat Query traffic statistics that


can be cleared from an
interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface>
<ifName>10GE1/0/1</ifName>
<ifClearedStat/>
</interface>
</interfaces>

Table 3-45 describes elements in requests.

Table 3-45 Elements


Element Description

ifName Specifies an interface name.

ifClearedSta Specifies traffic statistics that can be cleared from an interface.


t

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface>
<ifName>10GE1/0/1</ifName>
<ifClearedStat>
<ifIndex>3</ifIndex>
<ifOperStatItvl>300</ifOperStatItvl>
<inByteRate>1700</inByteRate>
<inPacketRate>85</inPacketRate>
<inUseRate>0.01%</inUseRate>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 29


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<outByteRate>80</outByteRate>
<outPacketRate>4</outPacketRate>
<outUseRate>0.01%</outUseRate>
<receiveByte>0</receiveByte>
<sendByte>0</sendByte>
<receivePacket>5223560</receivePacket>
<sendPacket>6780</sendPacket>
<rcvUniPacket>7705</rcvUniPacket>
<rcvMutiPacket>321454</rcvMutiPacket>
<rcvBroadPacket>4894401</rcvBroadPacket>
<sendUniPacket>6480</sendUniPacket>
<sendMutiPacket>0</sendMutiPacket>
<sendBroadPacket>300</sendBroadPacket>
<rcvErrorPacket>0</rcvErrorPacket>
<rcvDropPacket>0</rcvDropPacket>
<sendErrorPacket>0</sendErrorPacket>
<sendDropPacket>0</sendDropPacket>
</ifClearedStat>
</interface>
</interfaces>

Table 3-46 describes elements in responses.

Table 3-46 Elements


Element Description

ifName Specifies an interface name.

ifIndex Specifies an interface index.

ifClearedSta Specifies traffic statistics that can be cleared from an interface.


t

ifOperStatIt Specifies the interval at which traffic statistics are collected on the
vl interface, in seconds.

inByteRate Specifies the rate at which the interface receives bytes within the
interval.

inPacketRat Specifies the rate at which the interface receives packets within the
e interval.

inUseRate Specifies the inbound bandwidth usage within the interval.

outByteRate Specifies the rate at which the interface sends bytes within the interval.

outPacketR Specifies the rate at which the interface sends packets within the
ate interval.

outUseRate Specifies the outbound bandwidth usage within the interval.

receiveByte Specifies the total number of bytes that the interface received. The byte
statistics can be cleared.

sendByte Specifies the total number of bytes that the interface sent. The byte
statistics can be cleared.

receivePack Specifies the total number of packets that the interface received. The
et packet statistics can be cleared.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 30


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

sendPacket Specifies the total number of packets that the interface sent. The packet
statistics can be cleared.

rcvUniPack Specifies the total number of unicast packets that the interface
et received. The packet statistics can be cleared.

rcvMutiPac Specifies the total number of multicast packets that the interface
ket received. The packet statistics can be cleared.

rcvBroadPa Specifies the total number of broadcast packets that the interface
cket received. The packet statistics can be cleared.

sendUniPac Specifies the total number of unicast packets that the interface sent.
ket The packet statistics can be cleared.

sendMutiPa Specifies the total number of multicast packets that the interface sent.
cket The packet statistics can be cleared.

sendBroadP Specifies the total number of broadcast packets that the interface sent.
acket The packet statistics can be cleared.

rcvErrorPac Specifies the total number of error packets that the interface received.
ket The statistics about error packets can be cleared.

rcvDropPac Specifies the total number of packets that were sent to the interface but
ket dropped by the interface. The statistics about dropped packets statistics
can be cleared.

sendErrorPa Specifies the total number of error packets that the interface sent. The
cket statistics about error packets can be cleared.

sendDropPa Specifies the total number of packets that the interface sent but dropped
cket by the remote interface. The statistics about dropped packets can be
cleared.

Table 3-47 describes status codes in responses.

Table 3-47 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 31


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.7.2.6 Query an Interface's ErrorDown Information


Operation URI Description

GET /ifm/interfaces/interface/ Query an interface's


ifErrorDown ErrorDown information.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface>
<ifName>10GE1/0/1</ifName>
<ifErrorDown/>
</interface
</interfaces>

Table 3-48 describes elements in requests.

Table 3-48 Elements

Element Description

ifName Specifies an interface name.

ifErrorDow Specifies an interface's ErrorDown information.


n

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface>
<ifName>10GE1/0/1</ifName>
<ifErrorDown>
<errorDownCause>invalid</errorDownCause>
<recoveryTime>0</recoveryTime>
<remainderTime>0</remainderTime>
</ifErrorDown>
</interface>
</interfaces>

Table 3-49 describes elements in responses.

Table 3-49 Elements

Element Description

ifName Specifies an interface name.

ifErrorDow Specifies an interface's ErrorDown information, including the interface


n name, ErrorDown reason, and total and remaining time for the
interface to restore to Up.

errorDown Specifies the reason why the interface is shut down after an error event
Cause occurs.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 32


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

recoveryTi Specifies the total time that the interface has to wait before it goes Up,
me in seconds.

remainderTi Specifies the remaining time that the interface has to wait before it
me goes Up, in seconds.

Table 3-50 describes status codes in responses.

Table 3-50 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.7.2.7 Query an Interface's Global Configurations


Operation URI Description

GET /ifm/globalConfig Query an interface's global


configurations.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<globalConfig/>

Table 3-51 describes elements in requests.

Table 3-51 Elements


Element Description

globalConfi Specifies an interface's global configurations.


g

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<globalConfig>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 33


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<globalStatItvl>300</globalStatItvl>
</globalConfig>

Table 3-52 describes elements in responses.

Table 3-52 Elements


Element Description

globalConfi Specifies an interface's global configurations.


g

globalStatIt Specifies an interval (in seconds) at which global traffic statistics are
vl collected. The value must be a multiple of 10.

Table 3-53 describes status codes in responses.

Table 3-53 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.7.2.8 Query the Automatic Recovery Time of Interface Status


Operation URI Description

GET /ifm/autoRecoveryTimes Query the configured time


periods that interfaces have
to wait before automatically
going Up.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<autoRecoveryTimes/>

Table 3-54 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 34


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-54 Elements

Element Description

autoRecove Specifies the configuration of the time that an interface has to wait
ryTime before automatically going Up.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<autoRecoveryTimes>
<autoRecoveryTime>
<errorDownType>auto-defend</errorDownType>
<timeValue>30</timeValue>
</autoRecoveryTime>
</autoRecoveryTimes>

Table 3-55 describes elements in responses.

Table 3-55 Elements

Element Description

autoRecove Specifies the configuration of the time that an interface has to wait
ryTime before automatically going Up.

errorDownT Specifies the reason why the interface is shut down after an error event
ype occurs.

timeValue Specifies the time (in seconds) that an interface has to wait before
automatically going Up.

Table 3-56 describes status codes in responses.

Table 3-56 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.7.3 Interface Flapping Suppression

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 35


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.7.3.1 Configure Flapping Suppression Parameters for an Interface


Operation URI Description

PUT /ifm/interfaces/interface/ Configure flapping


ifControlFlap suppression parameters for
an interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface operation="merge">
<ifName>10GE1/0/1</ifName>
<ifControlFlap>
<ifCtrlFlapEnbl>true</ifCtrlFlapEnbl>
<ifSuppress>2000</ifSuppress>
<ifReuse>760</ifReuse>
<ifDecayOk>54</ifDecayOk>
<ifDecayNg>54</ifDecayNg>
<ifCeiling>6000</ifCeiling>
</ifControlFlap>
</interface>
</interfaces>

Table 3-57 describes elements in requests.

Table 3-57 Elements

Element Description

ifName Specifies an interface name.

ifControlFlap Specifies whether the interface status is


suppressed.

ifSuppress Specifies a suppression threshold. The


value must be larger than the reuse value
and smaller than the ceiling value.

ifReuse Specifies an alarm reuse threshold. The


reuse value must be smaller than the
suppression threshold.

ifDecayOk Specifies the time (in seconds) that the


penalty value takes to decrease to half
when an alarm clearance signal is
received.

ifDecayNg Specifies the time (in seconds) that the


penalty value takes to decrease to half
when an alarm generation signal is
received.

ifCeiling Specifies an alarm ceiling threshold. The


ceiling value must be larger than the
suppression threshold.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 36


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

ifCtrlFlapEnbl Specifies the enabling flag of interface


status suppression.

ifStatItvl Specifies the interval at which an


interface collects traffic statistics.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<ok/>
</rpc-reply>

Table 3-58 describes status codes in responses.

Table 3-58 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.7.3.2 Query Flapping Suppression Parameters on an Interface


Operation URI Description

GET /ifm/interfaces/interface/ Query flapping suppression


ifControlFlap parameters on an interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface>
<ifName>10GE1/0/1</ifName>
<ifControlFlap/>
</interface>
</interfaces>

Table 3-59 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 37


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-59 Elements

Element Description

ifName Specifies an interface name.

ifControlFla Specifies whether the interface status is suppressed.


p

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface>
<ifName>10GE1/0/1</ifName>
<ifControlFlap>
<ifSuppress>2000</ifSuppress>
<ifReuse>750</ifReuse>
<ifDecayOk>54</ifDecayOk>
<ifDecayNg>54</ifDecayNg>
<ifCeiling>6000</ifCeiling>
<ifCtrlFlapEnbl>false</ifCtrlFlapEnbl>
</ifControlFlap>
</interface>
</interfaces>

Table 3-60 describes elements in responses.

Table 3-60 Elements

Element Description

ifName Specifies an interface name.

ifControlFla Specifies whether the interface status is suppressed.


p

ifSuppress Specifies a suppression threshold. The value must be larger than the
reuse value and smaller than the ceiling value.

ifReuse Specifies an alarm reuse threshold. The reuse value must be smaller
than the suppression threshold.

ifDecayOk Specifies the time (in seconds) that the penalty value takes to decrease
to half when an alarm clearance signal is received.

ifDecayNg Specifies the time (in seconds) that the penalty value takes to decrease
to half when an alarm generation signal is received.

ifCeiling Specifies an alarm ceiling threshold. The ceiling value must be larger
than the suppression threshold.

ifCtrlFlapE Specifies the enabling flag of interface status suppression.


nbl

Table 3-61 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 38


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-61 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.7.4 Interface IPv4 Address

3.7.4.1 Configure an IPv4 Address for an Interface


Operation URI Description

POST /ifm/interfaces/interface/ Configure an IPv4 address


ifmAm4/am4CfgAddrs for an interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface operation="merge">
<ifName>10GE1/0/1</ifName>
<ifmAm4>
<am4CfgAddrs>
<am4CfgAddr operation="create">
<ifIpAddr>1.1.1.1</ifIpAddr>
<subnetMask>255.255.254.0</subnetMask>
<addrType>main</addrType>
</am4CfgAddr>
</am4CfgAddrs>
</ifmAm4>
</interface>
</interfaces>

Table 3-62 describes elements in requests.

Table 3-62 Elements

Element Description

ifName Specifies an interface name.

ifmAm4 Specifies IPv4 configurations, including


the configured IPv4 address, IPv4 address
negotiation, and IPv4 address
unnumbered.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 39


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

am4CfgAddrs Specifies an IPv4 address list.

am4CfgAddr Specifies an IPv4 address configuration.

ifIpAddr Specifies an IPv4 address. The value is a


string of 0 to 255 characters in dotted
decimal notation.

subnetMask Specifies the mask of an IPv4 address.


The value is a string of 0 to 255
characters in dotted decimal notation.

addrType Specifies an IPv4 address type. The value


is an enumerated type and case-sensitive:
main: primary IP address.
sub: secondary IP address.
unnumber: borrowed IP address.
The default value is main.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<ok/>
</rpc-reply>

Table 3-63 describes status codes in responses.

Table 3-63 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.7.4.2 Query the IPv4 Address of an Interface


Operation URI Description

GET /ifm/interfaces/interface/ Query the IPv4 address of


ifmAm4 an interface.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 40


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface>
<ifName>10GE1/0/1</ifName>
<ifmAm4/>
</interface>
</interfaces>

Table 3-64 describes elements in requests.

Table 3-64 Elements

Element Description

ifName Specifies an interface name.

ifmAm4 Specifies IPv4 configurations, including the configured IPv4 address,


IPv4 address negotiation, and IPv4 address unnumbered.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface>
<ifName>10GE1/0/1</ifName>
<ifmAm4>
<unNumIfName></unNumIfName>
<addrCfgType>config</addrCfgType>
<am4CfgAddrs>
<am4CfgAddr>
<ifIpAddr>10.137.209.251</ifIpAddr>
<subnetMask>255.255.0.0</subnetMask>
<addrType>main</addrType>
</am4CfgAddr>
</am4CfgAddrs>
</ifmAm4>
</interface>
</interfaces>

Table 3-65 describes elements in responses.

Table 3-65 Elements

Element Description

ifName Specifies an interface name.The value is a string of 1 to 63 characters

ifmAm4 Specifies IPv4 configurations, including the configured IPv4 address,


IPv4 address negotiation, and IPv4 address unnumbered.

unNumIfNa Specifies the name of a numbered interface. The value is a string of 1


me to 63 characters.

addrCfgTyp Specifies the IPv4 address assignment mode. The value is an


e enumerated type and case-sensitive:
config: configured IP address.
negotiation: negotiated IP address.
unnumbered: borrowed IP address.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 41


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

am4CfgAdd Specifies an IPv4 address list.


rs

am4CfgAdd Specifies an IPv4 address configuration.


r

ifIpAddr Specifies an IPv4 address. The value is a string of 0 to 255 characters


in dotted decimal notation.

subnetMask Specifies the mask of an IPv4 address. The value is a string of 0 to 255
characters in dotted decimal notation.

addrType Specifies an IPv4 address type. The value is an enumerated type and
case-sensitive:
main: primary IP address.
sub: secondary IP address.
unnumber: borrowed IP address.
The default value is main.

Table 3-66 describes status codes in responses.

Table 3-66 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.7.4.3 Delete an IPv4 Address from an Interface


Operation URI Description

DELETE /ifm/interfaces/interface/ Delete an IPv4 address from


ifmAm4/am4CfgAddrs an interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interfaces>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 42


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<interface>
<ifName>10GE1/0/1</ifName>
<ifmAm4>
<am4CfgAddrs>
<am4CfgAddr operation="delete">
<ifIpAddr>1.1.1.1</ifIpAddr>
</am4CfgAddr>
</am4CfgAddrs>
</ifmAm4>
</interface>
</interfaces>

Table 3-67 describes elements in requests.

Table 3-67 Elements

Element Description

ifName Specifies an interface name.

ifmAm4 Specifies IPv4 configurations, including


the configured IPv4 address, IPv4 address
negotiation, and IPv4 address
unnumbered.

am4CfgAddrs Specifies an IPv4 address list.

am4CfgAddr Specifies an IPv4 address configuration.

ifIpAddr Specifies an IPv4 address. The value is a


string of 0 to 255 characters in dotted
decimal notation.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<ok/>
</rpc-reply>

Table 3-68 describes status codes in responses.

Table 3-68 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 43


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.7.4.4 Configure an Interface to Borrow the IPv4 Address of Another Interface


Operation URI Description

PUT /ifm/interfaces/interface/ Configure an interface to


ifmAm4 borrow the IPv4 address of
another interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface>
<ifName>Tunnel1</ifName>
<ifmAm4 operation="merge">
<addrCfgType>unnumbered</addrCfgType>
<unNumIfName>10GE1/0/1</unNumIfName>
</ifmAm4>
</interface>
</interfaces>

Table 3-69 describes elements in requests.

Table 3-69 Elements in requests


Element Description

ifName Specifies an interface name. The value is a


string of 1 to 63 characters.

ifmAm4 Specifies the IPv4 address configuration,


including whether to use a configured,
negotiated, or borrowed IPv4 address.

addrCfgType Specifies the type of IPv4 address to be


used. The value is an enumerated type and
case-sensitive.
config: configured IPv4 address
negotiation: negotiated IPv4 address
unnumbered: borrowed IPv4 address

unNumIfName Specifies the name of the interface whose


IPv4 address needs to be borrowed. The
value is a string of 1 to 63 characters.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-70 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 44


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-70 Description of status codes in responses


Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.7.4.5 Query an Interface's IPv4 Address Borrowed from Another Interface


Operation URI Description

GET /ifm/interfaces/interface/ Query an interface's IPv4


ifmAm4 address borrowed from
another interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface>
<ifName>Tunnel1</ifName>
<ifmAm4/>
</interface>
</interfaces>

Table 3-71 describes elements in requests.

Table 3-71 Elements in requests


Element Description

ifName Specifies an interface name.

ifmAm4 Specifies the IPv4 address configuration, including whether to use a


configured, negotiated, or borrowed IPv4 address.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface>
<ifName>Tunnel1</ifName>
<ifmAm4>
<unNumIfName>10GE1/0/1</unNumIfName>
<addrCfgType>unnumbered</addrCfgType>
<am4CfgAddrs>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 45


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<am4CfgAddr>
<ifIpAddr>1.1.1.1</ifIpAddr>
<subnetMask>255.255.254.0</subnetMask>
<addrType>unnumber</addrType>
</am4CfgAddr>
</am4CfgAddrs>
</ifmAm4>
</interface>
</interfaces>

Table 2 describes elements in responses.

Table 3-72 Elements in responses


Element Description

ifName Specifies an interface name. The value is a string of 1 to 63 characters.

ifmAm4 Specifies the IPv4 address configuration, including whether to use a


configured, negotiated, or borrowed IPv4 address.

unNumIfNa Specifies the name of the interface whose IPv4 address is borrowed. The
me value is a string of 1 to 63 characters.

addrCfgTyp Specifies the IPv4 address assignment mode. The value is an enumerated
e type and case-sensitive.
config: configured IPv4 address
negotiation: negotiated IPv4 address
unnumbered: borrowed IPv4 address

am4CfgAdd Specifies an IPv4 address list.


rs

am4CfgAdd Specifies IPv4 address configurations.


r

ifIpAddr Specifies an IPv4 address. The value is a string of 0 to 255 characters, in


dotted decimal notation.

subnetMask Specifies an IPv4 address mask. The value is a string of 0 to 255 characters,
in dotted decimal notation.

addrType Specifies an IPv4 address type. The value is an enumerated type and case-
sensitive.
main: primary IP address
sub: secondary IP address
unnumbered: borrowed IP address
The default value is main.

Table 3 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 46


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-73 Description of status codes in responses


Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.7.4.6 Delete an Interface's IPv4 Address Borrowed from Another Interface


Operation URI Description

PUT /ifm/interfaces/interface/ Delete an interface's IPv4


ifmAm4 address borrowed from
another interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface>
<ifName>Tunnel1</ifName>
<ifmAm4 operation="merge">
<addrCfgType>unnumbered</addrCfgType>
<unNumIfName></unNumIfName>
</ifmAm4>
</interface>
</interfaces>

Table 3-74 describes elements in requests.

Table 3-74 Elements in requests


Element Description

ifName Specifies an interface name. The value is a


string of 1 to 63 characters.

ifmAm4 Specifies the IPv4 address configuration,


including whether to use a configured,
negotiated, or borrowed IPv4 address.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 47


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

addrCfgType Specifies the IPv4 address assignment


mode. The value is an enumerated type and
case-sensitive.
config: configured IPv4 address
negotiation: negotiated IPv4 address
unnumbered: borrowed IPv4 address

unNumIfName Specifies the name of the interface whose


IPv4 address is borrowed. The value is a
string of 1 to 63 characters.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-75 describes status codes in responses.

Table 3-75 Description of status codes in responses


Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.7.5 Interface IPv6 Address

3.7.5.1 Enable IPv6 on an Interface


Operation URI Description

PUT /ifm/interfaces/interface/ Enable IPv6 on an interface.


ifmAm6

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface operation="merge">

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 48


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<ifName>10GE1/0/1</ifName>
<ifmAm6>
<enableFlag>true</enableFlag>
</ifmAm6>
</interface>
</interfaces>

Table 3-76 describes elements in requests.

Table 3-76 Elements


Element Description

ifName Specifies an interface name.

ifmAm6 Specifies IPv6 configurations.

enableFlag Specifies whether IPv6 is enabled on a


control interface.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<ok/>
</rpc-reply>

Table 3-77 describes status codes in responses.

Table 3-77 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.7.5.2 Configure Automatic Link-Local Address Generation for IPv6


Operation URI Description

PUT /ifm/interfaces/interface/ Configure automatic link-


ifmAm6 local address generation for
IPv6.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interfaces>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 49


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<interface operation="merge">
<ifName>10GE1/0/1</ifName>
<ifmAm6>
<autoLinkLocal>true</autoLinkLocal>
</ifmAm6>
</interface>
</interfaces>

Table 3-78 describes elements in requests.

Table 3-78 Elements

Element Description

ifName Specifies an interface name.

ifmAm6 Specifies IPv6 configurations.

autoLinkLocal Specifies whether the automatic link-


local address generation function is
enabled on a control interface.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<ok/>
</rpc-reply>

Table 3-79 describes status codes in responses.

Table 3-79 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.7.5.3 Configure an IPv6 Address for an Interface


Operation URI Description

POST /ifm/interfaces/interface/ Configure an IPv6 address


ifmAm6/am6CfgAddrs for an interface.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 50


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface operation="merge">
<ifName>10GE1/0/1</ifName>
<ifmAm6>
<am6CfgAddrs>
<am6CfgAddr operation="create">
<ifIp6Addr>1:1::1:1</ifIp6Addr>
<addrPrefixLen>64</addrPrefixLen>
<addrType6>global</addrType6>
<ifIDGenType>none</ifIDGenType>
</am6CfgAddr>
</am6CfgAddrs>
</ifmAm6>
</interface>
</interfaces>

Table 3-80 describes elements in requests.

Table 3-80 Elements

Element Description

ifName Specifies an interface name.

ifmAm6 Specifies IPv6 configurations.

am6CfgAddrs Specifies an IPv6 address list.

am6CfgAddr Specifies an IPv6 address configuration.

ifIp6Addr Specifies an IPv6 address.

addrPrefixLen Specifies the length of an IPv6 prefix.

addrType6 Specifies an IPv6 address type.

ifIDGenType Specifies an IPv6 address algorithm.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<ok/>
</rpc-reply>

Table 3-81 describes status codes in responses.

Table 3-81 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 51


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.7.5.4 Query the IPv6 Address of an Interface


Operation URI Description

GET /ifm/interfaces/interface/ Query the IPv6 address of


ifmAm6 an interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface>
<ifName>10GE1/0/1</ifName>
<ifmAm6/>
</interface>
</interfaces>

Table 3-82 describes elements in requests.

Table 3-82 Elements


Element Description

ifName Specifies an interface name.

ifmAm6 Specifies IPv6 configurations.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface>
<ifName>10GE1/0/1</ifName>
<ifmAm6>
<enableFlag>true</enableFlag>
<ifMtu6>1500</ifMtu6>
<autoLinkLocal>true</autoLinkLocal>
<am6CfgAddrs>
<am6CfgAddr>
<ifIp6Addr>100::</ifIp6Addr>
<addrPrefixLen>64</addrPrefixLen>
<addrType6>global</addrType6>
<ifIDGenType>cga</ifIDGenType>
<collisionCount>0</collisionCount>
</am6CfgAddr>
<am6CfgAddr>
<ifIp6Addr>FE80::3ABA:4C00:654:4102</ifIp6Addr>
<addrPrefixLen>10</addrPrefixLen>
<addrType6>linkLocal</addrType6>
<ifIDGenType>none</ifIDGenType>
<collisionCount>0</collisionCount>
</am6CfgAddr>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 52


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

</am6CfgAddrs>
<am6CgaInfos>
<am6CgaInfo>
<rsaKeyLabel>rsa</rsaKeyLabel>
<secLevel>1</secLevel>
<modifier>::</modifier>
</am6CgaInfo>
</am6CgaInfos>
</ifmAm6>
</interface>
</interfaces>

Table 3-83 describes elements in responses.

Table 3-83 Elements


Element Description

ifName Specifies an interface name.

ifmAm6 Specifies IPv6 configurations.

enableFlag Specifies whether IPv6 is enabled on a control interface.

ifMtu6 Specifies the MTU of an IPv6 interface.

autoLinkLo Specifies whether the automatic link-local address generation function


cal is enabled on a control interface.

am6CfgAdd Specifies an IPv6 address list.


rs

am6CfgAdd Specifies an IPv6 address configuration.


r

ifIp6Addr Specifies an IPv6 address.

addrPrefixL Specifies the length of an IPv6 prefix.


en

addrType6 Specifies an IPv6 address type.

ifIDGenTyp Specifies an IPv6 address algorithm.


e

collisionCo Specifies the number of times that IPv6 addresses conflict.


unt

am6CgaInfo Specifies a CGA address container.


s

am6CgaInfo Specifies a CGA address instance.

rsaKeyLabe Specifies an RSA key.


l

secLevel Specifies a security level.

modifier Specifies a CGA address modifier.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 53


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-84 describes status codes in responses.

Table 3-84 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.7.5.5 Delete an IPv6 Address from an Interface


Operation URI Description

DELETE /ifm/interfaces/interface/ Delete an IPv6 address from


ifmAm6/am6CfgAddrs an interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface>
<ifName>10GE1/0/1</ifName>
<ifmAm6>
<am6CfgAddrs>
<am6CfgAddr operation="delete">
<ifIp6Addr>1:1::1:1</ifIp6Addr>
</am6CfgAddr>
</am6CfgAddrs>
</ifmAm6>
</interface>
</interfaces>

Table 3-85 describes elements in requests.

Table 3-85 Elements


Element Description

ifName Specifies an interface name.

ifmAm6 Specifies IPv6 configurations.

am6CfgAddrs Specifies an IPv6 address list.

am6CfgAddr Specifies an IPv6 address configuration.

ifIp6Addr Specifies an IPv6 address.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 54


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<ok/>
</rpc-reply>

Table 3-86 describes status codes in responses.

Table 3-86 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.7.5.6 Configure CGA Attributes for an Interface


Operation URI Description

POST /ifm/interfaces/interface/ Configure CGA attributes


ifmAm6/am6CgaInfos for an interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface>
<ifName>10GE1/0/1</ifName>
<ifmAm6>
<am6CgaInfos>
<am6CgaInfo operation="create">
<rsaKeyLabel>abc</rsaKeyLabel>
<secLevel>0</secLevel>
<modifier>2001:db8::</modifier>
</am6CgaInfo>
</am6CgaInfos>
</ifmAm6>
</interface>
</interfaces>

Table 3-87 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 55


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-87 Elements in requests


Element Description

ifName Specifies an interface name. The value is a string


of 1 to 63 characters.

ifmAm6 Specifies IPv6 configurations.

am6CgaInfos Specifies the CGA address container information.

am6CgaInfo Specifies a CGA address instance.

rsaKeyLabel Specifies an RSA key. The value is a string of 1 to


35 characters.

secLevel Specifies a security level. The value can be 0 or 1.


The default value is 0.

modifier Specifies a corrected value for the CGA address.


The value is a string of 0 to 255 characters. The
value is in the IPv6 address format
(X:X:X:X:X:X:X:X) and has a total number of
128 bits. It is generally divided into 8 groups, each
of which has four hexadecimal digits. The value
can be abbreviated.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-88 describes status codes in responses.

Table 3-88 Description of status codes in responses


Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 56


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.7.5.7 Query the CGA Attributes of an Interface


Operation URI Description

GET /ifm/interfaces/interface/ Query the CGA attributes of


ifmAm6/am6CgaInfos an interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface>
<ifName>10GE1/0/1</ifName>
<ifmAm6>
<am6CgaInfos/>
</ifmAm6>
</interface>
</interfaces>

Table 3-89 describes elements in requests.

Table 3-89 Elements in requests


Element Description

ifName Specifies an interface name.

ifmAm6 Specifies IPv6 configurations.

am6CgaInfos Specifies the CGA address container information.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface>
<ifName>10GE1/0/1</ifName>
<ifmAm6>
<am6CgaInfos>
<am6CgaInfo>
<rsaKeyLabel>abc</rsaKeyLabel>
<secLevel>0</secLevel>
<modifier>2001:db8::</modifier>
</am6CgaInfo>
</am6CgaInfos>
</ifmAm6>
</interface>
</interfaces>

Table 3-90 describes elements in responses.

Table 3-90 Elements in responses


Element Description

ifName Specifies an interface name.

ifmAm6 Specifies IPv6 configurations.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 57


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

am6CgaInfos Specifies the CGA address container information.

am6CgaInfo Specifies a CGA address instance.

rsaKeyLabel Specifies an RSA key. The value is a string of 1 to 35 characters.

secLevel Specifies a security level. The value can be 0 or 1. The default value is 0.

modifier Specifies a corrected value for the CGA address. The value is a string of
0 to 255 characters. The value is in the IPv6 address format
(X:X:X:X:X:X:X:X) and has a total number of 128 bits. It is generally
divided into 8 groups, each of which has four hexadecimal digits. The
value can be abbreviated.

Table 3-91 describes status codes in responses.

Table 3-91 Description of status codes in responses


Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.7.5.8 Delete the CGA Attributes of an Interface


Operation URI Description

DELETE /ifm/interfaces/interface/ Delete the CGA attributes of


ifmAm6/am6CgaInfos an interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?><interfaces>
<interface>
<ifName>10GE1/0/1</ifName>
<ifmAm6>
<am6CgaInfos>
<am6CgaInfo operation="delete">
<rsaKeyLabel>abc</rsaKeyLabel>
<secLevel>0</secLevel>
<modifier>2001:db8::</modifier>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 58


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

</am6CgaInfo>
</am6CgaInfos>
</ifmAm6>
</interface>
</interfaces>

Table 3-92 describes elements in requests.

Table 3-92 Elements in requests


Element Description

ifName Specifies an interface name. The value is a


string of 1 to 63 characters.

ifmAm6 Specifies IPv6 configurations.

am6CgaInfos Specifies the CGA address container


information.

am6CgaInfo Specifies a CGA address instance.

rsaKeyLabel Specifies an RSA key. The value is a string


of 1 to 35 characters.

secLevel Specifies a security level. The value can be


0 or 1. The default value is 0.

modifier Specifies a corrected value for the CGA


address. The value is a string of 0 to 255
characters. The value is in the IPv6 address
format (X:X:X:X:X:X:X:X) and has a total
number of 128 bits. It is generally divided
into 8 groups, each of which has four
hexadecimal digits. The value can be
abbreviated.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 2 describes status codes in responses.

Table 3-93 Description of status codes in responses


Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 59


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.7.6 Trunk Attributes

3.7.6.1 Query a Trunk Interface's Attributes


Operation URI Description

GET /ifmtrunk/TrunkIfs/TrunkIf Query a trunk interface's


attributes.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<TrunkIfs>
<TrunkIf/>
</TrunkIfs>

Table 3-94 describes elements in requests.

Table 3-94 Elements

Element Description

TrunkIf Specifies a trunk interface's attributes.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<TrunkIfs>
<TrunkIf>
<ifName>Eth-Trunk1</ifName>
<minUpNum>1</minUpNum>
<maxUpNum>32</maxUpNum>
<trunkType>EthTrunk</trunkType>
<hashType>IP</hashType>
<workMode>Manual</workMode>
<upMemberIfNum>0</upMemberIfNum>
<memberIfNum>1</memberIfNum>
<maxBandWidth>100000000</maxBandWidth>
<ifMac>38ba-4c54-4102</ifMac>
<lagID>1</lagID>
<TrunkMemberIfs>
<TrunkMemberIf>
<memberIfName>10GE1/0/1</memberIfName>
<lacpPort>27</lacpPort>
<memberIfState>Down</memberIfState>
</TrunkMemberIf>
</TrunkMemberIfs>
</TrunkIf>
</TrunkIfs>

Table 3-95 describes elements in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 60


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-95 Elements


Element Description

ifName Specifies a trunk interface name.

minUpNum Specifies the allowable minimum number of trunk member links that
are in the Up state.

maxUpNum Specifies the maximum number of member links that determine the
bandwidth of a Layer 2 Eth-Trunk interface.

trunkType Specifies the type of a trunk interface, which can be Eth-Trunk or IP-
Trunk.

hashType Specifies a hash algorithm for traffic forwarding.

workMode Specifies a mode in which a trunk interface works.

upMemberI Specifies the number of member interfaces that are in the Up state.
fNum

memberIfN Specifies the number of a trunk interface's member interfaces.


um

maxBandWi Specifies the maximum bandwidth of a trunk interface.


dth

ifMac Specifies the MAC address of a trunk interface. The format of the
MAC address is HH-HH-HH.

lagID Specifies a trunk ID.

TrunkMemb Specifies a trunk interface's member interfaces.


erIfs

Table 3-96 describes status codes in responses.

Table 3-96 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 61


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.7.6.2 Query Trunk Members' Attributes


Operation URI Description

GET /ifmtrunk/TrunkIfs/TrunkIf/ Query trunk members'


TrunkMemberIfs attributes.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<TrunkIfs>
<TrunkIf>
<TrunkMemberIfs/>
</TrunkIf>
</TrunkIfs>

Table 3-97 describes elements in requests.

Table 3-97 Elements

Element Description

TrunkMemb Specifies trunk members' attributes.


erIfs

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<TrunkIfs>
<TrunkIf>
<ifName>Eth-Trunk1</ifName>
<TrunkMemberIfs>
<TrunkMemberIf>
<memberIfName>10GE1/0/1</memberIfName>
<lacpPort>27</lacpPort>
<memberIfState>Down</memberIfState>
</TrunkMemberIf>
</TrunkMemberIfs>
</TrunkIf>
</TrunkIfs>

Table 3-98 describes elements in responses.

Table 3-98 Elements

Element Description

ifName Specifies a trunk interface name.

TrunkMemb Specifies a trunk interface's member interfaces.


erIfs

TrunkMemb Specifies one of the trunk interface's member interfaces.


erIf

memberIfN Specifies the name of a trunk interface's member interface.


ame

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 62


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

lacpPort Specifies an interface LACP priority.

memberIfSt Specifies the status of the trunk interface's member interface.


ate

Table 3-99 describes status codes in responses.

Table 3-99 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.7.6.3 Create a Trunk Interface


Operation URI Description

POST /ifmtrunk/TrunkIfs Create a trunk interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<TrunkIfs>
<TrunkIf operation="create">
<ifName>Eth-Trunk1</ifName>
</TrunkIf>
</TrunkIfs>

Table 3-100 describes elements in requests.

Table 3-100 Elements in requests


Element Description

TrunkIfs Specifies a trunk interface list.

TrunkIf Specifies the trunk interface information.

ifName Specifies a trunk interface name. The value


is a string of 1 to 63 characters.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 63


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-101 describes status codes in responses.

Table 3-101 Description of status codes in responses


Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.7.6.4 Delete a Trunk Interface


Operation URI Description

DELETE /ifmtrunk/TrunkIfs Delete a trunk interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<TrunkIfs>
<TrunkIf operation="delete">
<ifName>Eth-Trunk1</ifName>
</TrunkIf>
</TrunkIfs>

Table 3-102 describes elements in requests.

Table 3-102 Elements in requests


Element Description

TrunkIfs Specifies a trunk interface list.

TrunkIf Specifies the trunk interface information.

ifName Specifies a trunk interface name. The value


is a string of 1 to 63 characters.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 64


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-103 describes status codes in responses.

Table 3-103 Description of status codes in responses


Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.7.6.5 Configure Trunk Interface Attributes


Operation URI Description

PUT /ifmtrunk/TrunkIfs Configure trunk interface


attributes.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<TrunkIfs>
<TrunkIf operation="merge">
<ifName>Eth-Trunk1</ifName>
<minUpNum>1</minUpNum>
<maxUpNum>32</maxUpNum>
<workMode>Manual</workMode>
</TrunkIf>
</TrunkIfs>

Table 3-104 describes elements in requests.

Table 3-104 Elements in requests


Element Description

TrunkIfs Specifies a trunk interface list.

TrunkIf Specifies the trunk interface information.

ifName Specifies a trunk interface name. The value is a


string of 1 to 63 characters.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 65


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

minUpNum Specifies the minimum number of trunk links in


the Up state.
The value is an integer. The default value is 1. The
value range is determined by the number of LAGs
that can be manually configured.
The value ranges from 1 to 64 if a maximum of
256 LAGs can be configured.
The value ranges from 1 to 32 if a maximum of
512 LAGs can be configured.
The value ranges from 1 to 16 if a maximum of
1024 LAGs can be configured.

maxUpNum Specifies the maximum number of links that affect


the actual bandwidth of the Layer 2 Eth-Trunk
interface.
The value is an integer. The value range is
determined by the number of LAGs that can be
manually configured.
If a maximum of 256 LAGs can be configured, the
value ranges from 1 to 64, and the default value is
64.
If a maximum of 512 LAGs can be configured, the
value ranges from 1 to 32, and the default value is
32.
If a maximum of 1024 LAGs can be configured,
the value ranges from 1 to 16, and the default
value is 16.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 66


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

hashType Specifies a hash algorithm for the traffic


forwarding table. The value is an enumerated type
and case-sensitive.
IP: Data flows are differentiated based on IP
addresses of packets to ensure that the packets of
the same data flow are transmitted over the same
member link.
MAC: Data flows are differentiated based on
MAC addresses of packets to ensure that the
packets of the same data flow are transmitted over
the same member link.
Enhanced: enhanced template-based load
balancing mode.
Desip: The system obtains the specified three bits
from each of the destination IP address and the
outbound TCP/UDP port number to perform the
exclusive OR calculation, and then selects the
outbound interface from the Eth-Trunk table
according to the calculation result.
Desmac: The system obtains the specified three
bits from each of the destination MAC address,
VLAN ID, Ethernet type, and inbound interface
information to perform the exclusive OR
calculation, and then selects the outbound
interface from the Eth-Trunk table according to
the calculation result.
Sourceip: The system obtains the specified three
bits from each of the source IP address and the
inbound TCP/UDP port number to perform the
exclusive OR calculation, and then selects the
outbound interface from the Eth-Trunk table
according to the calculation result.
Sourcemac: The system obtains the specified three
bits from each of the source MAC address, VLAN
ID, Ethernet type, and inbound interface
information to perform the exclusive OR
calculation, and then selects the outbound
interface from the Eth-Trunk table according to
the calculation result.
The default value is IP.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 67


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

workMode Specifies a trunk interface working mode. The


value is an enumerated type and case-sensitive.
Manual: Manual load balancing mode is a basic
link aggregation mode. In this mode, trunk
establishment, member interface addition, and
active interfaces are manually configured, without
the participation of LACP.
Dynamic: In dynamic LACP mode, if an Eth-
Trunk interface in dynamic LACP mode is
configured only on one of two connected devices
and the directly connected physical interfaces are
both Up, LACP will set Eth-Trunk member
interfaces to Indep, indicating the physical
interfaces of the two devices are independent. The
physical interfaces of the device where dynamic
LACP is configured can send data to the other
device.
Static: In static LACP mode, Eth-Trunk
establishment and member interface addition are
manually configured. Different from link
aggregation in manual load balancing mode,
active member interfaces are selected by sending
LACPDUs in static LACP mode.
The default value is Manual.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-105 describes status codes in responses.

Table 3-105 Description of status codes in responses


Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 68


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.7.6.6 Add an Interface to a Trunk Interface


Operation URI Description

POST /ifmtrunk/TrunkIfs/TrunkIf/ Add an interface to a trunk


TrunkMemberIfs interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<TrunkIfs>
<TrunkIf>
<ifName>Eth-Trunk1</ifName>
<TrunkMemberIfs>
<TrunkMemberIf operation="create">
<memberIfName>10GE1/0/1</memberIfName>
</TrunkMemberIf>
</TrunkMemberIfs>
</TrunkIf>
</TrunkIfs>

Table 1 describes elements in requests.

Table 3-106 Elements in requests

Element Description

TrunkIfs Specifies a trunk interface list.

TrunkIf Specifies the trunk interface information.

ifName Specifies a trunk interface name. The value


is a string of 1 to 63 characters.

TrunkMemberIfs Specifies a trunk member interface list.

TrunkMemberIf Specifies a trunk member interface.

memberIfName Specifies the name of an interface to be


added to the trunk interface. The value is a
string of 1 to 63 characters.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 2 describes status codes in responses.

Table 3-107 Description of status codes in responses

Status Code Description

200 OK The operation succeeds.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 69


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request cannot be implemented because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.7.6.7 Delete an Interface from a Trunk Interface


Operation URI Description

DELETE /ifmtrunk/TrunkIfs/TrunkIf/ Delete an interface from a


TrunkMemberIfs trunk interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<TrunkIfs>
<TrunkIf>
<ifName>Eth-Trunk1</ifName>
<TrunkMemberIfs>
<TrunkMemberIf operation="delete">
<memberIfName>10GE1/0/1</memberIfName>
</TrunkMemberIf>
</TrunkMemberIfs>
</TrunkIf>
</TrunkIfs>

Table 1 describes elements in requests.

Table 3-108 Elements in requests


Element Description

TrunkIfs Specifies a trunk interface list.

TrunkIf Specifies the trunk interface information.

ifName Specifies a trunk interface name. The value


is a string of 1 to 63 characters.

TrunkMemberIfs Specifies a trunk member interface list.

TrunkMemberIf Specifies a trunk member interface.

memberIfName Specifies the name of an Eth-Trunk member


interface. The value is a string of 1 to 63
characters.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 70


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 2 describes status codes in responses.

Table 3-109 Description of status codes in responses


Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.7.6.8 Configuring the LACP Attribute of a Trunk Interface

Operation URI Description

PUT /ifmtrunk/TrunkIfs/TrunkIf/ Configure the LACP


lacpTrunk attribute of a trunk interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<TrunkIfs>
<TrunkIf operation="merge">
<ifName>Eth-Trunk1</ifName>
<lacpTrunk>
<rcvTimeoutType>Fast</rcvTimeoutType>
</lacpTrunk>
</TrunkIf>
</TrunkIfs>

Table 3-110 describes elements in a request.

Table 3-110 Elements


Element Description

TrunkIfs Indicates a trunk interface list.

TrunkIf Indicates trunk interface information.

ifName Specifies the name of a trunk interface. The


value is a string of 1 to 63 characters.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 71


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

rcvTimeoutType Specifies the timeout period of an LACP


protocol packet. Fast indicates the short period,
while Slow indicates the long period. The
default value is Slow.
The value is an enumerated type and case-
sensitive. The value can be:
l Slow: The timeout for receiving a packet is
90 seconds, and the peer sends LACP
packets every 30 seconds. The response is
slow, but few resources are consumed.
l Fast: The timeout period for receiving a
packet is 3 seconds by default, and the peer
sends LACP packets every second. The
response is fast, but many resources are
consumed.
The default value is Slow.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-111 describes status codes in a response.

Table 3-111 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.7.6.9 Querying the LACP Attribute of a Trunk Interface


Operation URI Description

GET /ifmtrunk/TrunkIfs/TrunkIf/ Query the LACP attribute of


lacpTrunk a trunk interface.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 72


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<TrunkIfs>
<TrunkIf>
<ifName>Eth-Trunk10</ifName>
<lacpTrunk>
<rcvTimeoutType></rcvTimeoutType>
</lacpTrunk>
</TrunkIf>
</TrunkIfs>

Table 3-112 describes elements in a request.

Table 3-112 Elements

Element Description

rcvTimeoutType Specifies the timeout period of an LACP


protocol packet. Fast indicates the short
period, while Slow indicates the long
period. The default value is Slow.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<TrunkIfs>
<TrunkIf>
<ifName>Eth-Trunk10</ifName>
<lacpTrunk>
<rcvTimeoutType>Fast</rcvTimeoutType>
</lacpTrunk>
</TrunkIf>
</TrunkIfs>

Table 3-113 shows elements in responses.

Table 3-113 Description of elements in response

Element Description

ifName Specifies the name of a trunk interface.

rcvTimeoutType Specifies the timeout period of an LACP


protocol packet. Fast indicates the short
period, while Slow indicates the long
period. The default value is Slow.

Table 3-114 describes status codes in a response.

Table 3-114 Status codes

Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 73


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.7.7 Configure an Interface Description


Operation URI Description

PUT /ifm/interfaces/interface/ Configure a description for


ifDescr an interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interfaces>
<interface operation="merge">
<ifName>10GE1/0/1</ifName>
<ifDescr>manager interface</ifDescr>
</interface>
</interfaces>

Table 3-115 describes elements in requests.

Table 3-115 Elements


Element Description

ifName Specifies an interface name.

ifDescr Specifies an interface description.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<ok/>
</rpc-reply>

Table 3-116 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 74


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-116 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.7.8 Isolate Interfaces


Operation URI Description

POST /ethernet/ethernetIfs/ Isolate a certain interface in


ethernetIf an interface group.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<ethernetIf>
<ifName>10GE1/0/1</ifName>
<l2Attribute>
<portIsolateGroups>
<portIsolateGroup>
<GroupId>1</GroupId>
</portIsolateGroup>
</portIsolateGroups>
</l2Attribute>
</ethernetIf>

Table 3-117 describes elements in requests.

Table 3-117 Elements


Element Description

ifName Specifies an interface name.

l2Attribute Specifies the Layer 2 attribute of an


interface.

portIsolateGroup Specifies the group where the interface to


be isolated resides.

GroupId Specifies the index of an interface group.

l Response example (XML format)

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 75


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<?xml version="1.0" encoding="UTF-8"?>


<ok/>

Table 3-118 describes status codes in responses.

Table 3-118 Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.8 File Management

3.8.1 Configuration Management

System Startup Information


Operation URI Description

GET /cfg/startupInfos/startupInfo Obtain system startup


information.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<startupInfo>
</startupInfo>

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<startupInfo>
<position></position>
<nextStartupFile>NULL</nextStartupFile>
<configedSysSoft>cfcard:/VRPV8.cc</configedSysSoft>
<curSysSoft>cfcard:/VRPV8.cc</curSysSoft>
<nextSysSoft>cfcard:/VRPV8.cc</nextSysSoft>
<curStartupFile>NULL</curStartupFile>
<curPatchFile>NULL</curPatchFile>
<nextPatchFile>NULL</nextPatchFile>
</startupInfo>

Table 1 describes elements in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 76


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-119 Elements

Element Description

nextStartupFile Specifies the name of the configuration


file for next startup.

configedSysSoft Specifies the configured software


package.

curSysSoft Specifies the name of the current


software package.

nextSysSoft Specifies the name of the software


package for next startup.

curStartupFile Specifies the name of the current


configuration file.

curPatchFile Specifies the name of the current patch


package.

nextPatchFile Specifies the name of the patch package


for next startup.

Table 2 describes status codes in responses.

Table 3-120 Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Configuration File for Next Startup


Operation URI Description

POST /cfg/setStartup Specify the configuration


file for next startup.

POST /cfg/deleteStartup Delete the configuration file


for next startup.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 77


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Operation URI Description

POST /cfg/deleteStartup Delete the configuration file


for next startup.

POST /cfg/clearStartup Cancels the configuration


for the next file startup.
After this parameter is
specified, the system clears
the current and next file
startup configurations.

1. Specify the configuration file for next startup.


– Request example
<?xml version="1.0" encoding="UTF-8"?>
<setStartup>
<fileName>cfcard:/vrpcfg.cfg</fileName>
</setStartup>

Table 3 describes elements in requests.

Table 3-121 Elements

Element Description

fileName Specifies the name of the configuration


file for next startup. This parameter is
mandatory.

– Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 4 describes status codes in responses.

Table 3-122 Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or
unidentified processing errors.

2. Delete the configuration file for next startup.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 78


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

– Request example
<?xml version="1.0" encoding="UTF-8"?>
<deleteStartup>
</deleteStartup>

– Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 5 describes status codes in responses.

Table 3-123 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or
unidentified processing errors.

1. Delete the configuration file for next startup.


– Request example
<?xml version="1.0" encoding="UTF-8"?>
<deleteStartup>
</deleteStartup>

– Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 6 describes status codes in responses.

Table 3-124 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or
unidentified processing errors.

2. Clears the next file startup configuration.


– Request example

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 79


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<?xml version="1.0" encoding="UTF-8"?>


<clearStartup>
</clearStartup>

– Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 7 describes status codes in responses.

Table 3-125 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or
unidentified processing errors.

3.8.2 Upgrade Management

Startup Software Package


Operation URI Description

POST /sum/startupbymode Specify the upgrade


software package by mode.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<startupbymode>
<softwareName>cfcard:/VRPV8.cc</softwareName>
<mode>STARTUP_MODE_ALL</mode>
</startupbymode>

Table 3-126 describes elements in requests.

Table 3-126 Elements


Element Description

softwareName Specifies the name of the software


package for next startup. This parameter
is mandatory.

mode Specifies the startup mode.


STARTUP_MODE_ALL means to take
effect for all boards.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 80


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-127 describes status codes in responses.

Table 3-127 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.8.3 Patch Management


Patch Package for Next Startup
Operation URI Description

POST /patch/startup Specify the patch package


for next startup.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<startup>
<packageName>cfcard:/1.pat</packageName>
</startup>

Table 3-128 describes elements in requests.

Table 3-128 Elements


Element Description

packageName Specifies the name of the patch package


for next startup. This element is
mandatory.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 81


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-129 describes status codes in responses.

Table 3-129 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

l Failure example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<rpc-error>
<error-type>application</error-type>
<error-tag>operation-failed</error-tag>
<error-severity>error</error-severity>
<error-app-tag>1131</error-app-tag>
<error-message>The patch format is incorrect.</error-message>
<error-info>
<error-paras>
<error-para>patch</error-para>
<error-para>patch</error-para>
</error-paras>
</error-info>
</rpc-error>
</rpc-reply>

Delete the Patch Package


Operation URI Description

POST /patch/resetpatch Delete the patch package.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<resetpatch>
</resetpatch>

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-130 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 82


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-130 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.8.4 File System


l Display the Working Directory
l Display File or Directory Information
l Obtain Disk Usage Information
l Copy Files
l Delete Files
l Compress Files
l Decompress Files

Display the Working Directory


Operation URI Description

GET /vfm/pwds/pwd Display the current working


directory.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<pwd>
<dictionaryName/>
</pwd>

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<pwd>
<dictionaryName>cfcard:/</dictionaryName>
</pwd>

Table 3-131 describes elements in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 83


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-131 Elements

Element Description

dictionaryName Specifies the current working directory of


a user.

Table 3-132 describes status codes in responses.

Table 3-132 Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Display File or Directory Information


Operation URI Description

GET /vfm/dirs/dir Obtain information about


the specified file or
directory.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<dir>
<dirName>cfcard:/</dirName>
<fileName>VRPV8.cc</fileName>
</dir>

Table 3-133 describes elements in requests.

Table 3-133 Elements

Element Description

dirName Specifies the directory where the file or


directory to be displayed resides. This
parameter is optional. If you do not
specify this parameter, the current
directory is used by default.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 84


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

fileName Specifies the name of the file or directory


to be displayed. This element is
mandatory.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<dir>
<fileName>VRPV8.cc</fileName>
<Attr>-rwx</Attr>
<DirSize>183,329,667</DirSize>
<modifyDatetime>2013-08-17T21:03:22</modifyDatetime>
</dir>

Table 3-134 describes elements in responses.

Table 3-134 Elements


Element Description

fileName Specifies the name of a file or directory.

Attr Specifies the file or directory permission.

DirSize Specifies the file or directory size.

modifyDatetime Specifies the time when the file or


directory is modified.

Table 3-135 describes status codes in responses.

Table 3-135 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 85


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Obtain Disk Usage Information


Operation URI Description

GET /vfm/dfs Obtain disk usage


information.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<dfs>
<df>
<fileSys>flash</fileSys>
<inputPath>flash</inputPath>
</df>
</dfs>

Table 3-136 describes elements in requests.

Table 3-136 Elements


Element Description

fileSys Specifies the name of a file system.

inputPath Specifies the path of a file system.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<dfs>
<df>
<fileSys>lash</fileSys>
<inputPath>flash</inputPath>
<totalSize>291991552</totalSize>
<freeSize>86472156</freeSize>
<usedPer>70</usedPer>
</df>
<dfs>

Table 3-137 describes elements in responses.

Table 3-137 Elements in responses


Element Description

fileSys Specifies the name of a file system.

inputPath Specifies the path of a file system.

totalSize Specifies the size of a file system, in KB.

freeSize Specifies the available space of a file


system, in KB.

usedPer Specifies the utilization of a file system,


in %.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 86


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-138 describes status codes in responses.

Table 3-138 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Copy Files
Operation URI Description

POST /vfm/copyFile Copy files.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<copyFile>
<srcFileName>flash:/VRPV8.cc</srcFileName>
<desFileName>slave#flash:/VRPV8.cc</desFileName>
</copyFile>

Table 3-139 describes elements in requests.

Table 3-139 Elements


Element Description

srcFileName Specifies the name of the source file. This


element is mandatory.

desFileName Specifies the name of the destination file.


This element is mandatory.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-140 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 87


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-140 Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Delete Files
Operation URI Description

POST /vfm/deleteFileUnRes Permanently deletes a file.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<deleteFileUnRes>
<fileName>slave#cfcard:/VRPV8.cc</fileName>
</deleteFileUnRes>

Table 3-141 describes elements in requests.

Table 3-141 Elements

Element Description

fileName Specifies the name of the file to be


deleted. This element is mandatory.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-142 describes status codes in responses.

Table 3-142 Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 88


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Compress Files
Operation URI Description

POST /vfm/zipFile Compress files.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<zipFile>
<srcFileName>src.txt</srcFileName>
<desFileName>des.zip</desFileName>
<password>123456789a</password>
<overwriteType>yes</overwriteType>
</zipFile>

Table 3-143 describes elements in requests.

Table 3-143 Elements


Element Description

srcFileName Specifies the name of the source file to be


decompressed. The value can be a full
path or a relative path.

desFileName Specifies the name of the destination file


after decompression. The value can be a
full path or a relative path.

password Specifies the password for decompression


authentication. The value contains letters,
digits, and special characters and does not
support Chinese characters.

overwriteType Indicates whether to overwrite the file


with the same name as the destination
file.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-144 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 89


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-144 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request cannot be implemented


because the request is incorrect in syntax
or the information attribute in the request
is incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

Decompress Files
Operation URI Description

POST /vfm/unzipFile Decompress Files.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<unzipFile>
<srcFileName>src.zip</srcFileName>
<desFileName>des.txt</desFileName>
<password>123456789a</password>
<overwriteType>yes</overwriteType>
</unzipFile>

Table 3-145 describes status codes in responses.

Table 3-145 Elements


Element Description

srcFileName Specifies the name of the source file to be


decompressed. The value can be a full
path or a relative path.

desFileName Specifies the name of the destination file


after decompression. The value can be a
full path or a relative path.

password Specifies the password for decompression


authentication. The value contains letters,
digits, and special characters and does not
support Chinese characters.

overwriteType Indicates whether to overwrite the file


with the same name as the destination
file.

l Response example (XML format)

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 90


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<?xml version="1.0" encoding="UTF-8"?>


<ok/>

Table 3-146 describes status codes in responses.

Table 3-146 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request cannot be implemented


because the request is incorrect in syntax
or the information attribute in the request
is incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.9 Channel Management

3.9.1 FTP Client

Transfer Files Through FTP


Operation URI Description

POST /ftpc/ftpcTransferFiles/ Transfer files through FTP.


ftpcTransferFile

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<ftpcTransferFile>
<serverIpv4Address>10.0.0.1</serverIpv4Address>
<commandType>get</commandType>
<userName>username</userName>
<password>password</password>
<localFileName>cfcard:/VRPV8.cc</localFileName>
<remoteFileName>image/VRPV8.cc</remoteFileName>
</ftpcTransferFile>

Table 3-147 describes elements in requests

Table 3-147 Elements


Element Description

serverIpv4Address Specifies the IPv4 address of the file server.


This element is mandatory.

commandType Specifies the file transfer operation, such as


Get or Put. This element is mandatory.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 91


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

userName Specifies the user name of the file server.

password Specifies the user password of the file


server.

localFileName Specifies the name of the local file.

remoteFileName Specifies the name of the remote file.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-148 describes status codes in responses.

Table 3-148 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

FTP file Transmission Directory

Operation URI Description

GET /ftpc/ftpcDirs/ftpcDir Display the FTP file


transmission directory.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<ftpcDir>
<serverIpv4Address>10.0.0.1</serverIpv4Address>
<userName>root</userName>
<password>password</password>
<dirName>/opt/</dirName>
<dirInfo></dirInfo>
</ftpcDir>

Table 3-149 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 92


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-149 Elements


Element Description

serverIpv4Address Specifies the IPv4 address of the file server.

serverPort Specifies the server port on which the dir


command is run.

sourceIpv4Address Specifies the IPv4 address of the file client.

userName Specifies the user name of the file server.


This element is mandatory.

password Specifies the user password of the file


server. This element is mandatory.

vpnInstanceName Specifies the name of a VPN used to connect


to the server.

sourceInterfaceName Specifies the name of a source interface used


to display the directory content.

dirName Specifies the name of a directory.

dirInfo Displays the content of a directory.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?> <ftpcDir>
<serverIpv4Address>189.58.144.58</serverIpv4Address>
<userName>root</userName>
<password></password>
<dirName>/opt/</dirName>
<dirInfo>/opt/VRPV800R012C00B297.rpg</dirInfo>
</ftpcDir>

Table 3-150 describes status codes in responses.

Table 3-150 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request cannot be implemented because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 93


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.9.2 TFTP Client

Transfer Files Through TFTP


Operation URI Description

POST /tftpc/tftpcTransferFiles/ Transfer files through TFTP.


tftpcTransferFile

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<tftpcTransferFile>
<serverIpv4Address>10.0.0.1</serverIpv4Address>
<commandType>get_cmd</commandType>
<localFileName>cfcard:/vrpcfg.cfg</localFileName>
<remoteFileName>config/vrpcfg.cfg</remoteFileName>
</tftpcTransferFile>

Table 3-151 describes elements in requests.

Table 3-151 Elements

Element Description

serverIpv4Address Specifies the IPv4 address of the file server.


This element is mandatory.

commandType Specifies the file transfer operation, such as


get_cmd. This element is mandatory.

localFileName Specifies the name of the local file.

remoteFileName Specifies the name of the remote file.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-152 describes status codes in responses.

Table 3-152 Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 94


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.9.3 SSH Client

Global Attributes
Operation URI Description

PUT /sshc/sshClient Configure first-time


authentication for an SSH
client.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<sshClient>
<firstTimeEnable>Enable</firstTimeEnable>
</sshClient>

Table 3-153 describes elements in requests.

Table 3-153 Elements

Element Description

firstTimeEnable Enables or disables first-time


authentication for the SSH client. This
element is mandatory.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-154 describes status codes in responses.

Table 3-154 Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 95


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Configure the SSH Server and Key


Operation URI Description

DELETE /sshc/sshCliKeyCfgs/ Delete the SSH server


sshCliKeyCfg address and RSA key.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<sshCliKeyCfg>
<serverName>10.0.0.1</serverName>
<pubKeyType>RSA</pubKeyType>
</sshCliKeyCfg>

Table 3-155 describes elements in requests.

Table 3-155 Elements


Element Description

serverName Delete the SSH server address and RSA


key.

pubKeyType Specifies the public key type. This


element is mandatory.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-156 describes status codes in responses.

Table 3-156 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 96


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

SSH Connection
Operation URI Description

POST /sshc/sshcConnects/ Create an SSH connection


sshcConnect for purposes such as SFTP
file transfer.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<sshcConnect>
<HostAddrIPv4>10.0.0.1</HostAddrIPv4>
<commandType>get</commandType>
<userName>username</userName>
<password>password</password>
<localFileName>cfcard:/VRPV8.cc</localFileName>
<remoteFileName>image/VRPV8.cc</remoteFileName>
<identityKey>ssh-rsa</identityKey>
<transferType>SFTP</transferType>
</sshcConnect>

Table 3-157 describes elements in requests.

Table 3-157 Elements

Element Description

HostAddrIPv4 Specifies the IPv4 address of the SSH


server. This element is mandatory.

commandType Specifies the file transfer operation, such


as Get or Put. This element is mandatory.

userName Specifies the user name. This element is


mandatory.

password Specifies the user password. This element


is mandatory.

localFileName Specifies the local file name. This


element is mandatory.

remoteFileName Specifies the remote file name. This


element is mandatory.

identityKey Specifies the local key type of the SSH


connection. This element is mandatory.

transferType Specifies the file transfer type. This


element is mandatory.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-158 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 97


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-158 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Query the SFTP Asynchronous Transfer Status


Operation URI Description

GET /sshc/sftpProQuerys/ Query the SFTP


sftpProQuery asynchronous transfer
status.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<sftpProQuery>
<serverPort>22</serverPort>
<commandType>get</commandType>
<localFileName>ccc</localFileName>
<remoteFileName>aaa</remoteFileName>
<userName>client001</userName>
</sftpProQuery>

Table 3-159 describes elements in requests.

Table 3-159 Elements


Elements Description

serverPort Specifies the port number of the SSH


server. This element is mandatory.

commandType Specifies a file transfer operation, such as


GET or PUT. This element is mandatory.

userName Specifies a user name. This element is


mandatory.

localFileName Specifies the name of a local file. This


element is mandatory.

remoteFileName Specifies the name of a remote file. This


element is mandatory.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 98


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<data/>

Table 3-160 describes status codes in responses.

Table 3-160 Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request cannot be implemented


because the request is incorrect in syntax
or the information attribute in the request
is incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.9.4 RSA

Peer Key
Operation URI Description

DELETE /rsa/rsaPeerKeys/ Delete the specified peer


rsaPeerKey RSA key.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<rsaPeerKey>
<keyName>10.0.0.1</keyName>
</rsaPeerKey>

Table 3-161 describes elements in requests.

Table 3-161 Elements

Element Description

keyName Specifies the name of the peer RSA key.


This element is mandatory.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-162 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 99


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-162 Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.10 Information Management


Operation URI Description

POST /syslog/syslogServers Managing a log server.

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<syslogServers>
<syslogServer>
<ipType>ipv4</ipType>
<serverIp>10.135.35.122</serverIp>
<isDefaultVpn>true</isDefaultVpn>
<vrfName>_public_</vrfName>
<level>alert</level>
<serverPort>514</serverPort>
<facility>local1</facility>
<chnlId>3</chnlId>
<timestamp>localtime</timestamp>
<transportMode>udp</transportMode>
<sslPolicyName></sslPolicyName>
<sourceIP></sourceIP>
</syslogServer>
</syslogServers>

Table 3-163 describes elements in a request.

Table 3-163 Description of elements in a request

Element Description

ipType IPv4 or IPv6 address of a log server


(mandatory)

serverIp Host address

isDefaultVpn Whether the default VPN is used

vrfName VPN name

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 100


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

level Level of a log reported

serverPort Destination port to which a log is


reported

facility Destination port to which a log is


reported

chnlId Channel ID

timestamp Timestamp type, which can be UTC or


LMT

transportMode Transport protocol type

sslPolicyName SSL policy name

sourceIP Source IP address

l Response example (XML format):


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<ok/>
</rpc-reply>

Table 3-164 describes status codes in a response.

Table 3-164 Description of status codes in a response

Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented


because the request is incorrect in syntax
or the information attribute in the request
is incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.10.1 Create a Syslog Server

Create a Syslog Server


Operation URI Description

POST /syslog/syslogServers/ Create a syslog server.


syslogServer

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 101


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<syslogServer>
<ipType>ipv4</ipType>
<serverIp>10.135.35.122</serverIp>
<isDefaultVpn>true</isDefaultVpn>
<vrfName>_public_</vrfName>
<level>alert</level>
<serverPort>514</serverPort>
<facility>local1</facility>
<chnlId>3</chnlId>
<timestamp>localtime</timestamp>
<transportMode>udp</transportMode>
<sslPolicyName></sslPolicyName>
<sourceIP></sourceIP>
</syslogServer>

Table 3-165 describes elements in requests.

Table 3-165 Elements


Element Description

ipType (Mandatory) Specifies whether the IP


address of a log server is an IPv4 or IPv6
address.

serverIp Specifies a host address.

isDefaultVpn Specifies whether to use the default VPN


identifier.

vrfName Specifies a VPN name.

level Specifies the level of a log to be reported.

serverPort Specifies a destination port.

facility Specifies a log recording tool.

chnlId Specifies a channel ID.

timestamp Specifies a timestamp type: UTC or


LMT.

transportMode Specifies a transport protocol type.

sslPolicyName Specifies the name of an SSL policy.

sourceIP Specifies a source IP address.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<ok/>
</rpc-reply>

Table 3-166 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 102


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-166 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.10.2 Delete a Syslog Server

Delete a Syslog Server


Operation URI Description

DELETE /syslog/syslogServers/ Delete a syslog server.


syslogServer

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<syslogServer>
<ipType>ipv4</ipType>
<serverIp>10.135.35.122</serverIp>
<isDefaultVpn>true</isDefaultVpn>
<vrfName>_public_</vrfName>
</syslogServer>

Table 3-167 describes elements in requests.

Table 3-167 Elements

Element Description

ipType (Mandatory) Specifies whether the IP


address of a log server is an IPv4 or IPv6
address.

serverIp Specifies a host address.

isDefaultVpn Specifies whether to use the default VPN


identifier.

vrfName Specifies a VPN name.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 103


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<ok/>
</rpc-reply>

Table 3-168 describes status codes in responses.

Table 3-168 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.10.3 Trigger System Logs


Operation URI Description

POST /syslog/writeLog Trigger system logs.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<writeLog>
<infoID>135663716</infoID>
<paraNum>2</paraNum>
<paraDescription>para1=a.PAT,para2=Test</paraDescription>
</writeLog>

Table 3-169 Elements in requests


Element Description

infoID Specifies a system log ID.

paraNum Specifies the number of log parameters.

paraDescripti Specifies the description of log parameter values.


on

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 104


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<ok/>
</rpc-reply>

Table 3-170 describes status codes in responses.

Table 3-170 Description of status codes in responses


Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented because the request is
incorrect in syntax or the information attribute in the request is
incorrect.

500 Internal Server Internal errors in services cause a request failure or an unidentified
Error request.

3.11 SSH

3.11.1 SSH Client Management

3.11.1.1 Configure an SSH client


Operation URI Description

PUT /sshc/sshClient Configure an SSH client.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<sshClient>
<keepAliveTime>3</keepAliveTime>
<keepAliveCount>3</keepAliveCount>
<firstTimeEnable>Enable</firstTimeEnable>
<SrcIpv4Addr>1.1.1.1</SrcIpv4Addr>
<scpSrcIpv4Addr>1.1.1.1</scpSrcIpv4Addr>
</sshClient>

Table 3-171 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 105


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-171 Elements


Element Description

keepAliveTi Specifies an interval at which the client sends Keepalive packets to the
me server.
The default value is 0s, indicating that the client does not send any
Keepalive packet to the server.
If a client does not receive any response packet from the server within
a specified interval, the client sends a new Keepalive packet to the
server. If the server still does not respond, the client disconnects from
the server.

keepAliveC Specifies the maximum number of Keepalive packets that a client can
ount send to the server.
The default value is 3, indicating that a client can send a maximum of
three Keepalive packets to the server before disconnection.

firstTimeEn Enables or disables first-time authentication for the SSH client. If this
able function is enabled, the system automatically allocates the RSA, DSA,
or ECC public key after the first-time login and stores the key for later
logins.

SrcInterface Specifies a loopback interface of the local router. An SFTP client uses
this interface as the local interface.

SrcIpv4Add Specifies the source address of the local router. An SFTP client uses
r this address as the local address.

vpnInstance Specifies the name of the VPN instance to which the SFTP client
Name belongs.

scpSrcInterf Specifies a loopback interface of the local router. An SCP client uses
ace this interface as the local interface.

scpSrcIpv4 Specifies the loopback address of the local router.


Addr

scpVpnInsta Specifies the name of the VPN instance to which the SCP server
nceName belongs.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-172 describes status codes in responses.

Table 3-172 Status codes in responses


Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 106


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.11.1.2 Query SSH Client Information


Operation URI Description

GET /sshc/sshClient Query SSH client


information.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<sshClient>
<keepAliveTime/>
<keepAliveCount/>
<firstTimeEnable/>
<SrcInterface/>
<SrcIpv4Addr/>
<vpnInstanceName/>
<scpSrcInterface/>
<scpSrcIpv4Addr/>
<scpVpnInstanceName/>
</sshClient>

Table 3-173 describes elements in requests.

Table 3-173 Elements


Element Description

keepAliveTime Specifies an interval at which the client


sends Keepalive packets to the server.
The default value is 0s, indicating that the
client does not send any Keepalive packet
to the server.
If a client does not receive any response
packet from the server within a specified
interval, the client sends a new Keepalive
packet to the server. If the server still
does not respond, the client disconnects
from the server.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 107


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

keepAliveCount Specifies the maximum number of


Keepalive packets that a client can send
to the server.
The default value is 3, indicating that a
client can send a maximum of three
Keepalive packets to the server before
disconnection.

firstTimeEnable Enables or disables first-time


authentication for the SSH client. If this
function is enabled, the system
automatically allocates the RSA, DSA, or
ECC public key after the first-time login
and stores the key for later logins.

SrcInterface Specifies a loopback interface of the local


router. An SFTP client uses this interface
as the local interface.

SrcIpv4Addr Specifies the source address of the local


router. An SFTP client uses this address
as the local address.

vpnInstanceName Specifies the name of the VPN instance


to which the SFTP client belongs.

scpSrcInterface Specifies a loopback interface of the local


router. An SCP client uses this interface
as the local interface.

scpSrcIpv4Addr Specifies the loopback address of the


local router.

vpnInstanceName Specifies the name of the VPN instance


to which the SCP server belongs.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<sshClient>
<keepAliveTime>3</keepAliveTime>
<keepAliveCount>3</keepAliveCount>
<firstTimeEnable>Enable</firstTimeEnable>
<SrcIpv4Addr>1.1.1.1</SrcIpv4Addr>
<SrcInterface></SrcInterface>>
<vpnInstanceName>vpn-1</vpnInstanceName>
<scpSrcIpv4Addr>1.1.1.1</scpSrcIpv4Addr>
<scpSrcInterface></scpSrcInterface>
<scpVpnInstanceName>vpn-1</scpVpnInstanceName>
</sshClient>

Table 3-174 describes elements in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 108


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-174 Elements


Element Description

keepAliveTime Specifies an interval at which the client


sends Keepalive packets to the server.
The default value is 0s, indicating that the
client does not send any Keepalive packet
to the server.
If a client does not receive any response
packet from the server within a specified
interval, the client sends a new Keepalive
packet to the server. If the server still
does not respond, the client disconnects
from the server.

keepAliveCount Specifies the maximum number of


Keepalive packets that a client can send
to the server.
The default value is 3, indicating that a
client can send a maximum of three
Keepalive packets to the server before
disconnection.

firstTimeEnable Enables or disables first-time


authentication for the SSH client. If this
function is enabled, the system
automatically allocates the RSA, DSA, or
ECC public key after the first-time login
and stores the key for later logins.

SrcInterface Specifies a loopback interface of the local


router. An SFTP client uses this interface
as the local interface.

SrcIpv4Addr Specifies the source address of the local


router. An SFTP client uses this address
as the local address.

vpnInstanceName Specifies the name of the VPN instance


to which the SFTP client belongs.

scpSrcInterface Specifies a loopback interface of the local


router. An SCP client uses this interface
as the local interface.

scpSrcIpv4Addr Specifies the loopback address of the


local router.

vpnInstanceName Specifies the name of the VPN instance


to which the SCP server belongs.

3.11.2 SSH Client Encryption Algorithm

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 109


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.11.2.1 Configure Encryption Algorithms on an SSH Client


Operation URI Description

PUT /sshc/sshCCipherAlg Configure encryption algorithms on an


SSH client. The SSH client and server
negotiate encryption algorithms for the
packets exchanged between them. During
negotiation, the client sends its encryption
algorithms to the server. After comparing
the received encryption algorithms with
local ones, the server selects the first
matching encryption algorithm received
for packet transmission. If no matching
encryption algorithm is found, the
negotiation fails.

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<sshCCipherAlg operation>
<descbc>true</descbc>
<des3cbc>true</des3cbc>
<aes128cbc>true</aes128cbc>
<aes256cbc>true</aes256cbc>
<aes128ctr>true</aes128ctr>
<aes256ctr>true</aes256ctr>
<arcfour128>true</arcfour128>
<arcfour256>true</arcfour256>
</sshCCipherAlg>

Table 3-175 describes elements in requests.

Table 3-175 Elements

Element Description

descbc Specifies a DES encryption algorithm in CBC mode.

des3cbc Specifies a 3DES encryption algorithm in CBC mode.

aes128cbc Specifies an AES128 encryption algorithm in CBC mode.

aes256cbc Specifies an AES256 encryption algorithm in CBC mode.

aes128ctr Specifies an AES128 encryption algorithm in CTR mode.

aes256ctr Specifies an AES256 encryption algorithm in CTR mode.

arcfour128 Specifies an Arcfour128 encryption algorithm.

arcfour256 Specifies an Arcfour256 encryption algorithm.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-176 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 110


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-176 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.11.2.2 Query Encryption Algorithms of the SSH Client


Operation URI Description

GET /sshc/sshCCipherAlg Query encryption algorithms


of the SSH client.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<sshCCipherAlg>
<descbc/>
<des3cbc/>
<aes128cbc/>
<aes256cbc/>
<aes128ctr/>
<aes256ctr/>
<arcfour128/>
<arcfour256/>
</sshCCipherAlg>

Table 3-177 describes elements in requests.

Table 3-177 Elements


Element Description

descbc Specifies the DES encryption algorithm


in CBC mode.

des3cbc Specifies the 3DES encryption algorithm


in CBC mode.

aes128cbc Specifies the AES128 encryption


algorithm in CBC mode.

aes256cbc Specifies the AES256 encryption


algorithm in CBC mode.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 111


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

aes128ctr Specifies the AES128 encryption


algorithm in CTR mode.

aes256ctr Specifies the AES256 encryption


algorithm in CTR mode.

arcfour128 Specifies the Arcfour128 encryption


algorithm.

arcfour256 Specifies the Arcfour256 encryption


algorithm.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<sshCCipherAlg>
<descbc>true</descbc>
<des3cbc>true</des3cbc>
<aes128cbc>true</aes128cbc>
<aes256cbc>true</aes256cbc>
<aes128ctr>true</aes128ctr>
<aes256ctr>true</aes256ctr>
<arcfour128>true</arcfour128>
<arcfour256>true</arcfour256>
</sshCCipherAlg>

Table 3-178 describes elements in responses.

Table 3-178 Elements


Element Description

descbc Specifies the DES encryption algorithm


in CBC mode.

des3cbc Specifies the 3DES encryption algorithm


in CBC mode.

aes128cbc Specifies the AES128 encryption


algorithm in CBC mode.

aes256cbc Specifies the AES256 encryption


algorithm in CBC mode.

aes128ctr Specifies the AES128 encryption


algorithm in CTR mode.

aes256ctr Specifies the AES256 encryption


algorithm in CTR mode.

arcfour128 Specifies the Arcfour128 encryption


algorithm.

arcfour256 Specifies the Arcfour256 encryption


algorithm.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 112


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.11.3 SSH Client Authentication Algorithm

3.11.3.1 Configure HMAC Authentication Algorithms on an SSH Client


Operation URI Description

PUT /sshc/sshCHMacAlg Configure HMAC


authentication algorithms on
an SSH client. The SSH
client and server negotiate
authentication algorithms
for the packets exchanged
between them. During
negotiation, the client sends
its authentication algorithms
to the server. After
comparing the received
authentication algorithms
with local ones, the server
selects the first matching
authentication algorithm
received for packet
transmission. If no matching
authentication algorithm is
found, the negotiation fails.

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<sshCHMacAlg>
<md5>true</md5>
<md596>true</md596>
<sha1>true</sha1>
<sha196>true</sha196>
<sha2256>true</sha2256>
<sha225696>true</sha225696>
</sshCHMacAlg>

Table 3-179 describes elements in requests.

Table 3-179 Elements


Element Description

md5 Specifies an MD5 HMAC authentication algorithm.

md596 Specifies an MD5_96 HMAC authentication algorithm.

sha1 Specifies an SHA1 HMAC authentication algorithm.

sha196 Specifies an SHA1_96 HMAC authentication algorithm.

sha2256 Specifies an SHA2_256 HMAC authentication algorithm.

sha225696 Specifies an SHA2_256_96 HMAC authentication algorithm.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 113


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-180 describes status codes in responses.

Table 3-180 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.11.3.2 Query HMAC Authentication Algorithms on an SSH Client


Operation URI Description

GET /sshc/sshCHMacAlg Query HMAC


authentication algorithms on
an SSH client.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<sshCHMacAlg>
<md5/>
<md596/>
<sha1/>
<sha196/>
<sha2256/>
<sha225696/>
</sshCHMacAlg>

Table 3-181 describes elements in requests.

Table 3-181 Elements


Element Description

md5 Specifies an MD5 HMAC authentication algorithm.

md596 Specifies an MD5_96 HMAC authentication algorithm.

sha1 Specifies an SHA1 HMAC authentication algorithm.

sha196 Specifies an SHA1_96 HMAC authentication algorithm.

sha2256 Specifies an SHA2_256 HMAC authentication algorithm.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 114


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

sha225696 Specifies an SHA2_256_96 HMAC authentication algorithm.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<sshCHMacAlg>
<md5>true</md5>
<md596>true</md596>
<sha1>true</sha1>
<sha196>true</sha196>
<sha2256>true</sha2256>
<sha225696>true</sha225696>
</sshCHMacAlg>

Table 3-182 describes elements in responses.

Table 3-182 Elements

Element Description

md5 Specifies an MD5 HMAC authentication algorithm.

md596 Specifies an MD5_96 HMAC authentication algorithm.

sha1 Specifies an SHA1 HMAC authentication algorithm.

sha196 Specifies an SHA1_96 HMAC authentication algorithm.

sha2256 Specifies an SHA2_256 HMAC authentication algorithm.

sha225696 Specifies an SHA2_256_96 HMAC authentication algorithm.

Table 3-183 describes status codes in responses.

Table 3-183 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.11.4 Public Key Configuration for an SSH Server

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 115


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.11.4.1 Create Public Keys for an SSH Server


Operation URI Description

POST /sshc/sshCliKeyCfgs/ Create public keys for an


sshCliKeyCfg SSH server. The SSH client
assigns public keys to the
SSH server. The keys must
be RSA/DSA/ECC public
keys of the SSH server that
is configured on the SSH
client.
By default, no public key is
assigned to the SSH server.

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<sshCliKeyCfg>
<serverName>10.1.1.1</serverName>
<keyName>rsa</keyName>
<pubKeyType>RSA</pubKeyType>
</sshCliKeyCfg>

Table 3-184 describes elements in requests.

Table 3-184 Elements


Element Description

serverName Specifies an SSH server address. (Mandatory)

keyName Specifies a public key name. (Mandatory)

pubKeyTyp Specifies a public key type: RSA, DSA, or ECC. (Mandatory)


e

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-185 describes status codes in responses.

Table 3-185 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 116


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.11.4.2 Query Public Keys of an SSH Server


Operation URI Description

GET /sshc/sshCliKeyCfgs/ Query the public keys


sshCliKeyCfg assigned by an SSH client to
the SSH server. The keys
must be RSA/DSA/ECC
public keys that are
currently used for the SSH
server.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<sshCliKeyCfg>
<serverName/>
<keyName/>
<pubKeyType/>
</sshCliKeyCfg>

Table 3-186 describes elements in requests.

Table 3-186 Elements


Element Description

serverName Specifies an SSH server address.

keyName Specifies a public key name.

pubKeyTyp Specifies a public key type: RSA, DSA, or ECC.


e

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<sshCliKeyCfg>
<serverName>10.0.0.1<serverName/>
<keyName>dsakey001<keyName/>
<pubKeyType>ECC<pubKeyType/>
</sshCliKeyCfg>

Table 3-187 describes elements in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 117


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-187 Elements


Element Description

serverName Specifies an SSH server address.

keyName Specifies a public key name.

pubKeyTyp Specifies a public key type: RSA, DSA, or ECC.


e

Table 3-188 describes status codes in responses.

Table 3-188 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.11.4.3 Configure Public Keys for an SSH Server


Operation URI Description

PUT /sshc/sshCliKeyCfgs/ Configure public keys for an


sshCliKeyCfg SSH server.
The SSH client assigns
public keys to the SSH
server. The keys must be
RSA/DSA/ECC public keys
of the SSH server that is
configured on the SSH
client.
By default, no public key is
assigned to the SSH server.

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<sshCliKeyCfg>
<serverName>10.1.1.1</serverName>
<keyName>rsa</keyName>
<pubKeyType>RSA</pubKeyType>
</sshCliKeyCfg>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 118


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-189 describes elements in requests.

Table 3-189 Elements


Element Description

serverName Specifies an SSH server address.

keyName Specifies a public key name.

pubKeyTyp Specifies a public key type: RSA, DSA, or ECC.


e

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-190 describes status codes in responses.

Table 3-190 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.11.4.4 Delete Public Keys of an SSH Server


Operation URI Description

DELETE /sshc/sshCliKeyCfgs/ Delete the public keys


sshCliKeyCfg assigned by an SSH client to
the SSH server. The keys
must be RSA/DSA/ECC
public keys of the SSH
server that is configured on
the SSH client.

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<sshCliKeyCfg>
<serverName>10.1.1.1</serverName>
<pubKeyType>RSA</pubKeyType>
</sshCliKeyCfg>

Table 3-191 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 119


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-191 Elements


Element Description

serverName Specifies an SSH server address.

pubKeyTyp Specifies a public key type: RSA, DSA, or ECC.


e

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-192 describes status codes in responses.

Table 3-192 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.11.5 SSH Server Management

3.11.5.1 Configure SSH Servers


Operation URI Description

PUT /sshs/sshServer Configure SSH servers.

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<sshServer>
<portNumber>22</portNumber>
<authenticationTimeout>90</authenticationTimeout>
<rekeyInterval>2</rekeyInterval>
<keepAliveEnable>Enable</keepAliveEnable>
<compatibleSsh1x>Disable</compatibleSsh1x>
<stelnetEnable>Enable</stelnetEnable>
<sftpEnable>Enable</sftpEnable>
<sftpMaxUser>10</sftpMaxUser>
<sftpTimeoutMin>1</sftpTimeoutMin>
<sftpTimeoutSec>30</sftpTimeoutSec>
<snetconfEnable>Enable</snetconfEnable>
<sshAuthDefPass>Disable</sshAuthDefPass>
<authRetries>4</authRetries>
<scpEnable>Enable</scpEnable>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 120


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<scpMaxsession>5</scpMaxsession>
<snetconfPortEnable>Enable</snetconfPortEnable>
<desEnable>Enable</desEnable>
</sshServer>

Table 3-193 describes elements in requests.

Table 3-193 Elements


Element Description

portNumber Specifies the number of the port that the SSH server monitors. The port
number can be either 22 or an integer ranging from 1025 to 65535.

sshacl4Num Specifies an ACL number for IPv4 protocols. The value is an integer
ranging from 2000 to 3999.

sshacl4Nam Specifies an ACL name for IPv4 protocols. The value is a string of 1 to
e 32 characters.

sshacl6Num Specifies an ACL number for IPv6 protocols. The value is an integer
ranging from 2000 to 3999.

sshacl6Nam Specifies an ACL name for IPv6 protocols. The value is a string of 1 to
e 32 characters.

authenticati Specifies the timeout period of an SSH connection. The value ranges
onTimeout between 1 to 120 seconds.

rekeyInterv Specifies an interval at which the key pair of the SSH server is
al updated. The value ranges between 0 to 24 hours.

keepAliveE Specifies whether to enable the keepalive feature on the SSH server.
nable

compatibleS Specifies the status of the version-compatible function on the SSH


sh1x server.

stelnetEnabl Specifies whether to enable the STelnet service on the SSH server.
e

sftpEnable Specifies whether to enable the SFTP service on the SSH server.

sftpMaxUse Specifies the maximum number of sessions for SFTP. The value ranges
r from 0 to 15.

sftpTimeout Specifies a timeout period, in minutes. The value ranges from 0 to


Min 35791 minutes.

sftpTimeout Specifies a timeout period, in seconds. The value ranges from 0 to 59


Sec seconds.

snetconfEna Specifies whether to enable the SNETCONF service on the SSH server.
ble

sshAuthDef Specifies password authentication as the default authentication mode


Pass for SSH users.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 121


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

authRetries Specifies the number of retries to authenticate an SSH connection. The


value ranges from 1 to 5.

scpEnable Specifies whether to enable the SCP service on the SSH server.

scpMaxsess Specifies the maximum number of SCP clients that can be connected to
ion the SSH server. The value ranges from 0 to 5.

snetconfPor Specifies whether to establish a NETCONF connection on the well-


tEnable known port 830.

desEnable Specifies whether to enable the DES encryption algorithm on the SSH
server.

rsaHostKey Specifies an RSA host key as the key to be assigned to the SSH server.

rsaServerKe Specifies an RSA server key as the key to be assigned to the SSH
y server.

dsaHostKey Specifies a DSA host key as the key to be assigned to the SSH server.

eccHostKey Specifies an ECC host key as the key to be assigned to the SSH server.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-194 describes status codes in responses.

Table 3-194 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.11.5.1.1 Configure SNETCONF Servers

Operation URI Description

PUT /sshs/sshServer/ Configure SNETCONF


snetconfEnable Servers.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 122


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<snetconfEnable>Enable</snetconfEnable>

Table 3-195 describes elements in requests.

Table 3-195 Elements


Elements Description

snetconfEna Enables or disable the SNETCONF service of a SSH server.


ble

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-196 describes status codes in responses.

Table 3-196 Status Code


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.11.5.2 Query SSH Server Information


Operation URI Description

GET /sshs/sshServer Query SSH server information.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<sshServer>
<portNumber/>
<sshacl4Num/>
<sshacl4Name/>
<sshacl6Num/>
<sshacl6Name/>
<authenticationTimeout/>
<rekeyInterval/>
<keepAliveEnable/>
<compatibleSsh1x/>
<sshVersion/>
<stelnetEnable/>
<sftpEnable/>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 123


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<sftpMaxUser/>
<sftpTimeoutMin/>
<sftpTimeoutSec/>
<snetconfEnable/>
<sshAuthDefPass/>
<authRetries/>
<sftpOnlineUser/>
<scpEnable/>
<scpMaxsession/>
<snetconfPortEnable/>
<desEnable/>
<rsaHostKey/>
<rsaServerKey/>
<dsaHostKey/>
<eccHostKey/>
</sshServer>

Table 3-197 describes elements in requests.

Table 3-197 Elements


Element Description

portNumber Specifies the number of the port that the SSH server monitors. The port
number can be either 22 or an integer ranging from 1025 to 65535.

sshacl4Num Specifies an ACL number for IPv4 protocols. The value is an integer
ranging from 2000 to 3999.

sshacl4Nam Specifies an ACL name for IPv4 protocols. The value is a string of 1 to
e 32 characters.

sshacl6Num Specifies an ACL number for IPv6 protocols. The value is an integer
ranging from 2000 to 3999.

sshacl6Nam Specifies an ACL name for IPv6 protocols. The value is a string of 1 to
e 32 characters.

authenticati Specifies the timeout period of an SSH connection. The value ranges
onTimeout between 1 to 120 seconds.

rekeyInterv Specifies an interval at which the key pair of the SSH server is
al updated. The value ranges between 0 to 24 hours.

keepAliveE Specifies whether the keepalive feature is enabled on the SSH server.
nable

compatibleS Specifies the status of the version-compatible function on the SSH


sh1x server.

sshVersion Specifies an SSH version, which can be 1.9 or 2.

stelnetEnabl Specifies whether the STelnet service is enabled on the SSH server.
e

sftpEnable Specifies whether the SFTP service is enabled on the SSH server.

sftpMaxUse Specifies the maximum number of sessions for SFTP.


r

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 124


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

sftpTimeout Specifies a timeout period, in minutes. The value ranges from 0 to


Min 35791 minutes.

sftpTimeout Specifies a timeout period, in seconds. The value ranges from 0 to 59


Sec seconds.

snetconfEna Specifies whether the SNETCONF service is enabled on the SSH


ble server.

sshAuthDef Specifies password authentication as the default authentication mode


Pass for SSH users.

authRetries Specifies the number of retries to authenticate an SSH connection.

sftpOnlineU Specifies the current number of online SFTP users.


ser

scpEnable Specifies whether the SCP service is enabled on the SSH server.

scpMaxsess Specifies the maximum number of SCP clients that can be connected to
ion the SSH server.

snetconfPor Specifies whether a NETCONF connection is established on the well-


tEnable known port 830.

desEnable Specifies whether the DES encryption algorithm is enabled on the SSH
server.

rsaHostKey Specifies an RSA host key as the key assigned to the SSH server.

rsaServerKe Specifies an RSA server key as the key assigned to the SSH server.
y

dsaHostKey Specifies a DSA host key as the key assigned to the SSH server.

eccHostKey Specifies an ECC host key as the key assigned to the SSH server.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<sshServer>
<portNumber>22</portNumber>
<sshacl4Name></sshacl4Name>
<sshacl4Num/>
<sshacl6Name></sshacl6Name>
<sshacl6Num/>
<authenticationTimeout>90</authenticationTimeout>
<rekeyInterval>2</rekeyInterval>
<keepAliveEnable>Enable</keepAliveEnable>
<compatibleSsh1x>Disable</compatibleSsh1x>
<sshVersion>sshVer2</sshVersion>
<stelnetEnable>Enable</stelnetEnable>
<sftpEnable>Enable</sftpEnable>
<sftpMaxUser>10</sftpMaxUser>
<sftpTimeoutMin>1</sftpTimeoutMin>
<sftpTimeoutSec>30</sftpTimeoutSec>
<snetconfEnable>Enable</snetconfEnable>
<sshAuthDefPass>Disable</sshAuthDefPass>
<authRetries>4</authRetries>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 125


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<sshVersion>sshVer1_99</sshVersion>
<rekeyInterval>2</rekeyInterval>
<authenticationTimeout>90</authenticationTimeout>
<portNumber>22</portNumber>
<keepAliveEnable>Enable</keepAliveEnable>
<compatibleSsh1x>Enable</compatibleSsh1x>
<stelnetEnable>Enable</stelnetEnable>
<sftpEnable>Enable</sftpEnable>
<sftpMaxUser>10</sftpMaxUser>
<sftpTimeoutMin>1</sftpTimeoutMin>
<sftpTimeoutSec>30</sftpTimeoutSec>
<snetconfEnable>Enable</snetconfEnable>
<sshAuthDefPass>Enable</sshAuthDefPass>
<authRetries>4</authRetries>
<sshacl4Name></sshacl4Name>
<sshacl4Num/>
<sshacl6Name></sshacl6Name>
<sshacl6Num/>
<snetconfPortEnable>Enable</snetconfPortEnable>
<srcInterfName></srcInterfName>
<desEnable>Enable</desEnable>
<scpEnable>Enable</scpEnable>
<scpMaxsession>5</scpMaxsession>
<rsaHostKey></rsaHostKey>
<rsaServerKey></rsaServerKey>
<dsaHostKey></dsaHostKey>
<eccHostKey></eccHostKey>
<scpEnable>Disable</scpEnable>
<scpMaxsession>5</scpMaxsession>
<snetconfPortEnable>Disable</snetconfPortEnable>
<desEnable>Disable</desEnable>
<rsaHostKey></rsaHostKey>
<rsaServerKey></rsaServerKey>
<dsaHostKey></dsaHostKey>
<eccHostKey></eccHostKey>
</sshServer>

Table 3-198 describes elements in responses.

Table 3-198 Elements


Element Description

portNumber Specifies the number of the port that the SSH server monitors. The port
number can be either 22 or an integer ranging from 1025 to 65535.

sshacl4Num Specifies an ACL number for IPv4 protocols. The value is an integer
ranging from 2000 to 3999.

sshacl4Nam Specifies an ACL name for IPv4 protocols. The value is a string of 1 to
e 32 characters.

sshacl6Num Specifies an ACL number for IPv6 protocols. The value is an integer
ranging from 2000 to 3999.

sshacl6Nam Specifies an ACL name for IPv6 protocols. The value is a string of 1 to
e 32 characters.

authenticati Specifies the timeout period of an SSH connection. The value ranges
onTimeout between 1 to 120 seconds.

rekeyInterv Specifies an interval at which the key pair of the SSH server is
al updated. The value ranges between 0 to 24 hours.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 126


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

keepAliveE Specifies whether the keepalive feature is enabled on the SSH server.
nable

compatibleS Specifies the status of the version-compatible function on the SSH


sh1x server.

sshVersion Specifies an SSH version, which can be 1.9 or 2.

stelnetEnabl Specifies whether the STelnet service is enabled on the SSH server.
e

sftpEnable Specifies whether the SFTP service is enabled on the SSH server.

sftpMaxUse Specifies the maximum number of sessions for SFTP.


r

sftpTimeout Specifies a timeout period, in minutes. The value ranges from 0 to


Min 35791 minutes.

sftpTimeout Specifies a timeout period, in seconds. The value ranges from 0 to 59


Sec seconds.

snetconfEna Specifies whether the SNETCONF service is enabled on the SSH


ble server.

sshAuthDef Specifies password authentication as the default authentication mode


Pass for SSH users.

authRetries Specifies the number of retries to authenticate an SSH connection.

sftpOnlineU Specifies the current number of online SFTP users.


ser

scpEnable Specifies whether the SCP service is enabled on the SSH server.

scpMaxsess Specifies the maximum number of SCP clients that can be connected to
ion the SSH server.

snetconfPor Specifies whether a NETCONF connection is established on the well-


tEnable known port 830.

desEnable Specifies whether the DES encryption algorithm is enabled on the SSH
server.

rsaHostKey Specifies an RSA host key as the key assigned to the SSH server.

rsaServerKe Specifies an RSA server key as the key assigned to the SSH server.
y

dsaHostKey Specifies a DSA host key as the key assigned to the SSH server.

eccHostKey Specifies an ECC host key as the key assigned to the SSH server.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 127


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.11.6 Query SSH Server Session Information


Operation URI Description

GET /sshs/sshSessionStatuss/ Query SSH server session


sshSessionStatus information.
After configuring SSH
attributes, you can view the
global configurations of the
SSH server and current
session information.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<sshSessionStatus>
<serviceIndex></serviceIndex>
<SshSessNum></SshSessNum>
<sshVersion></sshVersion>
<connState></connState>
<userName></userName>
<ctosCipher></ctosCipher>
<stocCipher></stocCipher>
<ctosCompress></ctosCompress>
<stocCompress></stocCompress>
<ctosHMAC></ctosHMAC>
<stocHMAC></stocHMAC>
<keyExchange></keyExchange>
<serviceType></serviceType>
<sessionRetry></sessionRetry>
<sessionAuthType></sessionAuthType>
<connectionPort></connectionPort>
<sessionKeyType></sessionKeyType>
</sshSessionStatus>

Table 3-199 describes elements in requests.

Table 3-199 Elements

Element Description

serviceIndex Specifies the service index.

SshSessNum Specifies the number of SSH sessions.

sshVersion Specifies the SSH version.

connState Specifies the SSH session type.


l VTY
l NCA
l SFTP

userName Specifies the name of an SSH session.

ctosCipher Specifies the name of the encryption


algorithm sent by the client to the server.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 128


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

stocCipher Specifies the name of the encryption


algorithm sent by the server to the client.

ctosCompress Specifies the name of the compression


algorithm sent by the client to the server.

stocCompress Specifies the name of the compression


algorithm sent by the server to the client.

ctosHMAC Specifies the name of the HMAC


algorithm sent by the client to the server.

stocHMAC Specifies the name of the HMAC


algorithm sent by the server to the client.

keyExchange Specifies the name of the key exchange


algorithm.

serviceType Specifies the SSH user service type:


l sftp
l stelnet
l snetconf

sessionRetry Specifies the number of retry times.

sessionAuthType Specifies an authentication type:


l password
l rsa
l password-rsa
l all
l ecc
l password-ecc
l dsa
l password-dsa

connectionPort Specifies the port number used to


establish an SSH connection.

sessionKeyType Specifies the public key session type,


which can be RSA ECC or DSA.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<sshClient>
<keepAliveTime>3</keepAliveTime>
<keepAliveCount>3</keepAliveCount>
</sshClient>

Table 3-200 describes elements in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 129


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-200 Elements

Element Description

keepAliveTime Specifies the Keepalive time.

keepAliveCount Specifies the Keepalive count.

3.11.7 NETCONF Services for an SSH Server

3.11.7.1 Configure NETCONF Services


Operation URI Description

PUT /sshs/sshNcaVtyCfg Configure NETCONF


services.

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<sshNcaVtyCfg>
<timeoutMin>1</timeoutMin>
<timeoutSec>30</timeoutSec>
<maxSessions>3</maxSessions>
</sshNcaVtyCfg>

Table 3-201 describes elements in requests.

Table 3-201 Elements

Element Description

timeoutMin Specifies a time period to disconnect a user from the user interface
view, in minutes. The value ranges from 0 to 35791.

timeoutSec Specifies a time period to disconnect a user from the user interface
view, in seconds. The value ranges from 0 to 59.

maxSession Specifies the maximum number of NETCONF sessions. The value


s ranges from 0 to 5.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-202 describes status codes in responses.

Table 3-202 Status codes

Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 130


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.11.7.2 Query NETCONF Services


Operation URI Description

GET /sshs/sshNcaVtyCfg Query NETCONF services.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<sshNcaVtyCfg>
<timeoutMin/>
<timeoutSec/>
<maxSessions/>
</sshNcaVtyCfg>

Table 3-203 describes elements in requests.

Table 3-203 Elements


Element Description

timeoutMin Specifies a time period to disconnect a user from the user interface
view, in minutes.

timeoutSec Specifies a time period to disconnect a user from the user interface
view, in seconds.

maxSession Specifies the maximum number of NETCONF sessions.


s

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<sshNcaVtyCfg>
<timeoutMin>1</timeoutMin>
<timeoutSec>30</timeoutSec>
<maxSessions>3</maxSessions>
</sshNcaVtyCfg>

Table 3-204 describes elements in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 131


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-204 Elements

Element Description

timeoutMin Specifies a time period to disconnect a user from the user interface
view, in minutes.

timeoutSec Specifies a time period to disconnect a user from the user interface
view, in seconds.

maxSession Specifies the maximum number of NETCONF sessions.


s

Table 3-205 describes status codes in responses.

Table 3-205 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.11.8 SSH Server Encryption Algorithm

3.11.8.1 Configure Encryption Algorithms on an SSH Server


Operation URI Description

PUT /sshs/sshSCipherAlg Configure encryption algorithms on an


SSH server. The SSH client and server
negotiate encryption algorithms for the
packets exchanged between them. During
negotiation, the client sends its encryption
algorithms to the server. After comparing
the received encryption algorithms with
local ones, the server selects the first
matching encryption algorithm received for
packet transmission. If no matching
encryption algorithm is found, the
negotiation fails.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 132


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<sshSCipherAlg>
<descbc>true</descbc>
<des3cbc>true</des3cbc>
<aes128cbc>true</aes128cbc>
<aes256cbc>true</aes256cbc>
<aes128ctr>true</aes128ctr>
<aes256ctr>true</aes256ctr>
<arcfour128>true</arcfour128>
<arcfour256>true</arcfour256>
<blowfishcbc>true</blowfishcbc>
</sshSCipherAlg>

Table 3-206 describes elements in requests.

Table 3-206 Elements

Element Description

descbc Specifies a DES encryption algorithm in CBC mode.

des3cbc Specifies a 3DES encryption algorithm in CBC mode.

aes128cbc Specifies an AES128 encryption algorithm in CBC mode.

aes256cbc Specifies an AES256 encryption algorithm in CBC mode.

aes128ctr Specifies an AES128 encryption algorithm in CTR mode.

aes256ctr Specifies an AES256 encryption algorithm in CTR mode.

arcfour128 Specifies an Arcfour128 encryption algorithm.

arcfour256 Specifies an Arcfour256 encryption algorithm.

blowfishcbc Specifies a Blowfish encryption algorithm in CBC mode.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-207 describes status codes in responses.

Table 3-207 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 133


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.11.8.2 Query the encryption algorithm of the SSH server


Operation URI Description

GET /sshs/sshSCipherAlg Query the encryption


algorithm of the SSH server.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<sshSCipherAlg>
<descbc/>
<des3cbc/>
<aes128cbc/>
<aes256cbc/>
<aes128ctr/>
<aes256ctr/>
<arcfour128/>
<arcfour256/>
<blowfishcbc/>
</sshSCipherAlg>

Table 3-208 describes elements in requests.

Table 3-208 Elements


Element Description

descbc Specifies the DES encryption algorithm


in CBC mode.

des3cbc Specifies the DES encryption algorithm


in CBC mode.

aes128cbc Specifies the AES128 encryption


algorithm in CBC mode.

aes256cbc Specifies the AES256 encryption


algorithm in CBC mode.

aes128ctr Specifies the AES128 encryption


algorithm in CTR mode.

aes256ctr Specifies the AES256 encryption


algorithm in CTR mode.

arcfour128 Specifies the Arcfour128 encryption


algorithm.

arcfour256 Specifies the Arcfour256 encryption


algorithm.

blowfishcbc Specifies the Blowfish encryption


algorithm in CBC mode.

l Response example (XML format)

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 134


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<?xml version="1.0" encoding="UTF-8"?>


<sshSCipherAlg>
<descbc>true</descbc>
<des3cbc>true</des3cbc>
<aes128cbc>true</aes128cbc>
<aes256cbc>true</aes256cbc>
<aes128ctr>true</aes128ctr>
<aes256ctr>true</aes256ctr>
<arcfour128>true</arcfour128>
<arcfour256>true</arcfour256>
<blowfishcbc>true</blowfishcbc>
</sshSCipherAlg>

Table 3-209 describes elements in responses.

Table 3-209 Elements


Element Description

descbc Specifies the DES encryption algorithm


in CBC mode.

des3cbc Specifies the 3DES encryption algorithm


in CBC mode.

aes128cbc Specifies the AES128 encryption


algorithm in CBC mode.

aes256cbc Specifies the AES256 encryption


algorithm in CBC mode.

aes128ctr Specifies the AES128 encryption


algorithm in CTR mode.

aes256ctr Specifies the AES256 encryption


algorithm in CTR mode.

arcfour128 Specifies the Arcfour128 encryption


algorithm.

arcfour256 Specifies the Arcfour256 encryption


algorithm.

blowfishcbc Specifies the Blowfish encryption


algorithm in CBC mode.

3.11.9 SSH Server Authentication Algorithm

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 135


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.11.9.1 Configure HMAC Authentication Algorithms on an SSH Server


Operation URI Description

PUT /sshs/sshSHMacAlg Configure HMAC authentication algorithms on


an SSH server.
The SSH client and server negotiate
authentication algorithms for the packets
exchanged between them. During negotiation,
the client sends its authentication algorithms to
the server. After comparing the received
authentication algorithms with local ones, the
server selects the first matching authentication
algorithm received for packet transmission. If
no matching authentication algorithm is found,
the negotiation fails.

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<sshSHMacAlg>
<md5>true</md5>
<md596>true</md596>
<sha1>true</sha1>
<sha196>true</sha196>
<sha2256>true</sha2256>
<sha225696>true</sha225696>
</sshSHMacAlg>

Table 3-210 describes elements in requests.

Table 3-210 Elements


Element Description

md5 Specifies an MD5 HMAC authentication algorithm.

md596 Specifies an MD5_96 HMAC authentication algorithm.

sha1 Specifies an SHA1 HMAC authentication algorithm.

sha196 Specifies an SHA1_96 HMAC authentication algorithm.

sha2256 Specifies an SHA2_256 HMAC authentication algorithm.

sha225696 Specifies an SHA2_256_96 HMAC authentication algorithm.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-211 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 136


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-211 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.11.9.2 Query HMAC Authentication Algorithms on an SSH Server


Operation URI Description

GET /sshs/sshSHMacAlg Query HMAC


authentication algorithms on
an SSH server.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<sshSHMacAlg>
<md5/>
<md596/>
<sha1/>
<sha196/>
<sha2256/>
<sha225696/>
</sshSHMacAlg>

Table 3-212 describes elements in requests.

Table 3-212 Elements


Element Description

md5 Specifies an MD5 HMAC authentication algorithm.

md596 Specifies an MD5_96 HMAC authentication algorithm.

sha1 Specifies an SHA1 HMAC authentication algorithm.

sha196 Specifies an SHA1_96 HMAC authentication algorithm.

sha2256 Specifies an SHA2_256 HMAC authentication algorithm.

sha225696 Specifies an SHA2_256_96 HMAC authentication algorithm.

l Response example (XML format)

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 137


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<?xml version="1.0" encoding="UTF-8"?>


<sshSHMacAlg>
<md5>true</md5>
<md596>true</md596>
<sha1>true</sha1>
<sha196>true</sha196>
<sha2256>true</sha2256>
<sha225696>true</sha225696>
</sshSHMacAlg>

Table 3-213 describes elements in responses.

Table 3-213 Elements


Element Description

md5 Specifies an MD5 HMAC authentication algorithm.

md596 Specifies an MD5_96 HMAC authentication algorithm.

sha1 Specifies an SHA1 HMAC authentication algorithm.

sha196 Specifies an SHA1_96 HMAC authentication algorithm.

sha2256 Specifies an SHA2_256 HMAC authentication algorithm.

sha225696 Specifies an SHA2_256_96 HMAC authentication algorithm.

3.11.10 SSH User Management

3.11.10.1 Create SSH Users


Operation URI Description

POST /sshs/sshUserCfgs/ Create SSH users.


sshUserCfg

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<sshUserCfg>
<userName> testuser </userName>
<authType>rsa</authType>
<userName> testuser </userName>
<sftpDir>cfcard:/ssh</sftpDir>
<userName> testuser </userName>
<sshServiceType>sftp</sshServiceType>
<userName>test</userName>
<authType>dsa</authType>
<sftpDir></sftpDir>
<keyName>dsa</keyName>
<sshServiceType>all</sshServiceType>
<pubKeyType>DSA</pubKeyType>
</sshUserCfg>

Table 3-214 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 138


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-214 Elements


Element Description

userName Specifies the name of an SSH user. The name is a string of 1 to 253
characters, spaces not supported. (Mandatory)

authType Specifies an authentication type.

userName Specifies the name of an SSH user. The name is a string of 1 to 253
characters, spaces not supported.

sftpDir Specifies the name of a directory on the SFTP server. The name is a
string of 1 to 128 characters.

userName Specifies the name of an SSH user. The name is a string of 1 to 253
characters, spaces not supported.

sshServiceT Specifies the service type of an SSH user.


ype

userName Specifies the name of an SSH user. The name is a string of 1 to 253
characters, spaces not supported.

pubKeyTyp Specifies the public key type of an SSH user.


e

keyName Specifies the name of a configured public key.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-215 describes status codes in responses.

Table 3-215 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 139


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.11.10.2 Query SSH Users


Operation URI Description

GET /sshs/sshUserCfgs/ Query SSH users.


sshUserCfg

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<sshUserCfg>
<userName/>
<authType/>
<sftpDir/>
<sshServiceType/>
<pubKeyType/>
<keyName/>
</sshUserCfg>

Table 3-216 describes elements in requests.

Table 3-216 Elements


Element Description

userName Specifies the name of an SSH user.

authType Specifies the authentication type of an SSH user.

sftpDir Specifies the name of a directory on the SFTP server.

sshServiceT Specifies the service type of an SSH user.


ype

pubKeyTyp Specifies the public key type of an SSH user.


e

keyNam Specifies the name of a configured public key.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<data>
<sshs xmlns="http://www.huawei.com/netconf/vrp" format-version="1.0"
content-version="1.0">
<sshUserCfgs>
<sshUserCfg>
<userName>root123</userName>
<authType>password</authType>
<sshServiceType>all</sshServiceType>
<keyName/>
<sftpDir/>
<pubKeyType>NotSet</pubKeyType>
</sshUserCfg>
</sshUserCfgs>
</sshs>
</data>
</rpc-reply>

Table 3-217 describes elements in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 140


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-217 Elements

Element Description

userName Specifies the name of an SSH user.

authType Specifies the authentication type of an SSH user.

sftpDir Specifies the name of a directory on the SFTP server.

sshServiceT Specifies the service type of an SSH user.


ype

pubKeyTyp Specifies the public key type of an SSH user.


e

keyNam Specifies the name of a configured public key.

3.11.10.3 Configure SSH Users


Operation URI Description

PUT /sshs/sshUserCfgs/ Configure SSH users.


sshUserCfg

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<sshUserCfg>
<userName> testuser </userName>
<authType>rsa</authType>
<userName> testuser </userName>
<sftpDir>cfcard:/ssh</sftpDir>
<userName> testuser </userName>
<sshServiceType>sftp</sshServiceType>
<userName>test</userName>
<authType>dsa</authType>
<sftpDir></sftpDir>
<keyName>dsa</keyName>
<sshServiceType>all</sshServiceType>
<pubKeyType>DSA</pubKeyType>
</sshUserCfg>

Table 3-218 describes elements in requests.

Table 3-218 Elements

Element Description

userName Specifies the name of an SSH user. The name is a string of 1 to 253
characters, spaces not supported.

authType Specifies an authentication type.

userName Specifies the name of an SSH user. The name is a string of 1 to 253
characters, spaces not supported.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 141


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

sftpDir Specifies the name of a directory on the SFTP server. The name is a
string of 1 to 128 characters.

userName Specifies the name of an SSH user. The name is a string of 1 to 253
characters, spaces not supported.

sshServiceT Specifies the service type of an SSH user.


ype

userName Specifies the name of an SSH user. The name is a string of 1 to 253
characters, spaces not supported.

pubKeyTyp Specifies the public key type of an SSH user.


e

keyName Specifies the name of a configured public key.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-219 describes status codes in responses.

Table 3-219 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.11.10.4 Delete SSH Users


Operation URI Description

DELETE /sshs/sshUserCfgs/ Delete SSH users.


sshUserCfg

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<sshUserCfg>
<userName>testuser</userName>
</sshUserCfg>

Table 3-220 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 142


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-220 Elements


Element Description

userName Specifies the name of an SSH user.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-221 describes status codes in responses.

Table 3-221 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.11.11 Proactive Registration

3.11.11.1 1.3.1 Create a Node That Proactively Registers


Operation URI Description

POST /sshs/callHomes/callHome Create a node that


proactively registers.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<callHomes>
<callHomeName>callHomeName</callHomeName>
</callHomes>

Table 3-222 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 143


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-222 Elements


Element Description

callHomeN Specifies the name of a host that proactively registers. The value is a
ame string of 1 to 19 case-sensitive characters, spaces not supported. The
string can contain spaces if it is enclosed in double quotation marks (").
This element is mandatory.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>
Table 4-53 describes status codes in responses.

Table 3-223 describes elements in responses.

Table 3-223 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request cannot be implemented


because the request is incorrect in syntax
or the information attribute in the request
is incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.11.11.2 1.3.4 Query a Node That Proactively Registers


Operation URI Description

GET /sshs/callHomes/callHome Query a node that


proactively registers.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<callHomes>
<callHomeName></callHomeName>
</callHomes>

Table 3-224 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 144


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-224 Elements


Element Description

callHomeN Specifies the name of a host that proactively registers. The value is a
ame string of 1 to 19 case-sensitive characters, spaces not supported. The
string can contain spaces if it is enclosed in double quotation marks (").
This element is mandatory.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<callHomes>
<callHomeName>callHomeName</callHomeName>
</callHomes>

Table 3-225 describes status codes in responses.

Table 3-225 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request cannot be implemented because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.11.11.3 1.3.2 Modify a Node That Proactively Registers


Operation URI Description

PUT /sshs/callHomes/callHome Modify a node that


proactively registers.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<callHomes>
<callHomeName>callHomeName</callHomeName>
</callHomes>

Table 3-226 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 145


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-226 Elements


Element Description

callHomeN Specifies the name of a host that proactively registers. The value is a
ame string of 1 to 19 case-sensitive characters, spaces not supported. The
string can contain spaces if it is enclosed in double quotation marks (").
This element is mandatory.

– Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-227 describes status codes in responses.

Table 3-227 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request cannot be implemented


because the request is incorrect in
syntax or the information attribute in
the request is incorrect.

500 Internal Server Error Internal errors in services cause a


request failure or an unidentified
request.

3.11.11.4 1.3.3 Delete a Node That Proactively Registers


Operation URI Description

DELETE /sshs/callHomes/callHome Delete a node that


proactively registers.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<callHomes>
<callHomeName>callHomeName</callHomeName>
</callHomes>

Table 3-228 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 146


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-228 Elements


Element Description

callHomeN Specifies the name of a host that proactively registers. The value is a
ame string of 1 to 19 case-sensitive characters, spaces not supported. The
string can contain spaces if it is enclosed in double quotation marks (").
This element is mandatory.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-229 describes status codes in responses.

Table 3-229 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request cannot be implemented


because the request is incorrect in syntax
or the information attribute in the request
is incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.12 AAA User Management

3.12.1 Batch Increase of Command Levels

3.12.1.1 Query Whether Batch Increase of Command Levels Is Enabled


Operation URI Description

GET /aaa/cmdLevelRearrange Query whether batch


increase of command levels
is enabled.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<cmdLevelRearrange>
<isRearrange/>
</cmdLevelRearrange>

Table 3-230 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 147


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-230 Elements


Element Description

isRearrange Specifies whether batch increase of command levels is enabled.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<cmdLevelRearrange>
<isRearrange>false</isRearrange>
</cmdLevelRearrange>

Table 3-231 describes elements in responses.

Table 3-231 Elements


Element Description

isRearrange Specifies whether batch increase of command levels is enabled.

Table 3-232 describes status codes in responses.

Table 3-232 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.12.1.2 Enable/Disable Batch Increase of Command Levels


Operation URI Description

PUT /aaa/cmdLevelRearrange Enable/Disable batch


increase of command levels.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<cmdLevelRearrange>
<isRearrange>false</isRearrange>
</cmdLevelRearrange>

Table 3-233 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 148


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-233 Elements


Element Description

isRearrange Specifies whether to enable batch increase of command levels.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-234 describes status codes in responses.

Table 3-234 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.12.2 Alarm Thresholds for Consecutive Login Failures

3.12.2.1 Modify Alarm Thresholds Configured for Consecutive Login Failures


Operation URI Description

PUT /aaa/loginAlarmThreshold Modify alarm thresholds


configured for consecutive
login failures.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<loginAlarmThreshold>
<reportTimes>3</reportTimes>
<resumeTimes>2</resumeTimes>
<period>1</period>
</loginAlarmThreshold>

Table 3-235 describes elements in requests.

Table 3-235 Elements


Element Description

reportTimes Specifies an alarm reporting threshold for consecutive login failures.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 149


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

resumeTime Specifies an alarm clearance threshold for consecutive login failures.


s

period Specifies a period in which statistics about consecutive login failures


are collected.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-236 describes status codes in responses.

Table 3-236 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.12.2.2 Query Alarm Thresholds Configured for Consecutive Login Failures


Operation URI Description

GET /aaa/loginAlarmThreshold Query alarm thresholds


configured for consecutive
login failures.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<loginAlarmThreshold>
<reportTimes/>
<resumeTimes/>
<period/>
</loginAlarmThreshold>

Table 3-237 describes elements in requests.

Table 3-237 Elements


Element Description

reportTimes Specifies an alarm reporting threshold for consecutive login failures.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 150


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

resumeTime Specifies an alarm clearance threshold for consecutive login failures.


s

period Specifies a period in which statistics about consecutive login failures


are collected.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<loginAlarmThreshold>
<reportTimes>3</reportTimes>
<resumeTimes>2</resumeTimes>
<period>1</period>
</loginAlarmThreshold>

Table 3-238 describes elements in responses.

Table 3-238 Elements


Element Description

reportTimes Specifies an alarm reporting threshold for consecutive login failures.

resumeTime Specifies an alarm clearance threshold for consecutive login failures.


s

period Specifies a period in which statistics about consecutive login failures


are collected.

Table 3-239 describes status codes in responses.

Table 3-239 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 151


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.12.3 Modify Global Locking Configurations for Consecutive


Login Failures
Operation URI Description

PUT /aaa/lam/loginFailedLimit Modify global locking


configurations for
consecutive login failures.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<loginFailedLimit>
<failedTimes>3</failedTimes>
<period>2</period>
<reactiveTime>1</reactiveTime>
</loginFailedLimit>

Table 3-240 describes elements in requests.

Table 3-240 Elements

Element Description

failedTimes Specifies the number of consecutive login failures that trigger account
locking.

period Specifies a period in which statistics about consecutive login failures


are collected.

reactiveTim Specifies a period after which a locked account is automatically


e unlocked.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-241 describes status codes in responses.

Table 3-241 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 152


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.12.4 Modify Security Policy Configurations


Operation URI Description

PUT /aaa/lam/userSecurityPolicy Modify security policy


configurations.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<userSecurityPolicy>
<securityPolicy>false</securityPolicy>
<userAgingPeriod>1</userAgingPeriod>
<userNameMinLen>1</userNameMinLen>
</userSecurityPolicy>

Table 3-242 describes elements in requests.

Table 3-242 Elements


Element Description

securityPoli Specifies whether to enable the security policy function.


cy

userAgingP Specifies a user account aging period, in days.


eriod

userNameM Specifies the minimum length of a user name.


inLen

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-243 describes status codes in responses.

Table 3-243 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 153


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.12.5 Configure a Global Password Strength Policy


Operation URI Description

PUT /aaa/lam/passwordPolicy Configure a global password


strength policy.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<passwordPolicy>
<expireDays>2</expireDays>
<promptDays>1</promptDays>
<changeCheck>true</changeCheck>
<complexityCheck>true</complexityCheck>
</passwordPolicy>

Table 3-244 describes elements in requests.

Table 3-244 Elements

Element Description

expireDays Specifies a password validity period, in days.

promptDays Specifies when the device notifies users of incoming password


expiration. The value is an integer, in days.

changeChec Specifies whether to enable initial password check.


k

complexity Specifies whether to enable the function of checking local user


Check password strength.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-245 describes status codes in responses.

Table 3-245 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 154


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.12.6 Query System Tasks


Operation URI Description

GET /aaa/tasks/task Query system tasks.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<task>
<taskName/>
</task>

Table 3-246 describes elements in requests.

Table 3-246 Elements


Element Description

taskName Specifies a task name.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<task>
<taskName>ospf</taskName>
</task>

Table 3-247 describes elements in responses.

Table 3-247 Elements


Element Description

taskName Specifies a task name.

Table 3-248 describes status codes in responses.

Table 3-248 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 155


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.12.7 Query Task Groups


Operation URI Description

GET /aaa/taskGroups/taskGroup Query task groups.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<taskGroup>
<taskGroupName>tg1</taskGroupName>
</taskGroup>

Table 3-249 describes elements in requests.

Table 3-249 Elements

Element Description

taskGroupN Specifies a task group name.


ame

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<taskGroup>
<taskGroupName>tg1</taskGroupName>
</taskGroup>

Table 3-250 describes elements in responses.

Table 3-250 Elements

Element Description

taskGroupN Specifies a task group name.


ame

Table 3-251 describes status codes in responses.

Table 3-251 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 156


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.12.8 Query User Group Information


Operation URI Description

GET /aaa/userGroups/userGroup Query user group


information.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<userGroup>
<userGroupName>ug1</userGroupName>
</userGroup>

Table 3-252 describes elements in requests.

Table 3-252 Elements


Element Description

userGroupN Specifies a user group name.


ame

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<userGroup>
<userGroupName>ug1</userGroupName>
</userGroup>

Table 3-253 describes elements in responses.

Table 3-253 Elements


Element Description

userGroupN Specifies a user group name.


ame

Table 3-254 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 157


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-254 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.12.9 Configure the Inclusion Relationship Between User Groups


Operation URI Description

PUT /aaa/userGroupInclude- Configure the inclusion


Maps/userGroupIncludeMap relationship between user
groups.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<userGroupIncludeMap>
<userGroupName>ug1</userGroupName>
<includeUserGroupName>manage-ug</includeUserGroupName>
</userGroupIncludeMap>

Table 3-255 describes elements in requests.

Table 3-255 Elements


Element Description

userGroupN Specifies a user group name.


ame

includeUser Specifies the name of an included user group.


GroupName

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-256 describes status codes in responses.

Table 3-256 Status codes


Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 158


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.12.10 Configure the Inclusion Relationship Between Task


Groups
Operation URI Description

PUT /aaa/taskGroupIncludeMaps/ Configure the inclusion


taskGroupIncludeMap relationship between task
groups.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<taskGroupIncludeMap>
<taskGroupName>tg1</taskGroupName>
<includeTaskGroupName>manage-tg</includeTaskGroupName>
</taskGroupIncludeMap>

Table 3-257 describes elements in requests.

Table 3-257 Elements

Element Description

taskGroupN Specifies a task group name.


ame

includeTask Specifies the name of an included task group.


GroupName

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-258 describes status codes in responses.

Table 3-258 Status codes

Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 159


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.12.11 Configure the Mapping Between a Task Group and a Task


Operation URI Description

PUT /aaa/taskGroupTaskMaps/ Configure the mapping


taskGroupTaskMap between a task group and a
task.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<taskGroupTaskMap>
<taskGroupName>tg1</taskGroupName>
<taskName>aaa</taskName>
<read>enable</read>
</taskGroupTaskMap>

Table 3-259 describes elements in requests.

Table 3-259 Elements


Element Description

taskGroupN Specifies a task group name.


ame

taskName Specifies a task name.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-260 describes status codes in responses.

Table 3-260 Status codes


Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 160


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.12.12 Configure the Mapping Between User and Task Groups


Operation URI Description

PUT /aaa/userGroupTaskGroup- Configure the mapping


Maps/userGroupTaskGroup- between user and task
Map groups.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<userGroupTaskGroupMap>
<userGroupName>ug1</userGroupName>
<taskGroupName>tg1</taskGroupName>
</userGroupTaskGroupMap>

Table 3-261 describes elements in requests.

Table 3-261 Elements


Element Description

userGroupN Specifies a user group name.


ame

taskGroupN Specifies a task group name.


ame

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-262 describes status codes in responses.

Table 3-262 Status codes


Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 161


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.12.13 Configure an Authentication Template


Operation URI Description

POST /aaa/authenticationSchemes/ Configure an authentication


authenticationScheme template.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<authenticationScheme>
<authenSchemeName>auth1</authenSchemeName>
<firstAuthenMode>local</firstAuthenMode>
<secondAuthenMode>radius</secondAuthenMode>
<thirdAuthenMode>hwtacacs</thirdAuthenMode>
<fourthAuthenMode>none</fourthAuthenMode>
</authenticationScheme>

Table 3-263 describes elements in requests.

Table 3-263 Elements


Element Description

authenSche Specifies an authentication template name.


meName

firstAuthen Specifies the first authentication mode.


Mode

secondAuth Specifies the second authentication mode.


enMode

thirdAuthen Specifies the third authentication mode.


Mode

fourthAuthe Specifies the fourth authentication mode.


nMode

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-264 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 162


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-264 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.12.14 Configure an Authorization Template


Operation URI Description

POST /aaa/authorizationSchemes/ Configure an authorization


authorizationScheme template.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<authorizationScheme>
<authorSchemeName>author1</authorSchemeName>
<firstAuthorMode>local</firstAuthorMode>
<secondAuthorMode>if-authenticated</secondAuthorMode>
<thirdAuthorMode>hwtacacs</thirdAuthorMode>
<fourthAuthorMode>none</fourthAuthorMode>
<noLvlFirstCmdAuthor>local</noLvlFirstCmdAuthor>
<noLvlSecondCmdAuthor>hwtacacs</noLvlSecondCmdAuthor>
<Lvl0FirstCmdAuthor>local</Lvl0FirstCmdAuthor>
<Lvl0SecondCmdAuthor>hwtacacs</Lvl0SecondCmdAuthor>
<Lvl15FirstCmdAuthor>local</Lvl15FirstCmdAuthor>
<Lvl15SecondCmdAuthor>hwtacacs</Lvl15SecondCmdAuthor>
</authorizationScheme>

Table 3-265 describes elements in requests.

Table 3-265 Elements

Element Description

authorSche Specifies an authorization template name.


meName

firstAuthor Specifies the first authorization mode.


Mode

secondAuth Specifies the second authorization mode.


orMode

thirdAuthor Specifies the third authorization mode.


Mode

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 163


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

fourthAutho Specifies the fourth authorization mode.


rMode

noLvlFirstC Specifies the first authorization mode for users without having any
mdAuthor level configured.

noLvlSecon Specifies the second authorization mode for users without having any
dCmdAutho level configured.
r

Lvl0FirstC Specifies the first authorization mode for level-0 users.


mdAuthor

Lvl0Second Specifies the second authorization mode for level-0 users.


CmdAuthor

Lvl15FirstC Specifies the first authorization mode for level-15 users.


mdAuthor

Lvl15Secon Specifies the second authorization mode for level-15 users.


dCmdAutho
r

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-266 describes status codes in responses.

Table 3-266 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.12.15 Configure an Accounting Template


Operation URI Description

POST /aaa/accountingSchemes/accountingScheme Configure an accounting


template.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 164


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<accountingScheme>
<acctSchemeName>account1</acctSchemeName>
<accountingMode>none</accountingMode>
</accountingScheme>

Table 3-267 describes elements in requests.

Table 3-267 Elements


Element Description

acctScheme Specifies an accounting template name.


Name

accounting Specifies an accounting mode.


Mode

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-268 describes status codes in responses.

Table 3-268 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.12.16 Configure a Domain


Operation URI Description

POST /aaa/domains/domain Configure a domain.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<domain>
<domainName>dom1</domainName>
<authenSchemeName>auth1</authenSchemeName>
<authorSchemeName>author1</authorSchemeName>
<acctSchemeName>account1</acctSchemeName>
</domain>

Table 3-269 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 165


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-269 Elements


Element Description

domainNam Specifies a domain name.


e

authenSche Specifies an authentication solution name.


meName

authorSche Specifies an authorization solution name.


meName

acctScheme Specifies an accounting solution name.


Name

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-270 describes status codes in responses.

Table 3-270 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.12.17 Query Online User Information


Operation URI Description

GET /aaa/aliveUserQrys/ Query information about


aliveUserQry online users.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<aliveUserQry>
<userName></userName>
<userId></userId>
<userGroupName></userGroupName>
<domainName></domainName>
<accessType></accessType>
</aliveUserQry>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 166


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-271 describes elements in requests.

Table 3-271 Elements

Element Description

userName Specifies a user name.

userId Specifices a user ID.

userGroupN Specifies a user group name.


ame

domainNam Specifies a domain name.


e

accessType Specifies a user access type.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<aliveUserQrys>
<aliveUserQry>
<accessType>ssh</accessType>
<userName>huawei</userName>
<userGroupName>manage-ug</userGroupName>
<userId>14</userId>
<domainName>default_admin</domainName>
</aliveUserQry>

Table 3-272 describes elements in responses.

Table 3-272 Elements

Element Description

userName Specifies a user name.

userId Specifies a user ID.

userGroupN Specifies a user group name.


ame

domainNam Specifies a domain name.


e

accessType Specifies a user access type.

Table 3-273 describes status codes in responses.

Table 3-273 Status codes

Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 167


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.12.18 Configure a Local User


Operation URI Description

POST /aaa/lam/users/user Configure a local user.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<user>
<userName>user1@dom1</userName>
<isLoginAnytime>true</isLoginAnytime>
<userGroupName>manage-ug</userGroupName>
<userState>active</userState>
<password>Root@123</password>
<serviceTelnet>true</serviceTelnet>
</user>

Table 3-274 describes elements in requests.

Table 3-274 Elements


Element Description

userName Specifies a user name.

isLoginAny Specifies whether to allow a user to log in at any time.


time

userGroupN Specifies a user group name.


ame

userState Specifies the user status.

password Specifies a user password.

serviceTeln Specifies whether to allow for Telnet access.


et

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-275 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 168


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-275 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.12.19 Disconnect Online Users in a Specified Domain


Operation URI Description

POST /aaa/cutUserByDomain Disconnect online users in a


specified domain.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<cutUserByDomain>
<domainName>dom1</domainName>
</cutUserByDomain>

Table 3-276 describes elements in requests.

Table 3-276 Elements


Element Description

domainNam Specifies a domain name.


e

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-277 describes status codes in responses.

Table 3-277 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 169


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.12.20 Disconnect Online Users with Specified IDs


Operation URI Description

POST /aaa/cutUserByUserId Disconnect online users


with specified IDs.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<cutUserByUserId>
<beginUserId>43</beginUserId>
</cutUserByUserId>

Table 3-278 describes elements in requests.

Table 3-278 Elements


Element Description

beginUserId Specifies a start user ID.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-279 describes status codes in responses.

Table 3-279 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 170


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.12.21 Disconnect an Online User with a Specified Name


Operation URI Description

POST /aaa/cutUserByUserName Disconnect an online user


with a specified name.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<cutUserByUserName>
<userName>user1@dom1</userName>
</cutUserByUserName>

Table 3-280 describes elements in requests.

Table 3-280 Elements

Element Description

userName Specifies a user name.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-281 describes status codes in responses.

Table 3-281 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.12.22 Unlock a User Manually


Operatio URI Description
n

POST /aaa/reactivateUser Unlock a user manually if the user has been


locked due to consecutive login failures.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 171


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<reactivateUser>
<userName>user1@dom1</userName>
</reactivateUser>

Table 3-282 describes elements in requests.

Table 3-282 Elements


Element Description

userName Specifies a user name.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-283 describes status codes in responses.

Table 3-283 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.12.23 Change the Password of a Local Login User


Operatio URI Description
n

POST /aaa/changeMyPassword Change the password of a local login user.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<changeMyPassword>
<oldPassword>Root@123</oldPassword>
<newPassword>Good@123</newPassword>
</changeMyPassword>

Table 3-284 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 172


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-284 Elements


Element Description

oldPasswor Specifies an old password.


d

newPasswor Specifies a new password.


d

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-285 describes status codes in responses.

Table 3-285 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.12.24 Query Global User Management Statistics


Operation URI Description

GET /aaa/globalStatistic Query global user management statistics.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<globalStatistic>
<maxOnlineUserNum/>
<timeOfMaxOnlineNum/>
<maxAccountingUserNum/>
<timeOfMaxAccountingNum/>
</globalStatistic>

Table 3-286 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 173


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-286 Elements


Element Description

maxOnline Specifies the maximum number of online users.


UserNum

timeOfMax Specifies the time when the number of online users reached the
OnlineNum maximum number.

maxAccoun Specifies the maximum number of accounting users.


tingUserNu
m

timeOfMax Specifies the time when the number of accounting users reached the
Accounting maximum number.
Num

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<globalStatistic>
<maxOnlineUserNum>3</maxOnlineUserNum>
<timeOfMaxOnlineNum>2015-09-06T15:07:42</timeOfMaxOnlineNum>
<maxAccountingUserNum>0</maxAccountingUserNum>
<timeOfMaxAccountingNum/>
</globalStatistic>

Table 3-287 describes elements in responses.

Table 3-287 Elements


Element Description

maxOnline Specifies the maximum number of online users.


UserNum

timeOfMax Specifies the time when the number of online users reached the
OnlineNum maximum number.

maxAccoun Specifies the maximum number of accounting users.


tingUserNu
m

timeOfMax Specifies the time when the number of accounting users reached the
Accounting maximum number.
Num

Table 3-288 describes status codes in responses.

Table 3-288 Status codes


Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 174


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.12.25 Configure a Global Policy


Operation URI Description

PUT /aaa/globalPolicy Configure a global policy.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<globalPolicy>
<domainDelimiter>:</domainDelimiter>
<domainLocation>before-delimiter</domainLocation>
<domainParseDirection>right-to-left</domainParseDirection>
<defaultAdminDomain>dom1</defaultAdminDomain>
</globalPolicy>

Table 3-289 describes elements in requests.

Table 3-289 Elements


Element Description

domainDeli Specifies a domain name delimiter.


miter

domainLoca Specifies the location of a domain name.


tion

domainPars Specifies the parsing direction of a domain name.


eDirection

defaultAdm Specifies the default management domain.


inDomain

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-290 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 175


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-290 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.12.26 Configure a Character String Forbidden in System


Passwords
Operation URI Description

PUT /aaa/lam/ Configure a character string


forbiddenWordRules/ that is forbidden in system
forbiddenWordRule passwords.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<forbiddenWordRules>
<forbiddenWordRule>
<forbiddenWord>schema</forbiddenWord>
</forbiddenWordRule>
</forbiddenWordRules>

Table 3-291 describes elements in requests.

Table 3-291 Elements


Element Description

forbiddenW Specifies a forbidden character string.


ord

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-292 describes status codes in responses.

Table 3-292 Status codes


Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 176


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.13 User Access

3.13.1 DHCP

Enable Global DHCP


Operation URI Description

POST /dhcp/common/ Enable global DHCP.


dhcpCommonCfg

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<dhcpCommonCfg>
<dhcpEnable>true</dhcpEnable>
</dhcpCommonCfg>

Table 3-293 describes elements in requests.

Table 3-293 Elements


Element Description

dhcpEnable Indicates whether DHCP is enabled. This


element is mandatory.

l Response example (XML format)


<?xml version='1.0' encoding='UTF-8'?>
<ok/>

Table 3-294 describes status codes in responses.

Table 3-294 Status codes


Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 177


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.13.2 DHCP Relay

3.13.2.1 Create DHCP Relay Configuration

Create DHCP Relay Configuration


Operation URI Description

PUT /dhcp/relay/ Create a DHCP relay


dhcpRelayIfCfgs/ interface configuration.
dhcpRelayIfCfg

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<dhcpRelayIfCfg operation="create">
<interfaceName>Eth-Trunk1</interfaceName>
<isEnable>true</isEnable>
<isGateWayEnable>true</isGateWayEnable>
</dhcpRelayIfCfg>

Table 3-295 describes elements in requests.

Table 3-295 Elements

Element Description

interfaceName Specifies an interface name.

isEnable Specifies whether to enable DHCP relay.

isGateWayEnable Specifies whether to enable DHCP relay


gateway switching.

l Response example (XML format)


<?xml version='1.0' encoding='UTF-8'?>
<ok/>

Table 3-296 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 178


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-296 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Create DHCP Relay Server Group


Operation URI Description

POST /dhcp/relay/ Create a DHCP relay server


dhcpRelayServerGroups/ group.
dhcpRelayServerGroup

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<dhcpRelayServerGroup operation="create">
<serverGroupName>testgroup</serverGroupName>
<gateway>192.168.1.1</gateway>
<isUndoGateway>false</isUndoGateway>
</dhcpRelayServerGroup>

Table 3-297 describes elements in requests.

Table 3-297 Elements


Element Description

serverGroupName Specifies the name of a DHCP server


group.

gateway Specifies a gateway address.

isUndoGateway Specifies whether to delete the gateway


address configuration.

l Response example (XML format)


<?xml version='1.0' encoding='UTF-8'?>
<ok/>

Table 3-298 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 179


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-298 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.13.2.2 Query DHCP Relay Configurations

Query DHCP Relay Interface Configurations


Operation URI Description

GET /dhcp/relay/ Query DHCP relay interface


dhcpRelayIfCfgs/ configurations.
dhcpRelayIfCfg

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<dhcpRelayIfCfg>
<interfaceName></interfaceName>
<isEnable></isEnable>
<isGateWayEnable></isGateWayEnable>
</dhcpRelayIfCfg>

Table 3-299 describes elements in requests.

Table 3-299 Elements


Element Description

interfaceName Specifies an interface name.

isEnable Specifies whether to enable DHCP relay.

isGateWayEnable Specifies whether to enable DHCP relay


gateway switching.

l Response example (XML format)


<?xml version='1.0' encoding='UTF-8'?>
<dhcpRelayIfCfg>
<interfaceName>Eth-Trunk1</interfaceName>
<isEnable>true</isEnable>
<isGateWayEnable>true</isGateWayEnable>
</dhcpRelayIfCfg>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 180


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-300 describes elements in requests.

Table 3-300 Elements


Element Description

interfaceName Specifies an interface name.

isEnable Specifies whether to enable DHCP relay.

isGateWayEnable Specifies whether to enable DHCP relay


gateway switching.

Table 3-301 describes status codes in responses.

Table 3-301 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Query DHCP Relay Server Group


Operation URI Description

GET /dhcp/relay/ Query information about a


dhcpRelayServerGroups/ DHCP relay server group.
dhcpRelayServerGroup

Operation URI Description

GET /dhcp/relay/ Query information about a


dhcpRelayServerGroups/ DHCP relay server group.
dhcpRelayServerGroup

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<dhcpRelayServerGroup>
<serverGroupName></serverGroupName>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 181


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<gateway></gateway>
<isUndoGateway></isUndoGateway>
</dhcpRelayServerGroup>

Table 3-302 describes elements in requests.

Table 3-302 Elements


Element Description

serverGroupName Specifies the name of a DHCP server


group.

gateway Specifies a gateway address.

isUndoGateway Specifies whether to delete the gateway


address configuration.

l Response example (XML format)


<?xml version='1.0' encoding='UTF-8'?>
<dhcpRelayServerGroup>
<serverGroupName>testgroup</serverGroupName>
<gateway>192.168.1.1</gateway>
<isUndoGateway>false</isUndoGateway>
</dhcpRelayServerGroup>

Table 3-303 describes elements in requests.

Table 3-303 Elements


Element Description

serverGroupName Specifies the name of a DHCP server


group.

gateway Specifies a gateway address.

isUndoGateway Specifies whether to delete the gateway


address configuration.

Table 3-304 describes status codes in responses.

Table 3-304 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 182


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.13.2.3 Delete DHCP Relay Configurations

Delete DHCP Relay Interface Configurations


Operation URI Description

DELETE /dhcp/relay/ Delete DHCP relay interface


dhcpRelayIfCfgs/ configurations.
dhcpRelayIfCfg

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<dhcpRelayIfCfg operation="delete">
<interfaceName>Eth-Trunk1</interfaceName>
<isEnable>true</isEnable>
<isGateWayEnable>true</isGateWayEnable>
</dhcpRelayIfCfg>

Table 3-305 describes elements in requests.

Table 3-305 Elements


Element Description

interfaceName Specifies an interface name.

isEnable Specifies whether to enable DHCP relay.

isGateWayEnable Specifies whether to enable DHCP relay


gateway switching.

l Response example (XML format)


<?xml version='1.0' encoding='UTF-8'?>
<ok/>

Table 3-306 describes status codes in responses.

Table 3-306 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 183


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Delete DHCP Relay Server Group


Operation URI Description

DELETE /dhcp/relay/ Delete a DHCP relay server


dhcpRelayServerGroups/ group.
dhcpRelayServerGroup

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<dhcpRelayServerGroup operation="delete">
<serverGroupName>testgroup</serverGroupName>
<gateway>192.168.1.1</gateway>
<isUndoGateway>false</isUndoGateway>
</dhcpRelayServerGroup>

Table 3-307 describes elements in requests.

Table 3-307 Elements


Element Description

serverGroupName Specifies the name of a DHCP server


group.

gateway Specifies a gateway address.

isUndoGateway Specifies whether to delete the gateway


address configuration.

l Response example (XML format)


<?xml version='1.0' encoding='UTF-8'?>
<ok/>

Table 3-308 describes status codes in responses.

Table 3-308 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 184


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.13.2.4 Modify DHCP Relay Configurations

Modify DHCP Relay Interface Configurations


Operation URI Description

PUT↵ /dhcp/relay/ Modify DHCP relay


dhcpRelayIfCfgs/ interface configurations.
dhcpRelayIfCfg↵

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<dhcpRelayIfCfg operation="merge">
<interfaceName>Eth-Trunk1</interfaceName>
<isEnable>true</isEnable>
<isGateWayEnable>false</isGateWayEnable>
</dhcpRelayIfCfg>

Table 3-309 describes elements in requests.

Table 3-309 Elements

Element Description

interfaceName Specifies an interface name.

isEnable Specifies whether to enable DHCP relay.

isGateWayEnable Specifies whether to enable DHCP relay


gateway switching.

l Response example (XML format)


<?xml version='1.0' encoding='UTF-8'?>
<ok/>

Table 3-310 describes status codes in responses.

Table 3-310 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 185


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Modify DHCP Relay Server Group


Operation URI Description

PUT /dhcp/relay/ Modify a DHCP relay server


dhcpRelayServerGroups/ group.
dhcpRelayServerGroup

Operation URI Description

PUT /dhcp/relay/ Modify a DHCP relay server


dhcpRelayServerGroups/ group.
dhcpRelayServerGroup

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<dhcpRelayServerGroup operation="merge">
<serverGroupName>testgroup</serverGroupName>
<gateway>192.168.1.2</gateway>
<isUndoGateway>false</isUndoGateway>
</dhcpRelayServerGroup>

Table 3-311 describes elements in requests.

Table 3-311 Elements

Element Description

serverGroupName Specifies the name of a DHCP server


group.

gateway Specifies a gateway address.

isUndoGateway Specifies whether to delete the gateway


address configuration.

l Response example (XML format)


<?xml version='1.0' encoding='UTF-8'?>
<ok/>

Table 3-312 describes status codes in responses.

Table 3-312 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 186


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.13.3 PNP
Query Network Configurations
Operation URI Description

GET /pnp/netProvisionInfos/ Query network


netProvisionInfo configurations.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<netProvisionInfo>
<ifName/>
<ipAddr/>
<ipMask/>
<serverIpAddr/>
<tftpServerAddr/>
<tftpServerName/>
<bootfileName/>
</netProvisionInfo>

Table 3-313 describes elements in requests.

Table 3-313 Elements


Element Description

ifName Specifies the name of the interface to


which an IP address is assigned.

ipAddr Specifies an IP address obtained.

ipMask Specifies the mask of an IP address


obtained.

serverIpAddr Specifies the IP address of the server that


has assigned addresses to users.

tftpServerAddr Specifies the IP address of a TFTP server.

tftpServerName Specifies the name of a TFTP server.

bootfileName Specifies the name of a startup file.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 187


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<netProvisionInfos>
<netProvisionInfo>
<ifName>10GE1/0/1</ifName>
<ipAddr>10.2.2.254</ipAddr>
<ipMask>255.255.255.0</ipMask>
<serverIpAddr>10.2.2.2</serverIpAddr>
<tftpServerAddr>10.3.3.5</tftpServerAddr>
<tftpServerName>tftpserver</tftpServerName>
<domainName>domain-name</domainName>
<bootfileName>bootfile.py</bootfileName>
</netProvisionInfo>
</netProvisionInfos>
</rpc-reply>

Table 3-314 describes status codes in responses.

Table 3-314 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Query a DNS Address List


Operation URI Description

GET /pnp/netProvisionInfos/ Query a DNS address list.


netProvisionInfo/dnsLists

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<dnsLists>
<dnsList>
<dns/>
</dnsList>
</dnsLists>

Table 3-315 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 188


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-315 Elements


Element Description

dns Specifies a DNS address carried in a


DHCP response message. A maximum of
eight DNS addresses can be returned per
message.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<netProvisionInfos>
<netProvisionInfo>
<ifName>10GE1/0/1</ifName>
<dnsLists>
<dnsList>
<dns>10.3.2.3</dns>
</dnsList>
</dnsLists>
</netProvisionInfo>
</netProvisionInfos>

Table 3-316 describes status codes in responses.

Table 3-316 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Query a Gateway Address List


Operation URI Description

GET /pnp/netProvisionInfos/ Query a gateway address


netProvisionInfo/ list.
gatewayLists

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<gatewayLists>
<gatewayList>
<gateway/>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 189


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

</gatewayList>
</gatewayLists>

Table 3-317 describes elements in requests.

Table 3-317 Elements

Element Description

gateway Specifies a DNS address carried in a


DHCP response message. A maximum of
eight DNS addresses can be returned per
message.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<netProvisionInfos>
<netProvisionInfo>
<ifName>10GE1/0/1</ifName>
<gatewayLists>
<gatewayList>
<gateway>10.3.2.3</gateway>
</gatewayList>
</gatewayLists>
</netProvisionInfo>
</netProvisionInfos>

Table 3-318 describes status codes in responses.

Table 3-318 Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Start PNP
Operation URI Description

POST /pnp/startPnp Start PNP to obtain network


configurations.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 190


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<startPnp>
<mode>ZTP</mode>
<portType>MEth</portType>
</startPnp>

Table 3-319 describes elements in requests.

Table 3-319 Elements


Element Description

mode Specifies a PNP startup mode. Currently,


the value can only be ZTP.

portType Specifies a PnP-capable interface type.


The value can be:
l Meth
l Ethernet
l GigabitEthernet
l 10GE
l 40GE
l 100GE

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-320 describes status codes in responses.

Table 3-320 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 191


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Stop PNP
Operation URI Description

POST /pnp/stopPnp Stop PNP from obtaining


network configurations.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<stopPnp>
</stopPnp>

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-321 describes status codes in responses.

Table 3-321 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.13.4 OPS

3.13.4.1 Create/Delete a Channel That Executes Commands


Operation URI Description

PUT /cli/cliTerminal Create/delete a channel that


executes commands.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<cli>
<cliTerminal>
<channelId>13180</channelId>
<opType>2</opType>
<idle>10</idle>
<extendAAAAttr>43850</extendAAAAttr>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 192


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

</cliTerminal>
</cli>

Table 3-322 describes elements in a request.

Table 3-322 Elements


Element Description

channelId Specifies a channel ID.

opType l 1. Closes a channel.


l 2: Creates a channel.

idle Specifies an idle-cut timeout period.

extendAAAAttr Specifies the ID of a session that the AAA server allocates.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

l Table 3-323 describes status codes in a response.

Table 3-323 Description of status codes in a response


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.13.4.2 Query the Command Execution Result


Operation URI Description

GET /cli/cliTermResult Query the command


execution result.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<cliTermResult>
<status/>
<result/>
<output/>
</cliTermResult>

Table 1 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 193


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-324 Elements in requests

Element Description

status Specifies the command execution status.


l processing: The command is being executed.
l finished: The command execution is complete.

result Specifies the command execution result.

output Specifies the command execution output.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<cli>
<cliTermResult>
<status>finished</status>
<result>0</result>
<output></output>
</cliTermResult>
</cli>

Table 2 describes status codes in responses.

Table 3-325 Description of status codes in responses

Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.13.4.3 Execute a CLI Command


Operation URI Description

PUT /cli/cliTermExecute Execute a CLI command.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<cli>
<cliTermExecute>
<channelId>13180</channelId>
<command>reboot</command>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 194


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<prompt1>Warning: Current configuration will be saved to the next startup


saved-configuration file! Continue? [Y/N]:</prompt1>
<answer1>n</answer1>
<prompt2>System will reboot! Continue? [Y/N]:</prompt2>
<answer2>y</answer2>
</cliTermExecute>
</cli>

Table 3-326 describes elements in requests.

Table 3-326 Elements in requests

Element Description

channelId Specifies the channel ID of the command to be executed.

command Specifies the command to be executed.

prompt1 Specifies the string of a read interaction prompt for command


execution.

answer1 Specifies the automatically responded string when prompt 1 is read.

prompt2 Specifies the string of a read interaction prompt for command


execution.

answer2 Specifies the automatically responded string when prompt 2 is read.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-327 describes status codes in responses.

Table 3-327 Description of status codes in responses

Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.14 SNMP

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 195


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.14.1 SNMP Agent

3.14.1.1 Enable/Disable the SNMP Agent


Operation URI Description

PUT /snmp/agentCfg Enable/Disable the SNMP


agent.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<agentCfg>
<agentEnable>false</agentEnable>
</agentCfg>

Table 3-328 describes elements in requests.

Table 3-328 Elements


Element Description

agentEnable Specifies whether to enable the SNMP agent.


l true: Enable the SNMP agent.
l false: Disable the SNMP agent.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

l Table 3-329 describes status codes in responses.

Table 3-329 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 196


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.14.1.2 Query SNMP Agent Status


Operation URI Description

GET /snmp/agentCfg Query SNMP agent status.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<agentCfg>
<agentEnable/>
</agentCfg>

Table 3-330 describes elements in requests.

Table 3-330 Elements


Element Description

agentEnable Specifies whether the SNMP agent is


enabled.
l true: The SNMP agent is enabled.
l false: The SNMP agent is disabled.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<agentCfg>
<agentEnable>true</agentEnable>
</agentCfg>

Table 3-331 describes elements in responses.

Table 3-331 Elements


Element Description

agentEnable Specifies whether the SNMP agent is


enabled.
l true: The SNMP agent is enabled.
l false: The SNMP agent is disabled.

Table 3-332 describes status codes in responses.

Table 3-332 Status codes


Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 197


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.2 SNMP Engine ID

3.14.2.1 Configure an SNMP Engine ID


Operation URI Description

PUT /snmp/engine Configure an SNMP engine


ID.

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<engine>
<version>all</version>
<engineID>abc11111111</engineID>
<engineMaxMessageSize>11150</engineMaxMessageSize>
</engine>

Table 3-333 describes elements in requests.

Table 3-333 Elements


Element Description

version Specifies an SNMP version.

engineID Specifies an SNMP engine ID.

engineMax Specifies the maximum size of an SNMP packet that can be received
MessageSiz and sent by a device.
e

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-334 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 198


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-334 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.2.2 Query an SNMP Engine ID


Operation URI Description

GET /snmp/engine Query an SNMP engine ID.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<engine>
<version/>
<engineID/>
<engineMaxMessageSize/>
</engine>

Table 3-335 describes elements in requests.

Table 3-335 Elements

Element Description

version Specifies an SNMP version.

engineID Specifies an SNMP engine ID.

engineMax Specifies the maximum size of an SNMP packet that can be received
MessageSiz and sent by a device.
e

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<engine>
<version>all</version>
<engineID>800007DB03D8490BB5E087</engineID>
<engineMaxMessageSize>12000</engineMaxMessageSize>
</engine>

Table 3-336 describes elements in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 199


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-336 Elements


Element Description

version Specifies an SNMP version.

engineID Specifies an SNMP engine ID.

engineMax Specifies the maximum size of an SNMP packet that can be received
MessageSiz and sent by a device.
e

Table 3-337 describes status codes in responses.

Table 3-337 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.3 SNMP System Parameter

3.14.3.1 Modify SNMP System Parameters


Operation URI Description

PUT /snmp/systemCfg Modify SNMP system


parameters.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<systemCfg>
<trapSourceInterfaceName>LoopBack0</trapSourceInterfaceName>
<informTimeout>15</informTimeout>
<informResendTimes>3</informResendTimes>
<informPendNumber>39</informPendNumber>
<snmpPacketPriority>6</snmpPacketPriority>
<trapPacketPriority>6</trapPacketPriority>
<acl>2000</acl>
<snmpListenPort>10000</snmpListenPort>
<trapListenPort>20000</trapListenPort>
<communityComplexityCheck>true</communityComplexityCheck>
<usmUserComplexityCheck>true</usmUserComplexityCheck>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 200


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<setCacheEnable>false</setCacheEnable>
<localUserComplexityCheck>true</localUserComplexityCheck>
</systemCfg>

Table 3-338 describes elements in requests.

Table 3-338 Elements


Element Description

trapSourceI Specifies a source interface name for trap packets.


nterfaceNa
me

informTime Specifies a timeout period for Inform packets.


out

informRese Specifies the number of Inform packet retransmission times.


ndTimes

informPend Specifies the number of Inform packets for which the NMS will return
Number ACK response packets.

snmpPacket Specifies the priority of SNMP packets, excluding alarm packets.


Priority

trapPacketP Specifies the priority of SNMP alarm packets.


riority

acl Specifies an ACL list.

snmpListen Specifies a UDP port through which a device is connected to the NMS
Port using SNMP.

trapListenP Specifies a trap packet listening port.


ort

community Specifies whether to enable the function of checking community name


Complexity complexity.
Check

usmUserCo Specifies whether to enable the function of checking SNMPv3 user


mplexityCh password complexity.
eck

setCacheEn Specifies whether to enable the function of buffering SNMP Set


able packets.

localUserCo Specifies whether to enable the function of checking local user


mplexityCh password complexity.
eck

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-339 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 201


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-339 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.3.2 Query SNMP System Parameters


Operation URI Description

GET /snmp/systemCfg Query SNMP system


parameters.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<systemCfg>
<trapSourceInterfaceName/>
<informTimeout/>
<informResendTimes/>
<informPendNumber/>
<snmpPacketPriority/>
<trapPacketPriority/>
<snmpListenPort/>
<trapListenPort/>
<acl/>
<communityComplexityCheck/>
<usmUserComplexityCheck/>
<setCacheEnable/>
<localUserComplexityCheck/>
</systemCfg>

Table 3-340 describes elements in requests.

Table 3-340 Elements


Element Description

trapSourceI Specifies a source interface name for trap packets.


nterfaceNa
me

informTime Specifies a timeout period for Inform packets.


out

informRese Specifies the number of Inform packet retransmission times.


ndTimes

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 202


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

informPend Specifies the number of Inform packets for which the NMS will return
Number ACK response packets.

snmpPacket Specifies the priority of SNMP packets, excluding alarm packets.


Priority

trapPacketP Specifies the priority of SNMP alarm packets.


riority

acl Specifies an ACL list.

snmpListen Specifies a UDP port through which a device is connected to the NMS
Port using SNMP.

trapListenP Specifies a trap packet listening port.


ort

community Specifies whether the function of checking community name


Complexity complexity is enabled.
Check

usmUserCo Specifies whether the function of checking SNMPv3 user password


mplexityCh complexity is enabled.
eck

setCacheEn Specifies whether the function of buffering SNMP Set packets is


able enabled.

localUserCo Specifies whether the function of checking local user password


mplexityCh complexity is enabled.
eck

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<systemCfg>
<trapSourceInterfaceName/>
<informTimeout>15</informTimeout>
<informResendTimes>3</informResendTimes>
<informPendNumber>39</informPendNumber>
<snmpPacketPriority>6</snmpPacketPriority>
<trapPacketPriority>6</trapPacketPriority>
<acl/>
<snmpListenPort>161</snmpListenPort>
<trapListenPort>0</trapListenPort>
<communityComplexityCheck>false</communityComplexityCheck>
<usmUserComplexityCheck>true</usmUserComplexityCheck>
<setCacheEnable>false</setCacheEnable>
<localUserComplexityCheck>true</localUserComplexityCheck>
</systemCfg>

Table 3-341 describes elements in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 203


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-341 Elements


Element Description

trapSourceI Specifies a source interface name for trap packets.


nterfaceNa
me

informTime Specifies a timeout period for Inform packets.


out

informRese Specifies the number of Inform packet retransmission times.


ndTimes

informPend Specifies the number of Inform packets for which the NMS will return
Number ACK response packets.

snmpPacket Specifies the priority of SNMP packets, excluding alarm packets.


Priority

trapPacketP Specifies the priority of SNMP alarm packets.


riority

acl Specifies an ACL list.

snmpListen Specifies a UDP port through which a device is connected to the NMS
Port using SNMP.

trapListenP Specifies a trap packet listening port.


ort

community Specifies whether the function of checking community name


Complexity complexity is enabled.
Check

usmUserCo Specifies whether the function of checking SNMPv3 user password


mplexityCh complexity is enabled.
eck

setCacheEn Specifies whether the function of buffering SNMP Set packets is


able enabled.

localUserCo Specifies whether the function of checking local user password


mplexityCh complexity is enabled.
eck

Table 3-342 describes status codes in responses.

Table 3-342 Status codes


Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 204


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.4 SNMP Blacklist Feature

3.14.4.1 Configure the SNMP Blacklist Feature


Operation URI Description

PUT /snmp/blackListCfg Configure the SNMP


blacklist feature.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<blackListCfg>
<blockIpEnable>false</blockIpEnable>
<blockUserEnable>false</blockUserEnable>
<blockUserFailureCount>2</blockUserFailureCount>
<blockUserPeriod>2</blockUserPeriod>
<blockUserReactiveTime>5</blockUserReactiveTime>
</blackListCfg>

Table 3-343 describes elements in requests.

Table 3-343 Elements


Element Description

blockIpEna Specifies whether to enable the blacklist function for IP addresses.


ble

blockUserE Specifies whether to enable the blacklist function for users.


nable

blockUserF Specifies the maximum number of consecutive authentication failures


ailureCount allowed for an SNMPv3 user.

blockUserP Specifies a period after which a user is locked due to consecutive login
eriod failures.

blockUserR Specifies the locking period of an SNMPv3 user if the number of the
eactiveTime user's authentication failures exceeds a specified value. By default, an
SNMPv3 user is locked for 5 minutes.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 205


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-344 describes status codes in responses.

Table 3-344 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.4.2 Obtain SNMP Blacklist Configurations


Operation URI Description

GET /snmp/blackListCfg Obtain SNMP blacklist


configurations.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<blackListCfg>
<blockIpEnable></blockIpEnable>
<blockUserEnable></blockUserEnable>
<blockUserFailureCount></blockUserFailureCount>
<blockUserPeriod></blockUserPeriod>
<blockUserReactiveTime></blockUserReactiveTime>
</blackListCfg>

Table 3-345 describes elements in requests.

Table 3-345 Elements

Element Description

blockIpEna Specifies whether the blacklist function for IP addresses is enabled.


ble

blockUserE Specifies whether the blacklist function for users is enabled.


nable

blockUserF Specifies the maximum number of consecutive authentication failures


ailureCount allowed for an SNMPv3 user.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 206


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

blockUserP Specifies a period after which a user is locked due to consecutive login
eriod failures.

blockUserR Specifies the locking period of an SNMPv3 user if the number of the
eactiveTime user's authentication failures exceeds a specified value. By default, an
SNMPv3 user is locked for 5 minutes.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<blackListCfg>
<blockIpEnable>false</blockIpEnable>
<blockUserEnable>false</blockUserEnable>
<blockUserFailureCount>2</blockUserFailureCount>
<blockUserPeriod>2</blockUserPeriod>
<blockUserReactiveTime>5</blockUserReactiveTime>
</blackListCfg>

Table 3-346 describes elements in responses.

Table 3-346 Elements

Element Description

blockIpEna Specifies whether the blacklist function for IP addresses is enabled.


ble

blockUserE Specifies whether the blacklist function for users is enabled.


nable

blockUserF Specifies the maximum number of consecutive authentication failures


ailureCount allowed for an SNMPv3 user.

blockUserP Specifies a period after which a user is locked due to consecutive login
eriod failures.

blockUserR Specifies the locking period of an SNMPv3 user if the number of the
eactiveTime user's authentication failures exceeds a specified value. By default, an
SNMPv3 user is locked for 5 minutes.

Table 3-347 describes status codes in responses.

Table 3-347 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 207


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.5 SNMP Notification Log Parameters

3.14.5.1 Modify SNMP Notification Log Parameters


Operation URI Description

PUT /snmp/notificationCfg Modify SNMP notification


log parameters.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<notificationCfg>
<notificationLogEnable>true</notificationLogEnable>
<notificationGlobalAgeOut>34</notificationGlobalAgeOut>
<notificationGlobalLimit>100</notificationGlobalLimit>
</notificationCfg>

Table 3-348 describes elements in requests.

Table 3-348 Elements

Element Description

notification Specifies whether to enable the SNMP notification log function.


LogEnable

notification Specifies the aging time of an SNMP notification log.


GlobalAge
Out

notification Specifies the maximum number of notification logs that can be stored
GlobalLimit in the log buffer area.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-349 describes status codes in responses.

Table 3-349 Status codes

Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 208


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.5.2 Query SNMP Notification Log Parameters


Operation URI Description

GET /snmp/notificationCfg Query SNMP notification


log parameters.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<notificationCfg>
<notificationLogEnable/>
<notificationGlobalAgeOut/>
<notificationGlobalLimit/>
</notificationCfg>

Table 3-350 describes elements in requests.

Table 3-350 Elements

Element Description

notification Specifies whether the SNMP notification log function is enabled.


LogEnable

notification Specifies the aging time of an SNMP notification log.


GlobalAge
Out

notification Specifies the maximum number of notification logs that can be stored
GlobalLimit in the log buffer area.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<notificationCfg>
<notificationLogEnable>true</notificationLogEnable>
<notificationGlobalAgeOut>34</notificationGlobalAgeOut>
<notificationGlobalLimit>100</notificationGlobalLimit>
</notificationCfg>

Table 3-351 describes elements in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 209


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-351 Elements

Element Description

notification Specifies whether the SNMP notification log function is enabled.


LogEnable

notification Specifies the aging time of an SNMP notification log.


GlobalAge
Out

notification Specifies the maximum number of notification logs that can be stored
GlobalLimit in the log buffer area.

Table 3-352 describes status codes in responses.

Table 3-352 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.6 MIB View

3.14.6.1 Create a MIB View


Operation URI Description

POST /snmp/mibViews/mibView Create a MIB view.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<mibViews>
<mibView>
<viewName>MIBVIEW1MIBVIEW1MIBVIEW1MIBVIEW1</viewName>
<subtree>internet</subtree>
<type>included</type>
</mibView>
</mibViews>

Table 3-353 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 210


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-353 Elements


Element Description

viewName Specifies a MIB view name.

subtree Specifies a MIB subtree name.

type Specifies a filtering type.


l included: The MIB subtree is included.
l excluded: The MIB subtree is excluded.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-354 describes status codes in responses.

Table 3-354 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.6.2 Query MIB View Information


Operation URI Description

GET /snmp/mibViews/mibView Query MIB view


information.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<mibView>
<viewName></viewName>
<subtree></subtree>
<type></type>
</mibView>

Table 3-355 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 211


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-355 Elements

Element Description

viewName Specifies a MIB view name.

subtree Specifies a MIB subtree name.

type Specifies a filtering type.


l included: The MIB subtree is included.
l excluded: The MIB subtree is excluded.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<mibView>
<viewName>x</viewName>
<subtree>internet</subtree>
<type>excluded</type>
</mibView>

Table 3-356 describes elements in responses.

Table 3-356 Elements

Element Description

viewName Specifies a MIB view name.

subtree Specifies a MIB subtree name.

type Specifies a filtering type.


l included: The MIB subtree is included.
l excluded: The MIB subtree is excluded.

Table 3-357 describes status codes in responses.

Table 3-357 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 212


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.14.6.3 Modify a MIB View


Operation URI Description

PUT /snmp/mibViews/mibView Modify a MIB view.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<mibViews>
<mibView>
<viewName>helloworld </viewName>
<subtree>internet</subtree>
<type>excluded</type>
</mibView>
</mibViews>

Table 3-358 describes elements in requests.

Table 3-358 Elements


Element Description

viewName Specifies a MIB view name.

subtree Specifies a MIB subtree name.

type Specifies a filtering type.


l included: The MIB subtree is included.
l excluded: The MIB subtree is excluded.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-359 describes status codes in responses.

Table 3-359 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 213


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.14.6.4 Delete a MIB View


Operation URI Description

DELETE /snmp/mibViews/mibView Delete a MIB view.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<mibView operation="delete">
<viewName>x</viewName>
<subtree>internet</subtree>
<type>included</type>
</mibView>

Table 3-360 describes elements in requests.

Table 3-360 Elements

Element Description

viewName Specifies a MIB view name.

subtree Specifies a MIB subtree name.

type Specifies a filtering type.


l included: The MIB subtree is included.
l excluded: The MIB subtree is excluded.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-361 describes status codes in responses.

Table 3-361 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.7 SNMPv1/SNMPv2c Community Name

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 214


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.14.7.1 Create an SNMPv1/SNMPv2c Community Name


Operation URI Description

POST /snmp/communitys/ Create an SNMPv1/


community SNMPv2c community
name.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<community>
<communityName>community_write</communityName>
<accessRight>write</accessRight>
<mibViewName>internet</mibViewName>
<aclNumber>2323</aclNumber>
</community>

Table 3-362 describes elements in requests.

Table 3-362 Elements

Element Description

community Specifies an SNMPv1/SNMPv2c community name.


Name

accessRight Specifies the access permission.

mibViewNa Specifies the name of the MIB view that can be accessed by the
me community name.

aclNumber Specifies an ACL number.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-363 describes status codes in responses.

Table 3-363 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 215


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.14.7.2 Query an SNMPv1/SNMPv2c Community Name


Operation URI Description

GET /snmp/communitys/ Query an SNMPv1/


community SNMPv2c community
name.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<community>
<communityName/>
<accessRight/>
<mibViewName/>
<aclNumber/>
</community>

Table 3-364 describes elements in requests.

Table 3-364 Elements


Element Description

community Specifies an SNMPv1/SNMPv2c community name.


Name

accessRight Specifies the access permission.

mibViewNa Specifies the name of the MIB view that can be accessed by the
me community name.

aclNumber Specifies an ACL number.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<community>
<communityName>******</communityName>
<accessRight>read</accessRight>
<mibViewName>iso</mibViewName>
<aclNumber/>
</community>

Table 3-365 describes elements in responses.

Table 3-365 Elements


Element Description

community Specifies an SNMPv1/SNMPv2c community name.


Name

accessRight Specifies the access permission.

mibViewNa Specifies the name of the MIB view that can be accessed by the
me community name.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 216


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

aclNumber Specifies an ACL number.

Table 3-366 describes status codes in responses.

Table 3-366 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.7.3 Modify an SNMPv1/SNMPv2c Community Name


Operation URI Description

PUT /snmp/communitys/ Modify an SNMPv1/


community SNMPv2c community
name.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<community>
<communityName>community_write</communityName>
<accessRight>write</accessRight>
<mibViewName>internet</mibViewName>
<aclNumber>2323</aclNumber>
</community>

Table 3-367 describes elements in requests.

Table 3-367 Elements

Element Description

community Specifies an SNMPv1/SNMPv2c community name.


Name

accessRight Specifies the access permission.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 217


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

mibViewNa Specifies the name of the MIB view that can be accessed by the
me community name.

aclNumber Specifies an ACL number.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-368 describes status codes in responses.

Table 3-368 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.7.4 Delete an SNMPv1/SNMPv2c Community Name


Operation URI Description

DELETE /snmp/communitys/ Delete an SNMPv1/


community SNMPv2c community
name.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<community>
<communityName>community_write</communityName>
<accessRight>write</accessRight>
<mibViewName>internet</mibViewName>
<aclNumber>2323</aclNumber>
</community>

Table 3-369 describes elements in requests.

Table 3-369 Elements


Element Description

community Specifies an SNMPv1/SNMPv2c community name.


Name

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 218


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

accessRight Specifies the access permission.

mibViewNa Specifies the name of the MIB view that can be accessed by the
me community name.

aclNumber Specifies an ACL number.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-370 describes status codes in responses.

Table 3-370 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.8 SNMPv3 Group

3.14.8.1 Create an SNMPv3 Group


Operation URI Description

POST /snmp/snmpv3Groups/ Create an SNMPv3 group.


snmpv3Group

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<snmpv3Group>
<groupName>1</groupName>
<securityLevel>privacy</securityLevel>
<readViewName>internet</readViewName>
<notifyViewName>internet</notifyViewName>
<aclNumber>2999</aclNumber>
</snmpv3Group>

Table 3-371 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 219


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-371 Elements


Element Description

groupName Specifies an SNMPv3 group name.

securityLev Specifies a security level.


el

readViewNa Specifies the name of a read-only MIB view.


me

NotifyView Specifies a notified MIB view name.


Name

aclNumber Specifies an ACL number.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-372 describes status codes in responses.

Table 3-372 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.8.2 Query an SNMPv3 Group


Operation URI Description

GET /snmp/snmpv3Groups/ Query an SNMPv3 group.


snmpv3Group

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<snmpv3Group>
<groupName/>
<securityLevel/>
<readViewName/>
<writeViewName/>
<notifyViewName/>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 220


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<aclNumber/>
</snmpv3Group>
Table 3-373 describes elements in requests.

Table 3-373 Elements


Element Description

groupName Specifies an SNMPv3 group name.

securityLev Specifies a security level.


el

readViewNa Specifies the name of a read-only MIB view.


me

writeViewN Specifies the name of a read/write MIB view.


ame

NotifyView Specifies a notified MIB view name.


Name

aclNumber Specifies an ACL number.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<snmpv3Group>
<groupName>abc</groupName>
<securityLevel>noAuthNoPriv</securityLevel>
<readViewName>ViewDefault</readViewName>
<writeViewName/>
<notifyViewName/>
<aclNumber>2000</aclNumber>
</snmpv3Group>
Table 3-374 describes elements in responses.

Table 3-374 Elements


Element Description

groupName Specifies an SNMPv3 group name.

securityLev Specifies a security level.


el

readViewNa Specifies the name of a read-only MIB view.


me

writeViewN Specifies the name of a read/write MIB view.


ame

NotifyView Specifies a notified MIB view name.


Name

aclNumber Specifies an ACL number.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 221


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-375 describes status codes in responses.

Table 3-375 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.8.3 Modify an SNMPv3 Group


Operation URI Description

PUT /snmp/snmpv3Groups/ Modify an SNMPv3 group.


snmpv3Group

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<snmpv3Group>
<groupName>1</groupName>
<securityLevel>privacy</securityLevel>
<readViewName>internet</readViewName>
<notifyViewName>internet</notifyViewName>
<aclNumber>2999</aclNumber>
</snmpv3Group>

Table 3-376 describes elements in requests.

Table 3-376 Elements

Element Description

groupName Specifies an SNMPv3 group name.

securityLev Specifies a security level.


el

readViewNa Specifies the name of a read-only MIB view.


me

NotifyView Specifies a notified MIB view name.


Name

aclNumber Specifies an ACL number.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 222


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-377 describes status codes in responses.

Table 3-377 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.8.4 Delete an SNMPv3 Group


Operation URI Description

DELETE /snmp/snmpv3Groups/ Delete an SNMPv3 group.


snmpv3Group

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<snmpv3Group>
<groupName>1</groupName>
<securityLevel>privacy</securityLevel>
<readViewName>internet</readViewName>
<notifyViewName>internet</notifyViewName>
<aclNumber>2999</aclNumber>
</snmpv3Group>

Table 3-378 describes elements in requests.

Table 3-378 Elements

Element Description

groupName Specifies an SNMPv3 group name.

securityLev Specifies a security level.


el

readViewNa Specifies the name of a read-only MIB view.


me

NotifyView Specifies a notified MIB view name.


Name

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 223


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

aclNumber Specifies an ACL number.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-379 describes status codes in responses.

Table 3-379 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.9 SNMPv3 User

3.14.9.1 Create an SNMPv3 User


Operation URI Description

POST /snmp/usmUsers/usmUser Create an SNMPv3 user.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<usmUser>
<userName>1002</userName>
<remoteEngineID>false</remoteEngineID>
<engineID>1111111111</engineID>
<groupName>1001</groupName>
<authProtocol>md5</authProtocol>
<authKey>1234qwer</authKey>
<privProtocol>des56</privProtocol>
<privKey>1234qwer</privKey>
<aclNumber>2000</aclNumber>
</usmUser>

Table 3-380 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 224


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-380 Elements


Element Description

userName Specifies an SNMPv3 user name.

remoteEngi Specifies a remote engine ID.


neID

engineID Specifies a local engine ID.

groupName Specifies the name of an SNMPv3 user group.

authProtoco Specifies an authentication mode.


l

authKey Specifies an authentication key.

privProtocol Specifies an encryption mode.

privKey Specifies an encryption key.

aclNumber Specifies an ACL number.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-381 describes status codes in responses.

Table 3-381 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.9.2 Query SNMPv3 User Configurations


Operation URI Description

GET /snmp/usmUsers/usmUser Query SNMPv3 user


configurations.

l Request example

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 225


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<?xml version="1.0" encoding="UTF-8"?>


<usmUser>
<userName/>
<remoteEngineID/>
<engineID/>
<groupName/>
<authProtocol/>
<authKey/>
<privProtocol/>
<privKey/>
<aclNumber/>
<activeStatus/>
<leftLockTime/>
</usmUser>
Table 3-382 describes elements in requests.

Table 3-382 Elements


Element Description

userName Specifies an SNMPv3 user name.

remoteEngi Specifies a remote engine ID.


neID

engineID Specifies an SNMP engine ID.

groupName Specifies the group to which an SNMPv3 user belongs.

authProtoco Specifies an authentication mode.


l

authKey Specifies an authentication key.

privProtocol Specifies an encryption mode.

privKey Specifies an encryption key.

aclNumber Specifies an ACL number.

activeStatus Specifies whether a user is locked.

leftLockTim Specifies the remaining time before a user is unlocked.


e

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<usmUser>
<userName>abc9</userName>
<remoteEngineID>true</remoteEngineID>
<engineID>333333333333333303</engineID>
<groupName/>
<authProtocol>noAuth</authProtocol>
<authKey/>
<privProtocol>noPriv</privProtocol>
<privKey/>
<aclNumber>2001</aclNumber>
<activeStatus>Active</activeStatus>
<leftLockTime/>
</usmUser>
Table 3-383 describes elements in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 226


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-383 Elements

Element Description

userName Specifies an SNMPv3 user name.

remoteEngi Specifies a remote engine ID.


neID

engineID Specifies an SNMP engine ID.

groupName Specifies the group to which an SNMPv3 user belongs.

authProtoco Specifies an authentication mode.


l

authKey Specifies an authentication key.

privProtocol Specifies an encryption mode.

privKey Specifies an encryption key.

aclNumber Specifies an ACL number.

activeStatus Specifies whether a user is locked.

leftLockTim Specifies the remaining time before a user is unlocked.


e

Table 3-384 describes status codes in responses.

Table 3-384 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.9.3 Modify SNMPv3 User Parameters


Operation URI Description

PUT /snmp/usmUsers/usmUser Modify SNMPv3 user


parameters.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 227


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<usmUser>
<userName>abc6</userName>
<remoteEngineID>false</remoteEngineID>
<engineID>800007DB03D8490BB5E087</engineID>
<authProtocol>md5</authProtocol>
<authKey>******</authKey>
</usmUser>

Table 3-385 describes elements in requests.

Table 3-385 Elements


Element Description

userName Specifies an SNMPv3 user name.

remoteEngi Specifies a remote engine ID.


neID

engineID Specifies an SNMP engine ID.

groupName Specifies the group to which an SNMPv3 user belongs.

authProtoco Specifies an authentication mode.


l

authKey Specifies an authentication key.

privProtocol Specifies an encryption mode.

privKey Specifies an encryption key.

aclNumber Specifies an ACL number.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-386 describes status codes in responses.

Table 3-386 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 228


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.14.9.4 Delete an SNMPv3 User from a User Group


Operation URI Description

DELETE /snmp/usmUsers/usmUser Delete an SNMPv3 user


from a user group.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<usmUser operation="delete">
<userName>abc7</userName>
<remoteEngineID>false</remoteEngineID>
<engineID>800007DB03D8490BB5E087</engineID>
</usmUser>

Table 3-387 describes elements in requests.

Table 3-387 Elements


Element Description

userName Specifies an SNMPv3 user name.

remoteEngi Specifies a remote engine ID.


neID

engineID Specifies an SNMP engine ID.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-388 describes status codes in responses.

Table 3-388 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.10 SNMPv3 Local User

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 229


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.14.10.1 Create an SNMPv3 Local User


Operation URI Description

POST /snmp/localUsers/localUser Create an SNMPv3 local


user.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<localUser>
<userName>rootabc</userName>
<authProtocol>md5</authProtocol>
<authKey>1234qwer</authKey>
<privProtocol>des56</privProtocol>
<privKey>1234qwer</privKey>
</localUser>

Table 3-389 describes elements in requests.

Table 3-389 Elements

Element Description

userName Specifies an SNMPv3 user name.

authProtoco Specifies an authentication mode.


l

authKey Specifies an authentication key.

privProtocol Specifies an encryption mode.

privKey Specifies an encryption key.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-390 describes status codes in responses.

Table 3-390 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 230


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.14.10.2 Query the Parameter Settings of an SNMPv3 Local User


Operation URI Description

GET /snmp/localUsers/localUser Query the parameter settings


of an SNMPv3 local user.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<localUser>
<userName/>
<authProtocol/>
<authKey/>
<privProtocol/>
<privKey/>
<activeStatus/>
<leftLockTime/>
</localUser>

Table 3-391 describes elements in requests.

Table 3-391 Elements


Element Description

userName Specifies an SNMPv3 user name.

authProtoco Specifies an authentication mode.


l

authKey Specifies an authentication key.

privProtocol Specifies an encryption mode.

privKey Specifies an encryption key.

activeStatus Specifies whether a user is locked.

leftLockTim Specifies the remaining time before a user is unlocked.


e

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<localUser>
<userName>abc</userName>
<authProtocol>md5</authProtocol>
<authKey/>
<privProtocol>des56</privProtocol>
<privKey/>
<activeStatus>Active</activeStatus>
<leftLockTime/>
</localUser>

Table 3-392 describes elements in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 231


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-392 Elements


Element Description

userName Specifies an SNMPv3 user name.

authProtoco Specifies an authentication mode.


l

authKey Specifies an authentication key.

privProtocol Specifies an encryption mode.

privKey Specifies an encryption key.

activeStatus Specifies whether a user is locked.

leftLockTim Specifies the remaining time before a user is unlocked.


e

Table 3-393 describes status codes in responses.

Table 3-393 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.10.3 Modify an SNMPv3 Local User


Operation URI Description

PUT /snmp/localUsers/localUser Modify an SNMPv3 local


user.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<localUser>
<userName>rootabc</userName>
<authProtocol>md5</authProtocol>
<authKey>1234qwer</authKey>
<privProtocol>des56</privProtocol>
<privKey>1234qwer</privKey>
</localUser>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 232


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-394 describes elements in requests.

Table 3-394 Elements


Element Description

userName Specifies an SNMPv3 user name.

authProtoco Specifies an authentication mode.


l

authKey Specifies an authentication key.

privProtocol Specifies an encryption mode.

privKey Specifies an encryption key.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-395 describes status codes in responses.

Table 3-395 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.10.4 Delete an SNMPv3 Local User


Operation URI Description

DELETE /snmp/localUsers/localUser Delete an SNMPv3 local


user.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<localUser>
<userName>rootabc</userName>
<authProtocol>md5</authProtocol>
<authKey>1234qwer</authKey>
<privProtocol>des56</privProtocol>
<privKey>1234qwer</privKey>
</localUser>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 233


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-396 describes elements in requests.

Table 3-396 Elements


Element Description

userName Specifies an SNMPv3 user name.

authProtoco Specifies an authentication mode.


l

authKey Specifies an authentication key.

privProtocol Specifies an encryption mode.

privKey Specifies an encryption key.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-397 describes status codes in responses.

Table 3-397 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.11 SNMP Target Host

3.14.11.1 Create an SNMP Target Host


Operation URI Description

POST /snmp/targetHosts/ Create a Trap or Inform


targetHost target host.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<targetHost>
<nmsName>2</nmsName>
<address>10.1.1.1</address>
<portNumber>162</portNumber>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 234


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<vpnInstanceName>_public_</vpnInstanceName>
<securityName>public</securityName>
<securityNameV3></securityNameV3>
<securityModel>v2c</securityModel>
<securityLevel>noAuthNoPriv</securityLevel>
<notifyType>inform</notifyType>
<domain>snmpUDPDomain</domain>
<targetInformTimeout>15</targetInformTimeout>
<targetInformResendTimes>3</targetInformResendTimes>
<private-netmanager>false</private-netmanager>
<ext-vb>false</ext-vb>
<interface-name>LoopBack0</interface-name>
<notifyFltrPrName></notifyFltrPrName>
<isPublicNet>false</isPublicNet>
</targetHost>

Table 3-398 describes elements in requests.

Table 3-398 Elements


Element Description

nmsName Specifies the name of an SNMP target host.

address Specifies the address of an SNMP target host.

portNumber Specifies a UDP port number.

vpnInstance Specifies a VPN instance name.


Name

securityNa Specifies a security name for an SNMPv1/SNMPv2c user.


me

securityNa Specifies a security name for an SNMPv3 user.


meV3

securityMo Specifies an SNMP security model.


del

securityLev Specifies an SNMP security level.


el

notifyType Specifies a packet type.

domain Specifies a transport protocol.

targetInfor Specifies a timeout period for Inform packets.


mTimeout

targetInfor Specifies the maximum number of Inform packet retransmission times.


mResendTi
mes

private- Specifies whether the target host that receives trap packets is a Huawei
netmanager NMS.

ext-vb Specifies whether to carry extended bound variables in alarms sent to a


target host.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 235


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

interface- Specifies an interface name.


name

notifyFltrPr Specifies a notification filtering template.


Name

isPublicNet Specifies whether to connect to a target host through the public


network.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-399 describes status codes in responses.

Table 3-399 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.11.2 Query the Configurations of an SNMP Target Host


Operation URI Description

GET /snmp/targetHosts/ Query the configurations of


targetHost an SNMP target host.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<targetHost>
<nmsName/>
<domain/>
<address/>
<targetInformTimeout/>
<targetInformResendTimes/>
<notifyType/>
<vpnInstanceName/>
<portNumber/>
<securityModel/>
<securityName/>
<securityNameV3/>
<securityLevel/>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 236


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<private-netmanager/>
<isPublicNet/>
<ext-vb/>
<notifyFltrPrName/>
<retriesNum/>
<pendingNum/>
<sentNum/>
<droppedNum/>
<failedNum/>
<confirmedNum/>
<interface-name/>
</targetHost>

Table 3-400 describes elements in requests.

Table 3-400 Elements

Element Description

nmsName Specifies the name of an SNMP target host.

domain Specifies a transport protocol.

address Specifies the address of an SNMP target host.

targetInfor Specifies a timeout period for Inform packets.


mTimeout

targetInfor Specifies the maximum number of Inform packet retransmission times.


mResendTi
mes

notifyType Specifies a packet type.

vpnInstance Specifies a VPN instance name.


Name

portNumber Specifies a UDP port number.

securityMo Specifies an SNMP security model.


del

securityNa Specifies a security name for an SNMPv1/SNMPv2c user.


me

securityNa Specifies a security name for an SNMPv3 user.


meV3

securityLev Specifies an SNMP security level.


el

private- Specifies whether the target host that receives trap packets is a Huawei
netmanager NMS.

isPublicNet Specifies whether a public network is used.

ext-vb Specifies whether to carry extended bound variables in alarms sent to a


target host.

notifyFltrPr Specifies the name of a notification filtering template.


Name

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 237


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

retriesNum Specifies the number of retransmission times.

pendingNu Specifies the number of blocked packets.


m

sentNum Specifies the number of sent packets.

droppedNu Specifies the number of dropped packets.


m

failedNum Specifies the number of failed packets.

confirmedN Specifies the number of confirmed packets.


um

interface- Specifies an interface name.


name

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<targetHost>
<nmsName>__targetHost_1_59745</nmsName>
<address>10.1.1.1</address>
<portNumber>162</portNumber>
<vpnInstanceName>_public_</vpnInstanceName>
<securityName/>
<securityNameV3/>
<securityModel>v2c</securityModel>
<securityLevel>noAuthNoPriv</securityLevel>
<notifyType>trap</notifyType>
<domain>snmpUDPDomain</domain>
<targetInformTimeout>15</targetInformTimeout>
<targetInformResendTimes>3</targetInformResendTimes>
<private-netmanager>false</private-netmanager>
<ext-vb>false</ext-vb>
<interface-name/>
<notifyFltrPrName/>
<retriesNum>0</retriesNum>
<pendingNum>0</pendingNum>
<sentNum>0</sentNum>
<droppedNum>0</droppedNum>
<failedNum>0</failedNum>
<confirmedNum>0</confirmedNum>
<isPublicNet>false</isPublicNet>
</targetHost>

Table 3-401 describes elements in responses.

Table 3-401 Elements


Element Description

nmsName Specifies the name of an SNMP target host.

domain Specifies a transport protocol.

address Specifies the address of an SNMP target host.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 238


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

targetInfor Specifies a timeout period for Inform packets.


mTimeout

targetInfor Specifies the maximum number of Inform packet retransmission times.


mResendTi
mes

notifyType Specifies a packet type.

vpnInstance Specifies a VPN instance name.


Name

portNumber Specifies a UDP port number.

securityMo Specifies an SNMP security model.


del

securityNa Specifies a security name for an SNMPv1/SNMPv2c user.


me

securityNa Specifies a security name for an SNMPv1/SNMPv2c user.


meV3

securityLev Specifies an SNMP security level.


el

private- Specifies whether the target host that receives trap packets is a Huawei
netmanager NMS.

ext-vb Specifies whether to carry extended bound variables in alarms sent to a


target host.

interface- Specifies an interface name.


name

notifyFltrPr Specifies a notification filtering template.


Name

isPublicNet Specifies that a target host is connected through the public network.

Table 3-402 describes status codes in responses.

Table 3-402 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 239


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.11.3 Modify an SNMP Target Host


Operation URI Description

PUT /snmp/targetHosts/ Modify an SNMP target


targetHost host.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<targetHost>
<nmsName>2</nmsName>
<address>10.1.1.1</address>
<portNumber>10000</portNumber>
<vpnInstanceName>_public_</vpnInstanceName>
<securityName>public</securityName>
<securityModel>v2c</securityModel>
<securityLevel>noAuthNoPriv</securityLevel>
<notifyType>inform</notifyType>
<domain>snmpUDPDomain</domain>
<targetInformTimeout>15</targetInformTimeout>
<targetInformResendTimes>3</targetInformResendTimes>
<private-netmanager>false</private-netmanager>
<ext-vb>false</ext-vb>
<interface-name>LoopBack0</interface-name>
<notifyFltrPrName>1</notifyFltrPrName>
<isPublicNet>false</isPublicNet>
</targetHost>

Table 3-403 describes elements in requests.

Table 3-403 Elements


Element Description

nmsName Specifies the name of an SNMP target host.

address Specifies the address of an SNMP target host.

portNumber Specifies a UDP port number.

vpnInstance Specifies a VPN instance name.


Name

securityNa Specifies a security name for an SNMPv1/SNMPv2c user.


me

securityNa Specifies a security name for an SNMPv3 user.


meV3

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 240


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

securityMo Specifies an SNMP security model.


del

securityLev Specifies an SNMP security level.


el

notifyType Specifies a packet type.

domain Specifies a transport protocol.

targetInfor Specifies a timeout period for Inform packets.


mTimeout

targetInfor Specifies the maximum number of Inform packet retransmission times.


mResendTi
mes

private- Specifies whether the target host that receives trap packets is a Huawei
netmanager NMS.

ext-vb Specifies whether to carry extended bound variables in alarms sent to a


target host.

interface- Specifies an interface name.


name

notifyFltrPr Specifies a notification filtering template.


Name

isPublicNet Specifies whether to connect to a target host through the public


network.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-404 describes status codes in responses.

Table 3-404 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 241


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.14.11.4 Delete an SNMP Target Host


Operation URI Description

DELETE /snmp/targetHosts/ Delete an SNMP target host.


targetHost

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<targetHost>
<nmsName>TargetHost1</nmsName>
</targetHost>

Table 3-405 describes elements in requests.

Table 3-405 Elements


Element Description

nmsName Specifies the name of an SNMP target host.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-406 describes status codes in responses.

Table 3-406 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.12 Notification Filtering Template

3.14.12.1 Create a Notification Filtering Template


Operation URI Description

POST /snmp/notifyFltrPrs/ Create a notification


notifyFltrPr filtering template.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 242


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<notifyFltrPr>
<profileName>MIBVIEW1MIBVIEW1MIBVIEW1MIBVIEW1</profileName>
<subtree>1.3.6.1</subtree>
<type>excluded</type>
</notifyFltrPr>

Table 3-407 describes elements in requests.

Table 3-407 Elements


Element Description

profileNam Specifies the name of a notification filtering template.


e

subtree Specifies a MIB sub-tree.

type Specifies a filtering type.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-408 describes status codes in responses.

Table 3-408 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.12.2 Query Notification Filtering Templates


Operation URI Description

GET /snmp/notifyFltrPrs/ Query all the configured


notifyFltrPr notification filtering
templates.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<notifyFltrPr>
<profileName></profileName>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 243


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<subtree></subtree>
<type></type>
</notifyFltrPr>

Table 3-409 describes elements in requests.

Table 3-409 Elements


Element Description

profileNam Specifies the name of a notification filtering template.


e

subtree Specifies a MIB sub-tree.

type Specifies a filtering type.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<notifyFltrPr>
<profileName>MIBVIEW1MIBVIEW1MIBVIEW1MIBVIEW1</profileName>
<subtree>internet</subtree>
<type>excluded</type>
</notifyFltrPr>

Table 3-410 describes elements in responses.

Table 3-410 Elements


Element Description

profileNam Specifies the name of a notification filtering template.


e

subtree Specifies a MIB sub-tree.

type Specifies a filtering type.

Table 3-411 describes status codes in responses.

Table 3-411 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 244


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.14.12.3 Delete a Notification Filtering Template


Operation URI Description

DELETE /snmp/notifyFltrPrs/ Delete a notification


notifyFltrPr filtering template.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<notifyFltrPr operation="merge">
<profileName>iso</profileName>
<subtree>iso</subtree>
<type>excluded</type>
</notifyFltrPr>

Table 3-412 describes elements in requests.

Table 3-412 Elements


Element Description

profileNam Specifies the name of a notification filtering template.


e

subtree Specifies a MIB sub-tree.

type Specifies a filtering type.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-413 describes status codes in responses.

Table 3-413 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.13 Proxy Community Name

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 245


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.14.13.1 Create a Proxy Community Name


Operation URI Description

POST /snmp/proxy/communitys/ Create a proxy community


community name.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<community>
<communityName>abbcd</communityName>
<remoteEngineID>3333333333333333</remoteEngineID>
<acl>2000</acl>
<aliasName>abc</aliasName>
</community>

Table 3-414 describes elements in requests.

Table 3-414 Elements


Element Description

community Specifies a community name.


Name

remoteEngi Specifies a remote engine ID.


neID

acl Specifies an ACL list.

aliasName Specifies a unique community alias


that differs from the community name. Only one alias can be
configured for a community name.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-415 describes status codes in responses.

Table 3-415 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 246


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.14.13.2 Query a Proxy Community Name


Operation URI Description

GET /snmp/proxy/communitys/ Query a proxy community


community name.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<community>
<communityName/>
<remoteEngineID/>
<acl/>
<aliasName/>
</community>

Table 3-416 describes elements in requests.

Table 3-416 Elements

Element Description

community Specifies a community name.


Name

remoteEngi Specifies a remote engine ID.


neID

acl Specifies an ACL list.

aliasName Specifies a unique community alias


that differs from the community name. Only one alias can be
configured for a community name.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<community>
<communityName>abbc</communityName>
<remoteEngineID>1111111111</remoteEngineID>
<acl>2000</acl>
<aliasName>SnmpCommunity03[18204]</aliasName>
</community>

Table 3-417 describes elements in responses.

Table 3-417 Elements

Element Description

community Specifies a community name.


Name

remoteEngi Specifies a remote engine ID.


neID

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 247


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

acl Specifies an ACL list.

aliasName Specifies a unique community alias


that differs from the community name. Only one alias can be
configured for a community name.

Table 3-418 describes status codes in responses.

Table 3-418 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.13.3 Modify a Proxy Community Name


Operation URI Description

PUT /snmp/proxy/communitys/ Modify a proxy community


community name.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<community>
<communityName>abbc</communityName>
<remoteEngineID>2222222222222222</remoteEngineID>
</community>

Table 3-419 describes elements in requests.

Table 3-419 Elements


Element Description

community Specifies a community name.


Name

remoteEngi Specifies a remote engine ID.


neID

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 248


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-420 describes status codes in responses.

Table 3-420 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.13.4 Delete a Proxy Community Name


Operation URI Description

DELETE /snmp/proxy/communitys/ Modify a proxy community


community name.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<community>
<communityName>abbc</communityName>
</community>

Table 3-421 describes elements in requests.

Table 3-421 Elements


Element Description

community Specifies a community name.


Name

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-422 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 249


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-422 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.14 Proxy Target Host

3.14.14.1 Create a Proxy Target Host


Operation URI Description

POST /snmp/proxy/targetHosts/ Create a proxy target host.


targetHost

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<targetHost>
<targetName>dddd</targetName>
<domain>snmpUDPDomain</domain>
<address>10.1.1.1</address>
<timeout>16</timeout>
<vpnInstanceName>_public_</vpnInstanceName>
<portNumber>33333</portNumber>
<securityModel>v2c</securityModel>
<securityName>public</securityName>
<isPublicNet>true</isPublicNet>
</targetHost>

Table 3-423 describes elements in requests.

Table 3-423 Elements


Element Description

targetName Specifies the name of a target host for which the SNMP agent is
configured.

domain Specifies a transport protocol.

address Specifies the IP address of a target host for which the SNMP agent is
configured.

timeout Specifies a timeout period for the NMS to reply Inform packets to the
SNMP agent.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 250


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

vpnInstance Specifies the VPN instance bound to a target host.


Name

portNumber Specifies the number of a UDP port through which the NMS sends
SNMP packets.

securityMo Specifies an SNMP security model.


del

securityNa Specifies a security name for an SNMPv1/SNMPv2c user.


me

isPublicNet Specifies whether to connect to a target host through the public


network.
If vpnInstanceName is not set to _public_, the value of this element
can only be false.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-424 describes status codes in responses.

Table 3-424 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.14.2 Query a Proxy Target Host


Operation URI Description

GET /snmp/proxy/targetHosts/ Query a proxy target host.


targetHost

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<targetHost>
<targetName/>
<domain/>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 251


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<address/>
<timeout/>
<vpnInstanceName/>
<portNumber/>
<securityModel/>
<securityName/>
<securityNameV3/>
<securityLevel/>
<interface-name/>
<isPublicNet/>
</targetHost>

Table 3-425 describes elements in requests.

Table 3-425 Elements


Element Description

targetName Specifies the name of a target host for which the SNMP agent is
configured.

domain Specifies a transport protocol.

address Specifies the IP address of a target host for which the SNMP agent is
configured.

timeout Specifies a timeout period for the NMS to reply Inform packets to the
SNMP agent.

vpnInstance Specifies the VPN instance bound to a target host.


Name

portNumber Specifies the number of a UDP port through which the NMS sends
SNMP packets.

securityMo Specifies an SNMP security model.


del

securityNa Specifies a security name for an SNMPv1/SNMPv2c user.


me

securityNa Specifies a security name for an SNMPv3 user.


meV3

securityLev Specifies an SNMP security level.


el

interface- Specifies the name of a source interface from which trap packets are
name sent.

isPublicNet Specifies whether to connect to a target host through the public


network.
If vpnInstanceName is not set to _public_, the value of this element
can only be false.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<targetHost>
<targetName>abc</targetName>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 252


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<domain>snmpUDPDomain</domain>
<address>10.1.1.1</address>
<timeout>15</timeout>
<vpnInstanceName>_public_</vpnInstanceName>
<portNumber>11111</portNumber>
<securityModel>v2c</securityModel>
<securityName/>
<securityNameV3/>
<securityLevel>noAuthNoPriv</securityLevel>
<interface-name/>
<isPublicNet>false</isPublicNet>
</targetHost>

Table 3-426 describes elements in responses.

Table 3-426 Elements


Element Description

targetName Specifies the name of a target host for which the SNMP agent is
configured.

domain Specifies a transport protocol.

address Specifies the IP address of a target host for which the SNMP agent is
configured.

timeout Specifies a timeout period for the NMS to reply Inform packets to the
SNMP agent.

vpnInstance Specifies the VPN instance bound to a target host.


Name

portNumber Specifies the number of a UDP port through which the NMS sends
SNMP packets.

securityMo Specifies an SNMP security model.


del

securityNa Specifies a security name for an SNMPv1/SNMPv2c user.


me

isPublicNet Specifies whether to connect to a target host through the public


network.
If vpnInstanceName is not set to _public_, the value of this element
can only be false.

Table 3-427 describes status codes in responses.

Table 3-427 Status codes


Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 253


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.14.3 Modify a Proxy Target Host


Operation URI Description

PUT /snmp/proxy/targetHosts/ Modify a proxy target host.


targetHost

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<targetHost operation="merge">
<targetName>abc</targetName>
<address>10.1.1.1</address>
<portNumber>22222</portNumber>
<securityModel>v3</securityModel>
<securityNameV3>huawei</securityNameV3>
</targetHost>

Table 3-428 describes elements in requests.

Table 3-428 Elements


Element Description

targetName Specifies the name of a target host for which the SNMP agent is
configured.

address Specifies the IP address of a target host for which the SNMP agent is
configured.

portNumber Specifies the number of a UDP port through which the NMS sends
SNMP packets.

securityMo Specifies an SNMP security model.


del

securityNa Specifies a security name for an SNMPv3 user.


meV3

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-429 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 254


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-429 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.14.4 Delete a Proxy Target Host


Operation URI Description

DELETE /snmp/proxy/targetHosts/ Delete a proxy target host.


targetHost

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<targetHost operation="delete">
<targetName>abc</targetName>
</targetHost>

Table 3-430 describes elements in requests.

Table 3-430 Elements


Element Description

targetName Specifies the name of a target host for which the SNMP agent is
configured.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-431 describes status codes in responses.

Table 3-431 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 255


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.15 Proxy Rule

3.14.15.1 Create a Proxy Rule


Operation URI Description

POST /snmp/proxy/rules/rule Create a proxy rule.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<rule>
<proxyName>r2</proxyName>
<type>read</type>
<remoteEngineID>111111111111</remoteEngineID>
<targetHostName>2</targetHostName>
<securityName>test</securityName>
<securityModel>v1</securityModel>
<securityLevel>noAuthNoPriv</securityLevel>
</rule>

Table 3-432 describes elements in requests.

Table 3-432 Elements


Element Description

proxyName Specifies a proxy rule name for SNMP packets.

type Specifies an SNMP packet type.

remoteEngi Specifies a remote SNMP engine ID.


neID

targetHostN Specifies a target host name.


ame

securityNa Specifies a security name for an SNMPv1/SNMPv2c user.


me

securityNa Specifies a security name for an SNMPv3 user.


meV3

securityMo Specifies an SNMP security model.


del

securityLev Specifies a security level.


el

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 256


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-433 describes status codes in responses.

Table 3-433 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.15.2 Query a Proxy Rule


Operation URI Description

GET /snmp/proxy/rules/rule Query a proxy rule.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<rule>
<proxyName/>
<type/>
<remoteEngineID/>
<targetHostName/>
<securityName/>
<securityNameV3/>
<securityModel/>
<securityLevel/>
</rule>

Table 3-434 describes elements in requests.

Table 3-434 Elements


Element Description

proxyName Specifies a proxy rule name for SNMP packets.

type Specifies an SNMP packet type.

remoteEngi Specifies a remote SNMP engine ID.


neID

targetHostN Specifies a target host name.


ame

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 257


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

securityNa Specifies a security name for an SNMPv1/SNMPv2c user.


me

securityNa Specifies a security name for an SNMPv3 user.


meV3

securityMo Specifies an SNMP security model.


del

securityLev Specifies a security level.


el

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?><rule>
<proxyName>r2</proxyName>
<type>read</type>
<remoteEngineID>111111111111</remoteEngineID>
<targetHostName>2</targetHostName>
<securityName>%^%#QQJ[X2K{S&*3&]A#paxG=-nqDFWG90,+FY:=ae[W%^%#</securityName>
<securityNameV3>
</securityNameV3>
<securityModel>v1</securityModel>
<securityLevel>noAuthNoPriv</securityLevel>
</rule>

Table 3-435 describes elements in responses.

Table 3-435 Elements


Element Description

proxyName Specifies a proxy rule name for SNMP packets.

type Specifies an SNMP packet type.

remoteEngi Specifies a remote SNMP engine ID.


neID

targetHostN Specifies a target host name.


ame

securityNa Specifies a security name for an SNMPv1/SNMPv2c user.


me

securityNa Specifies a security name for an SNMPv3 user.


meV3

securityMo Specifies an SNMP security model.


del

securityLev Specifies a security level.


el

Table 3-436 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 258


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-436 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.15.3 Modify a Proxy Rule


Operation URI Description

PUT /snmp/proxy/rules/rule Modify a proxy rule.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<rule>
<proxyName>r2</proxyName>
<type>read</type>
<remoteEngineID>111111111111</remoteEngineID>
<targetHostName>2</targetHostName>
<securityName>test</securityName>
<securityModel>v1</securityModel>
<securityLevel>noAuthNoPriv</securityLevel>
</rule>

Table 3-437 describes elements in requests.

Table 3-437 Elements

Element Description

proxyName Specifies a proxy rule name for SNMP packets.

type Specifies an SNMP packet type.

remoteEngi Specifies a remote SNMP engine ID.


neID

targetHostN Specifies a target host name.


ame

securityNa Specifies a security name for an SNMPv1/SNMPv2c user.


me

securityNa Specifies a security name for an SNMPv3 user.


meV3

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 259


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

securityMo Specifies an SNMP security model.


del

securityLev Specifies a security level.


el

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-438 describes status codes in responses.

Table 3-438 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.15.4 Delete a Proxy Rule


Operation URI Description

DELETE /snmp/proxy/rules/rule Delete a proxy rule.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<rule>
<proxyName>r2</proxyName>
<type>read</type>
<remoteEngineID>111111111111</remoteEngineID>
<targetHostName>2</targetHostName>
<securityName>test</securityName>
<securityModel>v1</securityModel>
<securityLevel>noAuthNoPriv</securityLevel>
</rule>

Table 3-439 describes elements in requests.

Table 3-439 Elements


Element Description

proxyName Specifies a proxy rule name for SNMP packets.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 260


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

type Specifies an SNMP packet type.

remoteEngi Specifies a remote SNMP engine ID.


neID

targetHostN Specifies a target host name.


ame

securityNa Specifies a security name for an SNMPv1/SNMPv2c user.


me

securityNa Specifies a security name for an SNMPv3 user.


meV3

securityMo Specifies an SNMP security model.


del

securityLev Specifies a security level.


el

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-440 describes status codes in responses.

Table 3-440 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.16 Query SNMP Statistics


Operation URI Description

GET /snmp/snmpStats Query SNMP statistics.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<snmpStats>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 261


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<inPkts/>
<outPkts/>
<inBadVersions/>
<inBadCommuintyNames/>
<inBadCommunityUsesr/>
<inASNParseErrs/>
<inTooBigs/>
<inNoSuchNames/>
<inBadValues/>
<inRead/>
<inGenErrs/>
<inTotalReqVars/>
<inTotalSetVars/>
<inGetRequests/>
<inGetNexts/>
<inSetRequests/>
<inGetResponses/>
<inTraps/>
<outTooBigs/>
<outNoSuchNames/>
<outBadValues/>
<outGenErrs/>
<outGetRequests/>
<outGetNexts/>
<outSetRequests/>
<outGetResponses/>
<outTraps/>
<silentDrops/>
<inGetBulks/>
<outGetBulks/>
<inInforms/>
<inProxyPkts/>
<proxyDrops/>
</snmpStats>

Table 3-441 describes elements in requests.

Table 3-441 Elements

Element Description

inPkts Specifies the number of received packets.

outPkts Specifies the number of sent packets.

inBadVersio Specifies the number of received packets with incorrect protocol


ns versions.

inBadCom Specifies the number of received packets with unknown community


muintyNam names.
es

inBadCom Specifies the number of received packets for which community names
munityUses do not support operation types.
r

inASNParse Specifies the number of ASN.1 and BER errors in packet parsing.
Errs

inTooBigs Specifies the number of received packets for which the error-status
field is set to tooBig.

inNoSuchN Specifies the number of received packets for which the error-status
ames field is set to noSuchName.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 262


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

inBadValue Specifies the number of received packets for which the error-status
s field is set to badValue.

inReadOnly Specifies the number of received packets for which the error-status
s field is set to readOnly.

inGenErrs Specifies the number of received packets for which the error-status
field is set to genErr.

inTotalReq Specifies the number of MIB objects that are successfully searched out
Vars based on the valid Get-Request and Get-next packets received.

inTotalSetV Specifies the number of MIB objects that are successfully modified
ars based on the valid Set-Request packets received.

inGetReque Specifies the number of received and processed Get-Request packets.


sts

inGetNexts Specifies the number of received and processed Get-Next packets.

inSetReques Specifies the number of received and processed Set-Request packets.


ts

inGetRespo Specifies the number of received and processed Get-Response packets.


nses

inTraps Specifies the number of received and processed trap packets.

outTooBigs Specifies the number of sent packets for which the error-status field is
set to tooBig.

outNoSuch Specifies the number of sent packets for which the error-status field is
Names set to noSuchName.

outBadValu Specifies the number of sent packets for which the error-status field is
es set to badValue.

outGenErrs Specifies the number of sent packets for which the error-status field is
set to genErr.

outGetRequ Specifies the number of sent Get-Request packets.


ests

outGetNext Specifies the number of sent Get-Next packets.


s

outSetRequ Specifies the number of sent Set-Request packets.


ests

outGetResp Specifies the number of sent Get-Response packets.


onses

outTraps Specifies the number of sent trap packets.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 263


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

silentDrops Specifies the number of packets that are dropped because the packets
carry an empty variable-bindings field or the packet length does not
meet local restrictions or exceeds the maximum length supported by
the receive end of request packets.

inGetBulks Specifies the number of received and processed GetBulk packets.

outGetBulk Specifies the number of sent GetBulk-Request packets.


s

inInforms Specifies the number of received and processed Inform packets.

inProxyPkts Specifies the number of packets delivered to the SNMP proxy.

proxyDrops Specifies the number of request packets that are dropped when the
SNMP proxy fails to forward the packets to the target host.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<snmpStats>
<inPkts>698</inPkts>
<outPkts>696</outPkts>
<inBadVersions>0</inBadVersions>
<inBadCommuintyNames>2</inBadCommuintyNames>
<inBadCommunityUsesr>0</inBadCommunityUsesr>
<inASNParseErrs>0</inASNParseErrs>
<inTooBigs>0</inTooBigs>
<inNoSuchNames>0</inNoSuchNames>
<inBadValues>0</inBadValues>
<inReadOnlys>0</inReadOnlys>
<inGenErrs>0</inGenErrs>
<inTotalReqVars>759</inTotalReqVars>
<inTotalSetVars>0</inTotalSetVars>
<inGetRequests>632</inGetRequests>
<inGetNexts>64</inGetNexts>
<inSetRequests>0</inSetRequests>
<inGetResponses>0</inGetResponses>
<inTraps>0</inTraps>
<outTooBigs>0</outTooBigs>
<outNoSuchNames>0</outNoSuchNames>
<outBadValues>0</outBadValues>
<outGenErrs>0</outGenErrs>
<outGetRequests>0</outGetRequests>
<outGetNexts>0</outGetNexts>
<outSetRequests>0</outSetRequests>
<outGetResponses>696</outGetResponses>
<outTraps>0</outTrap
<silentDrops>0</silentDrops>
<inGetBulks>0</inGetBulks>
<outGetBulks>0</outGetBulks>
<inInforms>0</inInforms>
<inProxyPkts>0</inProxyPkts>
<proxyDrops>0</proxyDrops>
</snmpStats>

Table 3-442 describes elements in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 264


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-442 Elements


Element Description

inPkts Specifies the number of received packets.

outPkts Specifies the number of sent packets.

inBadVersio Specifies the number of received packets with incorrect protocol


ns versions.

inBadCom Specifies the number of received packets with unknown community


muintyNam names.
es

inBadCom Specifies the number of received packets for which community names
munityUses do not support operation types.
r

inASNParse Specifies the number of ASN.1 and BER errors in packet parsing.
Errs

inTooBigs Specifies the number of received packets for which the error-status
field is set to tooBig.

inNoSuchN Specifies the number of received packets for which the error-status
ames field is set to noSuchName.

inBadValue Specifies the number of received packets for which the error-status
s field is set to badValue.

inReadOnly Specifies the number of received packets for which the error-status
s field is set to readOnly.

inGenErrs Specifies the number of received packets for which the error-status
field is set to genErr.

inTotalReq Specifies the number of MIB objects that are successfully searched out
Vars based on the valid Get-Request and Get-next packets received.

inTotalSetV Specifies the number of MIB objects that are successfully modified
ars based on the valid Set-Request packets received.

inGetReque Specifies the number of received and processed Get-Request packets.


sts

inGetNexts Specifies the number of received and processed Get-Next packets.

inSetReques Specifies the number of received and processed Set-Request packets.


ts

inGetRespo Specifies the number of received and processed Get-Response packets.


nses

inTraps Specifies the number of received and processed trap packets.

outTooBigs Specifies the number of sent packets for which the error-status field is
set to tooBig.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 265


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

outNoSuch Specifies the number of sent packets for which the error-status field is
Names set to noSuchName.

outBadValu Specifies the number of sent packets for which the error-status field is
es set to badValue.

outGenErrs Specifies the number of sent packets for which the error-status field is
set to genErr.

outGetRequ Specifies the number of sent Get-Request packets.


ests

outTraps Specifies the number of sent trap packets.

silentDrops Specifies the number of packets that are dropped because the packets
carry an empty variable-bindings field or the packet length does not
meet local restrictions or exceeds the maximum length supported by
the receive end of request packets.

inGetBulks Specifies the number of received and processed GetBulk packets.

outGetBulk Specifies the number of sent GetBulk-Request packets.


s

inInforms Specifies the number of received and processed Inform packets.

inProxyPkts Specifies the number of packets delivered to the SNMP proxy.

proxyDrops Specifies the number of request packets that are dropped when the
SNMP proxy fails to forward the packets to the target host.

Table 3-443 describes status codes in responses.

Table 3-443 Status codes


Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented


because the request is incorrect in syntax
or the information attribute in the request
is incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 266


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.14.17 Query USM Statistics


Operation URI Description

GET /snmp/usmStats Query SNMP USM


statistics.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<usmStats>
<unknownUserName/>
<wrongDigests/>
<unsupportSecLevels/>
<notInTmWindows/>
<unknownEngineIDs/>
<decryptionErrorss/>
</usmStats>

Table 3-444 describes elements in requests.

Table 3-444 Elements

Element Description

unknownUs Specifies the number of packets dropped by the SNMP engine because
erName they carry unknown user names.

wrongDiges Specifies the number of packets dropped by the SNMP engine because
ts the authentication password is incorrect.

unsupportSe Specifies the number of packets dropped by the SNMP engine because
cLevels their security levels are not supported.

notInTmWi Specifies the number of packets dropped by the SNMP engine because
ndows they exceed the time window range.

unknownEn Specifies the number of packets dropped by the SNMP engine because
gineIDs they carry unknown engine IDs.

decryptionE Specifies the number of packets dropped by the SNMP engine because
rrorss of a decryption failure.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<usmStats>
<unknownUserName>0</unknownUserName>
<wrongDigests>0</wrongDigests>
<unsupportSecLevels>0</unsupportSecLevels>
<notInTmWindows>0</notInTmWindows>
<unknownEngineIDs>0</unknownEngineIDs>
<decryptionErrorss>0</decryptionErrorss>
</usmStats>

Table 3-445 describes elements in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 267


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-445 Elements


Element Description

unknownUs Specifies the number of packets dropped by the SNMP engine because
erName they carry unknown user names.

wrongDiges Specifies the number of packets dropped by the SNMP engine because
ts the authentication password is incorrect.

unsupportSe Specifies the number of packets dropped by the SNMP engine because
cLevels their security levels are not supported.

notInTmWi Specifies the number of packets dropped by the SNMP engine because
ndows they exceed the time window range.

unknownEn Specifies the number of packets dropped by the SNMP engine because
gineIDs they carry unknown engine IDs.

decryptionE Specifies the number of packets dropped by the SNMP engine because
rrorss of a decryption failure.

Table 3-446 describes status codes in responses.

Table 3-446 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.18 Query Packet Processing Statistics


Operation URI Description

GET /snmp/mpdStats Query packet processing


statistics.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<mpdStats>
<unknownSecModel/>
<invalidMsgs/>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 268


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<unknownPDUHandl/>
</mpdStats>

Table 3-447 describes elements in requests.

Table 3-447 Elements


Element Description

unknownSe Specifies the number of packets dropped by the SNMP engine because
cModel their security models are unknown.

invalidMsgs Specifies the number of packets dropped by the SNMP engine because
the packets are invalid or carry elements that cannot be properly
parsed.

unknownPD Specifies the number of packets dropped by the SNMP engine because
UHandl they cannot be properly parsed.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<mpdStats>
<unknownSecModel>0</unknownSecModel>
<invalidMsgs>0</invalidMsgs>
<unknownPDUHandl>0</unknownPDUHandl>
</mpdStats>

Table 3-448 describes elements in responses.

Table 3-448 Elements


Element Description

unknownSe Specifies the number of packets dropped by the SNMP engine because
cModel their security models are unknown.

invalidMsgs Specifies the number of packets dropped by the SNMP engine because
the packets are invalid or carry elements that cannot be properly
parsed.

unknownPD Specifies the number of packets dropped by the SNMP engine because
UHandl they cannot be properly parsed.

Table 3-449 describes status codes in responses.

Table 3-449 Status codes


Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 269


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.19 Query Statistics About an SNMP Target Host


Operation URI Description

GET /snmp/targetStats Query statistics about an


SNMP target host.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<targetStats>
<unAvailContexts/>
<unknownContexts/>
</targetStats>

Table 3-450 describes elements in requests.

Table 3-450 Elements


Element Description

unAvailCon Specifies the number of packets dropped by the SNMP engine because
texts they carry invalid contexts.

unknownCo Specifies the number of packets dropped by the SNMP engine because
ntexts they carry unknown contexts.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<targetStats>
<unAvailContexts>0</unAvailContexts>
<unknownContexts>0</unknownContexts>
</targetStats>

Table 3-451 describes elements in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 270


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-451 Elements


Element Description

unAvailCon Specifies the number of packets dropped by the SNMP engine because
texts they carry invalid contexts.

unknownCo Specifies the number of packets dropped by the SNMP engine because
ntexts they carry unknown contexts.

Table 3-452 describes status codes in responses.

Table 3-452 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.20 Query Alarm Logs in the Buffer Area


Operation URI Description

GET /snmp/notificationStats Query alarm logs in the


buffer area.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<notificationStats>
<totalNotificationsLogged/>
<totalNotificationsBumped/>
<totalLogEntries/>
</notificationStats>

Table 3-453 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 271


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-453 Elements

Element Description

totalNotific Specifies the number of notification log entries in the nlmLogTable.


ationsLogge Each notification log entry is counted. If multiple log entries are
d generated for one notification, all the entries are counted.

totalNotific Specifies the number of log entries that are deleted due to the
ationsBump restrictions of nlmConfigGlobalEntryLimit and nlmConfigLogEntryLi-
ed mit so that new log entries can be stored.

totalLogEnt Specifies the number of log entries in the nlmLogTable.


ries

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<notificationStats>
<totalNotificationsLogged>9</totalNotificationsLogged>
<totalNotificationsBumped>0</totalNotificationsBumped>
<totalLogEntries>9</totalLogEntries>
</notificationStats>

Table 3-454 describes elements in responses.

Table 3-454 Elements

Element Description

totalNotific Specifies the number of notification log entries in the nlmLogTable.


ationsLogge Each notification log entry is counted. If multiple log entries are
d generated for one notification, all the entries are counted.

totalNotific Specifies the number of log entries that are deleted due to the
ationsBump restrictions of nlmConfigGlobalEntryLimit and nlmConfigLogEntryLi-
ed mit so that new log entries can be stored.

totalLogEnt Specifies the number of log entries in the nlmLogTable.


ries

Table 3-455 describes status codes in responses.

Table 3-455 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 272


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.21 Activate a User


Operation URI Description

PUT /snmp/snmpaActivateUsers/ Activate a user.


snmpaActivateUser

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<snmpUserActive>
<engineId>800007DB053910910680002970</engineId>
<userName>abc</userName>
</snmpUserActive>

Table 3-456 describes elements in requests.

Table 3-456 Elements

Element Description

engineId Specifies an SNMP engine ID.

userName Specifies a user name.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-457 describes status codes in responses.

Table 3-457 Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 273


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.14.22 Send Test Trap Packets


Operation URI Description

PUT /snmp/sendNmsPingTraps Send test trap packets.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<sendNmsPingTraps>
<isTestTrap>true</isTestTrap>
</sendNmsPingTraps>

Table 3-458 describes elements in requests.

Table 3-458 Elements

Element Description

isTestTrap Specifies whether to send trap packets.


l true: Trap packets will be sent.
l false: Trap packets will not be sent.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-459 describes status codes in responses.

Table 3-459 Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.14.23 Query MIB Objects


Operation URI Description

GET /snmp/snmpLocalQuery Query MIB objects.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 274


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<snmp>
<snmpLocalQuery>
<queryType>get</queryType>
<varBindReq>1.3.6.1.2.1.1.5.0</varBindReq>
</snmpLocalQuery>
</snmp>

Table 3-460 describes elements in requests.

Table 3-460 Elements

Element Description

queryType Specifies a query type.

varBindReq Specifies the object to be queried.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<snmp>
<snmpLocalQuery>
<queryType>get</queryType>
<varBindReq>1.3.6.1.2.1.1.5.0</varBindReq>
<varBindRsp>1.3.6.1.2.1.1.5.0</varBindRsp>
<retVal>HUAWEI</retVal>
</snmpLocalQuery>
</snmp>

Table 3-461 describes elements in responses.

Table 3-461 Elements

Element Description

queryType Specifies a query type.

varBindReq Specifies the object to be queried.

varBindRsp Specifies the object returning a packet.

retVal Specifies a returned value.

Table 3-462 describes status codes in responses.

Table 3-462 Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 275


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.15 VLAN

3.15.1 Single VLAN

3.15.1.1 Create a Single VLAN


Operation URI Description

POST /vlan/vlans/vlan Create a single VLAN.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vlan operation="create">
<vlanId>2</vlanId>
<vlanName>vlan2</vlanName>
<vlanDesc>huaweivlan2</vlanDesc>
<vlanType>super</vlanType>
<subVlans></subVlans>
</vlan>

Table 3-463 describes elements in requests.

Table 3-463 Elements

Element Description

vlanId Specifies a VLAN ID.

vlanName Specifies a VLAN name.

vlanDesc Specifies a VLAN description.

vlanType Specifies a VLAN type.


l common: common VLAN
l super: super VLAN
l sub: sub-VLAN

subVlans Specifies a sub-VLAN list.

superVlan Specifies a super VLAN ID.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 276


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-464 describes status codes in responses.

Table 3-464 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.15.1.2 Query VLAN Information


Operation URI Description

GET /vlan/vlans/vlan Query VLAN information.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vlan>
<vlanId></vlanId>
<vlanName></vlanName>
<vlanDesc></vlanDesc>
<vlanType></vlanType>
<adminStatus></adminStatus>
<subVlans></subVlans>
<superVlan></superVlan>
</vlan>

Table 3-465 describes elements in requests.

Table 3-465 Elements


Element Description

vlanId Specifies a VLAN ID.

vlanName Specifies a VLAN name.

vlanDesc Specifies a VLAN description.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 277


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

adminStatus Indicates the administrative status of a


VLAN.
l up: enables a VLAN.
l down: disables a VLAN.

vlanType Specifies a VLAN type.


l common: common VLAN
l super: super VLAN
l sub: sub-VLAN

subVlans Specifies a sub-VLAN list.

superVlan Specifies a super VLAN ID.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vlan>
<vlanId>10</vlanId>
<vlanType>common</vlanType>
<vlanName></vlanName>
<vlanDesc>VLAN 0010</vlanDesc>
<adminStatus>up</adminStatus>
<subVlans></subVlans>
<superVlan/>
</vlan>
Table 3-466 describes elements in responses.

Table 3-466 Elements


Element Description

vlanId Specifies a VLAN ID.

vlanName Specifies a VLAN name.

vlanDesc Specifies a VLAN description.

vlanType Specifies a VLAN type.


l common: common VLAN
l super: super VLAN
l sub: sub-VLAN

adminStatus Indicates the administrative status of a


VLAN.
l up: enables a VLAN.
l down: disables a VLAN.

subVlans Specifies a sub-VLAN list.

superVlan Specifies a super VLAN ID.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 278


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-467 describes status codes in responses.

Table 3-467 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.15.1.3 Delete a Single VLAN


Operation URI Description

DELETE /vlan/vlans/vlan Delete the created VLAN.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vlan operation="delete">
<vlanId>3</vlanId>
</vlan>

Table 3-468 describes elements in requests.

Table 3-468 Elements

Element Description

vlanId Specifies a VLAN ID.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-469 describes status codes in responses.

Table 3-469 Status codes

Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 279


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.15.1.4 Modify VLAN Attributes


Operation URI Description

PUT /vlan/vlans/vlan Modify VLAN attributes.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vlan>
<vlanId>2</vlanId>
<vlanType>principal</vlanType>
<vlanName>huawei</vlanName>
<vlanDesc>huawei1</vlanDesc>
<adminStatus>up</adminStatus>
<subVlans></subVlans>
<superVlan/>
<muxVlan>
<separateVlan>5</separateVlan>

<groupVlans>020000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000:0200000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000</groupVlans>
</muxVlan>
</vlan>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 280


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-470 describes elements in requests.

Table 3-470 Elements

Element Description

vlanId Specifies a VLAN ID.

vlanName Specifies a VLAN name.

vlanDesc Specifies a VLAN description.

adminStatus Indicates the administrative status of a


VLAN.
l up: enables a VLAN.
l down: disables a VLAN.

vlanType Specifies a VLAN type.


l common: common VLAN
l super: super VLAN
l sub: sub-VLAN
l principle: MUX VLAN
l separate: separate VLAN
l group: group VLAN

subVlans Specifies a sub-VLAN list.

superVlan Specifies a super VLAN ID.

separateVlan Specifies a separate VLAN of a MUX


VLAN.

groupVlans Specifies a group VLAN of a MUX


VLAN.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-471 describes status codes in responses.

Table 3-471 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 281


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.15.1.5 Query VLAN Member Interface Information


Operation URI Description

GET /vlan/vlans/vlan Query VLAN member


interface information.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vlan>
<vlanId>1</vlanId>
<portInfos>
<portInfo>
<ifName/>
<accessType/>
<tagMode/>
</portInfo>
</portInfos>
</vlan>

Table 3-472 describes elements in requests.

Table 3-472 Elements


Element Description

vlanId Specifies a VLAN ID.

portInfo Specifies information about a member


interface of a VLAN.

ifName Specifies the name of a member interface.

accessType Specifies a link type. The value can be:


l access
l trunk
l hybrid
l dot1q-tunnel

tagMode Indicates whether an interface is in tag or


untag mode.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vlan>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 282


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<vlanId>1</vlanId>
<portInfos>
<portInfo>
<accessType>access</accessType>
<tagMode>untag</tagMode>
<ifName>10GE1/0/1</ifName>
</portInfo>
</portInfos>
</vlan>

Table 3-473 describes elements in responses.

Table 3-473 Elements


Element Description

vlanId Specifies a VLAN ID.

portInfo Specifies information about a member


interface of a VLAN.

ifName Specifies the name of a member interface.

accessType Specifies a link type. The value can be:


l access
l trunk
l hybrid
l dot1q-tunnel

tagMode Indicates whether an interface is in tag or


untag mode.

Table 3-474 describes status codes in responses.

Table 3-474 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.15.2 Multiple VLANs

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 283


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.15.2.1 Create Multiple VLANs


Operation URI Description

POST /vlan/shVlanBatchCrt Create multiple VLANs.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<shVlanBatchCrt>

<vlans>7FE00000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000:7FE000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000</vlans>
</shVlanBatchCrt>

Table 3-475 describes elements in requests.

Table 3-475 Elements


Element Description

vlans Specifies a VLAN ID list.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-476 describes status codes in responses.

Table 3-476 Status codes


Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 284


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.15.2.2 Delete Multiple VLANs


Operation URI Description

POST /vlan/shVlanBatchDel Delete multiple VLANs.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<shVlanBatchDel>

<vlans>3FFFFFFFFFFFFFFFFFFFFFFFF8000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000:3FFFFFFFFFFFFFFFFFFFFFFFF80000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000</vlans>
</shVlanBatchDel>

Table 3-477 describes elements in requests.

Table 3-477 Elements


Element Description

vlans Specifies a VLAN ID list.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 285


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-478 describes status codes in responses.

Table 3-478 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.15.3 Protocol VLAN

3.15.3.1 Create a Protocol VLAN


Operation URI Description

POST /vlan/vlans/vlan Create a protocol VLAN.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vlan operation="merge">
<vlanId>1</vlanId>
<protocolVlans>
<protocolVlan operation="create">
<protocolIndex>2</protocolIndex>
<protocolType>at</protocolType>
</protocolVlan>
</protocolVlans>
</vlan>

Table 3-479 describes elements in requests.

Table 3-479 Elements

Element Description

vlanId Specifies a VLAN ID.

protocolIndex Specifies a protocol index.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 286


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

protocolType Specifies a protocol template.


l Mode: user-defined template.
l ipv4: IPv4 template.
l ipv6: IPv6 template.
l at: AT template.
l ipx_ethernetii: IPX_Ethernet II
template.
l ipx_llc: IPX_LLC template.
l ipx_raw: IPX_RAW template.
l ipx_snap: IPX_SNAP template.

snapProtocolValue Specifies an SNAP protocol type.

ethiiProtocolValue Specifies an Ethernet II protocol type.

dsap Specifies a DSAP type.

ssap Specifies an SSAP type.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-480 describes status codes in responses.

Table 3-480 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.15.3.2 Query Protocol VLAN Information


Operation URI Description

GET /vlan/vlans/vlan Query protocol VLAN


information.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 287


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vlan>
<vlanId>1</vlanId>
<protocolVlans>
<protocolVlan>
<protocolIndex>2</protocolIndex>
<protocolType>at</protocolType>
<encapType></encapType>
<snapProtocolValue></snapProtocolValue>
<ethiiProtocolValue></ethiiProtocolValue>
<dsap></dsap>
<ssap></ssap>
</protocolVlan>
</protocolVlans>
</vlan>

Table 3-481 describes elements in requests.

Table 3-481 Elements


Element Description

vlanId Specifies a VLAN ID.

protocolIndex Specifies a protocol index.

protocolType Specifies a protocol template.


l Mode: user-defined template.
l ipv4: IPv4 template.
l ipv6: IPv6 template.
l at: AT template.
l ipx_ethernetii: IPX_Ethernet II
template.
l ipx_llc: IPX_LLC template.
l ipx_raw: IPX_RAW template.
l ipx_snap: IPX_SNAP template.

snapProtocolValue Specifies an SNAP protocol type.

ethiiProtocolValue Specifies an Ethernet II protocol type.

dsap Specifies a DSAP type.

ssap Specifies an SSAP type.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vlan>
<vlanId>1</vlanId>
<protocolVlans>
<protocolVlan>
<protocolType>at</protocolType>
<protocolIndex>2</protocolIndex>
<encapType/>
<snapProtocolValue/>
<ethiiProtocolValue/>
<dsap/>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 288


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<ssap/>
</protocolVlan>
</protocolVlans>
</vlan>

Table 3-482 describes elements in responses.

Table 3-482 Elements

Element Description

vlanId Specifies a VLAN ID.

protocolIndex Specifies a protocol index.

protocolType Specifies a protocol template.


l Mode: user-defined template.
l ipv4: IPv4 template.
l ipv6: IPv6 template.
l at: AT template.
l ipx_ethernetii: IPX_Ethernet II
template.
l ipx_llc: IPX_LLC template.
l ipx_raw: IPX_RAW template.
l ipx_snap: IPX_SNAP template.

snapProtocolValue Specifies an SNAP protocol type.

ethiiProtocolValue Specifies an Ethernet II protocol type.

dsap Specifies a DSAP type.

ssap Specifies an SSAP type.

Table 3-483 describes status codes in responses.

Table 3-483 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 289


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.15.3.3 Delete a Protocol VLAN


Operation URI Description

POST /vlan/vlans/vlan Delete a protocol VLAN.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vlan>
<vlanId>1</vlanId>
<protocolVlans>
<protocolVlan operation="merge">
<protocolIndex>2</protocolIndex>
<protocolType>at</protocolType>
</protocolVlan>
</protocolVlans>
</vlan>

Table 3-484 describes elements in requests.

Table 3-484 Elements

Element Description

vlanId Specifies a VLAN ID.

protocolIndex Specifies a protocol index.

protocolType Specifies a protocol template.


l Mode: user-defined template.
l ipv4: IPv4 template.
l ipv6: IPv6 template.
l at: AT template.
l ipx_ethernetii: IPX_Ethernet II
template.
l ipx_llc: IPX_LLC template.
l ipx_raw: IPX_RAW template.
l ipx_snap: IPX_SNAP template.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-485 describes status codes in responses.

Table 3-485 Status codes

Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 290


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.15.4 VLAN Assignment

3.15.4.1 Create VLAN Assignment


Operation URI Description

POST /vlan/vlanAssigns/vlanAssign Create VLAN assignment.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vlanAssign operation="create">
<type>global</type>

<vlanLists>1E00000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000:1E000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000</vlanLists>
</vlanAssign>

Table 3-486 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 291


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-486 Elements


Element Description

vlanId Specifies a VLAN ID.

type Specifies a VLAN name.


l global: global VLAN.
l local: local VLAN.

vlanLists Specifies a VLAN list.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-487 describes status codes in responses.

Table 3-487 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.15.4.2 Query VLAN Assignment


Operation URI Description

GET /vlan/vlanAssigns/vlanAssign Query VLAN assignment.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vlanAssign>
<type></type>
<vlanLists></vlanLists>
</vlanAssign>

Table 3-488 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 292


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-488 Elements


Element Description

type Specifies a VLAN name.


l global: global VLAN.
l local: local VLAN.

vlanLists Specifies a VLAN list, in the bit map


type.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vlanAssign>
<type>global</type>

<vlanLists>3FFFFFFFFFFFFFFFFFFFFFFFF800000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000</vlanLists>
</vlanAssign>

Table 3-489 describes elements in responses.

Table 3-489 Elements


Element Description

type Specifies a VLAN name.


l global: global VLAN.
l local: local VLAN.

vlanLists Specifies a VLAN list, in the bit map


type.

Table 3-490 describes status codes in responses.

Table 3-490 Status codes


Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 293


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.15.4.3 Delete VLAN Assignment


Operation URI Description

DELETE /vlan/vlanAssigns/ Delete VLAN assignment.


vlanAssign

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vlanAssign operation="delete">
<type>global</type>
</vlanAssign>

Table 3-491 describes elements in requests.

Table 3-491 Elements

Element Description

vlanId Specifies a VLAN ID.

type Specifies a VLAN name.


l global: global VLAN.
l local: local VLAN.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-492 describes status codes in responses.

Table 3-492 Status codes

Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 294


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.15.4.4 Modify VLAN Assignment


Operation URI Description

PUT /vlan/vlanAssigns/vlanAssign Modify VLAN assignment.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vlanAssign operation="merge">
<type>global</type>

<vlanLists>3FE0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000:001FFFFFFFFFFFFFFFFFFFFFF8000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000</vlanLists>
</vlanAssign>

Table 3-493 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 295


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-493 Elements


Element Description

vlanId Specifies a VLAN ID.

type Specifies a VLAN name.


l global: global VLAN.
l local: local VLAN.

vlanLists Specifies a VLAN list, in the bit map


type.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-494 describes status codes in responses.

Table 3-494 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.15.5 VLAN Instance

3.15.5.1 Create or Modify the Mapping Between VLANs and an Instance


Operation URI Description

POST /vlan/shVlanInstCrt Create or modify the


mapping between VLANs
and an instance.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<shVlanInstCrt>
<instanceId>2</instanceId>

<vlans>10000000000000000000000000000000000000000000000000000000000000000000000

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 296


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000:100000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000</vlans>
</shVlanInstCrt>

Table 3-495 describes elements in requests.

Table 3-495 Elements


Element Description

instanceId Specifies an instance ID.

vlans Specifies a VLAN list corresponding to


an instance. The VLAN list is in the bit
map type.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-496 describes status codes in responses.

Table 3-496 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 297


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.15.5.2 Query the Mapping Between VLANs and an Instance


Operation URI Description

GET /vlan/instances/instance Query the mapping between


VLANs and an instance.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<instance>
<instanceId></instanceId>
<vlans></vlans>
</instance>
Table 3-497 describes elements in requests.

Table 3-497 Elements


Element Description

instanceId Specifies an instance ID.

vlans Specifies a VLAN corresponding to an


instance. The value is in the bit map type.

l Response example (XML format)


<instance>
<instanceId>0</instanceId>

<vlans>7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFE</vlans>
</instance>
Table 3-498 describes elements in responses.

Table 3-498 Elements


Element Description

instanceId Specifies an instance ID.

vlans Specifies a VLAN list corresponding to


an instance. The VLAN list is in the bit
map type.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 298


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-499 describes status codes in responses.

Table 3-499 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.15.5.3 Delete the Mapping between VLANs and an Instance


Operation URI Description

POST /vlan/shVlanInstDel Delete the mapping between


VLANs and an instance.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<shVlanInstDel>
<instanceId>2</instanceId>

<vlans>10000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000:100000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000</vlans>
</shVlanInstDel>
Table 3-500 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 299


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-500 Elements


Element Description

instanceId Specifies an instance ID.

vlans Specifies a VLAN list corresponding to


an instance. The VLAN list is in the bit
map type.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-501 describes status codes in responses.

Table 3-501 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.15.6 VLANIF

3.15.6.1 Create or Modify a VLANIF Interface's Parameters


Operation URI Description

POST /vlan/vlans/vlan Create or modify a VLANIF


interface's parameters.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vlan operation="merge">
<vlanId>1</vlanId>
<vlanif>
<cfgBand>3</cfgBand>
<dampTime>5</dampTime>
</vlanif>
</vlan>

Table 3-502 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 300


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-502 Elements

Element Description

vlanId Specifies a VLAN ID.

cfgBand Specifies a VLANIF interface's


bandwidth.

dampTime Specifies a period after which a VLANIF


interface goes Down.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-503 describes status codes in responses.

Table 3-503 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.15.6.2 Query VLANIF Interface Information


Operation URI Description

GET /vlan/vlans/vlan Query VLANIF interface


information.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vlan>
<vlanId>1</vlanId>
<vlanif>
<ifName></ifName>
<cfgBand></cfgBand>
<dampTime></dampTime>
</vlanif>
</vlan>

Table 3-504 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 301


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-504 Elements


Element Description

vlanId Specifies a VLAN ID.

cfgBand Specifies a VLANIF interface's


bandwidth.

dampTime Specifies a period after which a VLANIF


interface goes Down.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vlan>
<vlanId>1</vlanId>
<vlanif>
<ifName>Vlanif1</ifName>
<cfgBand>2</cfgBand>
<dampTime>2</dampTime>
</vlanif>
</vlan>

Table 3-505 describes elements in responses.

Table 3-505 Elements


Element Description

vlanId Specifies a VLAN ID.

cfgBand Specifies a VLANIF interface's


bandwidth.

dampTime Specifies a period after which a VLANIF


interface goes Down.

Table 3-506 describes status codes in responses.

Table 3-506 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 302


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.15.7 Bind a BD to a VLAN

3.15.7.1 Bind a BD to a VLAN


Operation URI Description

POST /evc/bds/bd Bind a BD to a VLAN.

I. Create a BD and bind it to a VLAN at the same time.


l Request example
<?xml version="1.0" encoding="UTF-8"?>
<bd operation="create">
<bdId>10</bdId>
<bdDesc/>
<statistic>disable</statistic>
<macLearn>enable</macLearn>
<bdBindVlan>

<vlanList>00200000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000:002000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000</vlanList>
</bdBindVlan>
</bd>

Table 3-507 describes elements in a request.

Table 3-507 Elements


Element Description

bdId Specifies a BD ID.

vlanList Specifies the VLAN to which the BD is


bound. The value is of a Bitmap type.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 303


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-508 describes status codes in a response.

Table 3-508 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

II. Create a BD and then bind it to a VLAN.


Request example
<?xml version="1.0" encoding="UTF-8"?>
<bds>
<bd operation="create">
<bdId>11</bdId>
<bdDesc/>
<statistic>disable</statistic>
<macLearn>enable</macLearn>
<bdBindVlan>
<vlanList/>
</bdBindVlan>
</bd>
</bds>

Table 3-509 describes elements in a request.

Table 3-509 Elements


Element Description

bdId Specifies a BD ID.

– Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-510 describes status codes in a response.

Table 3-510 Status codes


Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 304


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or
unidentified processing errors.

– Request example
<?xml version="1.0" encoding="UTF-8"?>
<bds>
<bd operation="merge">
<bdId>11</bdId>
<bdBindVlan>

<vlanList>001000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
000000000000:001000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000</vlanList>
</bdBindVlan>
</bd>
</bds>

Table 3-511 describes elements in a request.

Table 3-511 Elements

Element Description

bdId Specifies a BD ID.

vlanList Specifies the VLAN to which the BD


is bound. The value is of a Bitmap
type.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 305


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

– Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-512 describes status codes in a response.

Table 3-512 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or
unidentified processing errors.

3.15.7.2 Query the VLAN Bound to a BD


Operation URI Description

GET /evc/bds/bd Query the VLAN bound to a


BD.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<bd>
<bdId>10</bdId>
<bdDesc/>
<statistic/>
<macLearn/>
<vbdif>
<ifName/>
</vbdif>
<bdStatistics>
<inboundPackets/>
<inboundBytes/>
<outboundPackets/>
<outboundBytes/>
</bdStatistics>
<bdBindVlan>
<vlanList/>
</bdBindVlan>
</bd>

Table 3-513 describes elements in a request.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 306


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-513 Elements


Element Description

bdId Specifies a BD ID.

vlanList Specifies the VLAN to which the BD is


bound. The value is of a Bitmap type.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<bds>
<bd>
<bdId>10</bdId>
<bdDesc></bdDesc>
<macLearn>enable</macLearn>
<statistic>disable</statistic>
<bdBindVlan>

<vlanList>40000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000</vlanList>
</bdBindVlan>
</bd>
</bds>

Table 3-514 shows elements in responses.

Table 3-514 Elements


Element Description

bdId Specifies a BD ID.

vlanList Specifies the VLAN to which the BD is


bound. The value is of a Bitmap type.

Table 3-515 describes status codes in a response.

Table 3-515 Status codes


Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 307


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.15.7.3 Delete the Binding Between a VLAN and a BD


Operation URI Description

POST /evc/bds/bd Delete the binding between


a VLAN and a BD.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<bd operation="merge">
<bdId>10</bdId>
<bdBindVlan>

<vlanList>00000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000:002000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000</vlanList>
</bdBindVlan>
</bd>

Table 3-516 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 308


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-516 Elements

Element Description

vlanId Specifies a VLAN ID.

cfgBand Specifies the bandwidth for a VLANIF


interface.

dampTime Specifies a delay after which a VLANIF


interface goes Down.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vlans>
<vlan>
<vlanId>1</vlanId>
<vlanif>
<ifName>Vlanif1</ifName>
<cfgBand>2</cfgBand>
<dampTime>2</dampTime>
</vlanif>
</vlan>
</vlans>

Table 3-517 shows elements in responses.

Table 3-517 Elements

Element Description

bdId Specifies a BD ID.

vlanList Specifies a list of VLANs to which a BD


is bound. The value is a BITMAP type.

Table 3-518 describes status codes in responses.

Table 3-518 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 309


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.16 Layer 2 and Layer 3 Interface Information

3.16.1 Query Layer 2 and Layer 3 Interface Information


Operation URI Description

GET /ethernet/ethernetIfs/ Query Layer 2 interface


ethernetIf information, including the
interface name and whether
the Layer 2 mode is enabled.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<ethernetIf>
<ifName></ifName>
<l2Enable></l2Enable>
</ethernetIf>

Table 3-519 describes elements in requests.

Table 3-519 Elements


Element Description

ifName Specifies an interface name.

l2Enable Indicates whether the Layer 2 mode is


enabled.
l enable: The Layer 2 mode is enabled.
l disable: The Layer 2 mode is disabled.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ethernetIf>
<ifName>10GE1/0/1</ifName>
<l2Enable>enable</l2Enable>
</ethernetIf>

Table 3-520 describes elements in responses.

Table 3-520 Elements


Element Description

ifName Specifies an interface name.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 310


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

l2Enable Indicates whether the Layer 2 mode is


enabled.
l enable: The Layer 2 mode is enabled.
l disable: The Layer 2 mode is disabled.

Table 3-521 describes status codes in responses.

Table 3-521 Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.16.2 Set Layer 2 and Layer 3 Attributes for an Interface


Operation URI Description

PUT /ethernet/ethernetIfs/ Set Layer 2 and Layer 3


ethernetIf attributes for an interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<ethernetIf>
<ifName>10GE1/0/1</ifName>
<l2Enable>disable</l2Enable>
</ethernetIf>

Table 3-522 describes elements in requests.

Table 3-522 Elements

Element Description

ifName Specifies an interface name.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 311


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

l2Enable Indicates whether the Layer 2 mode is


enabled.
l enable: The Layer 2 mode is enabled.
l disable: The Layer 2 mode is disabled.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-523 describes status codes in responses.

Table 3-523 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.16.3 Set Layer 2 Interface Attributes


Operation URI Description

PUT /ethernet/ethernetIfs/ Set a link type and default


ethernetIf VLAN for a Layer 2
interface.

Set link attributes for an interface:


l Request example
<?xml version="1.0" encoding="UTF-8"?>
<ethernetIf>
<ifName>10GE1/0/1</ifName>
<l2Enable>enable</l2Enable>
<l2Attribute>
<linkType>hybrid</linkType>
<pvid>10</pvid>
<trunkVlans></trunkVlans>
<portBridgEnable>true</portBridgEnable>
<taggedPacketDiscard>false</taggedPacketDiscard>
<muxVlanEna>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 312


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<enableVlans>40000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000:400000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000</enableVlans>
</muxVlanEna>
</l2Attribute>
</ethernetIf>

Table 3-524 describes elements in requests.

Table 3-524 Elements


Element Description

ifName Specifies an interface name.

l2Enable Indicates whether an interface is a Layer


2 interface.

linkType Specifies the link type of an interface.


l access: access interface
l trunk: trunk interface
l hybrid: hybrid interface
l dot1qtunnel: QinQ tunnel interface

pvid Specifies the default VLAN ID of an


interface.

trunkVlans Specifies the IDs of the VLANs to which


an interface is added. The VLAN IDs are
in the bit map type.

portBridgEnable Specifies whether loopback is enabled on


the interface.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 313


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

untagVlans Specifies the VLAN IDs to be removed


from an interface. The VLAN IDs are in
the bit map type.

taggedPacketDiscard Specifies whether an interface discards


tagged packets.

enableVlans Specifies a MUX VLAN, in the bit map


type.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-525 describes status codes in responses.

Table 3-525 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Set VLANs to which an interface is to be added:


l Request example
<?xml version="1.0" encoding="UTF-8"?>
<ethernetIfs>
<ethernetIf>
<ifName>10GE1/0/1</ifName>
<l2Attribute>

<trunkVlans>403FFFFFFFFFFFFFFFFFFFFFF80000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000:0000000000000000000000000200000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 314


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000</trunkVlans>
</l2Attribute>
</ethernetIf>
</ethernetIfs>

Table 3-526 describes elements in requests.

Table 3-526 Elements


Element Description

ifName Specifies an interface name.

trunkVlans Specifies the IDs of the VLANs to which


an interface is added. The VLAN IDs are
in the bit map type.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-527 describes status codes in responses.

Table 3-527 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Modify the VLANs to which an interface is added:

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<ethernetIfs>
<ethernetIf operation="merge">
<ifName>10GE1/0/1</ifName>
<l2Attribute>

<trunkVlans>000001000000000000000000000000000000000000000000000000000000000000

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 315


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000:0110010000000000000000000200000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000</trunkVlans>
</l2Attribute>
</ethernetIf>
</ethernetIfs>

Table 3-528 describes elements in requests.

Table 3-528 Elements


Element Description

ifName Specifies an interface name.

trunkVlans Specifies the IDs of the VLANs to which


an interface is added. The VLAN IDs are
in the bit map type.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-529 describes status codes in responses.

Table 3-529 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 316


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.16.4 Interface Protocol VLAN

3.16.4.1 Add an Interface to a Protocol VLAN


Operati URI Description
on

PUT /ethernet/ethernetIfs/ethernetIf Add an interface to a


protocol VLAN.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<ethernetIf operation="merge">
<ifName>10GE1/0/1</ifName>
<l2Attribute>
<ifProtocolVlans>
<ifProtocolVlan operation="create">
<vlan>2</vlan>
<protocolIndex>1</protocolIndex>
<priority>5</priority>
</ifProtocolVlan>
</ifProtocolVlans>
</l2Attribute>
</ethernetIf>

Table 3-530 describes elements in requests.

Table 3-530 Elements

Element Description

vlan Specifies the ID of the VLAN to which


an interface is added.

protocolIndex Specifies a protocol index.

priority Specifies a priority.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-531 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 317


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-531 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.16.4.2 Remove an Interface from a Protocol VLAN


Operation URI Description

DELETE //ethernet/ethernetIfs/ Remove an interface from a


ethernetIf protocol VLAN.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<ethernetIf>
<ifName>10GE1/0/1</ifName>
<l2Attribute>
<ifProtocolVlans>
<ifProtocolVlan operation="merge">
<vlan>3</vlan>
<protocolIndex>1</protocolIndex>
</ifProtocolVlan>
</ifProtocolVlans>
</l2Attribute>
</ethernetIf>

Table 3-532 describes elements in requests.

Table 3-532 Elements


Element Description

vlan Specifies the ID of the VLAN to which


an interface is added.

protocolIndex Specifies a protocol index.

priority Specifies a priority.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-533 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 318


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-533 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.16.4.3 Query the Protocol VLAN of an Interface


Operat URI Description
ion

GET /ethernet/ethernetIfs/ethernetIf Query the protocol VLAN


of an interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<ethernetIf>
<ifName>10GE1/0/1</ifName>
<l2Attribute>
<ifProtocolVlans>
<ifProtocolVlan>
<vlan></vlan>
<protocolIndex></protocolIndex>
<priority></priority>
</ifProtocolVlan>
</ifProtocolVlans>
</l2Attribute>
</ethernetIf>

Table 3-534 describes elements in requests.

Table 3-534 Elements


Element Description

vlan Specifies the ID of the VLAN to which


an interface is added.

protocolIndex Specifies a protocol index.

priority Specifies a priority.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ethernetIf>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 319


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<ifName>10GE1/0/1</ifName>
<l2Attribute>
<ifIndex>8</ifIndex>
<ifProtocolVlans>
<ifProtocolVlan>
<vlan>3</vlan>
<protocolIndex>2</protocolIndex>
<priority>0</priority>
</ifProtocolVlan>
</ifProtocolVlans>
</l2Attribute>
</ethernetIf>

Table 3-535 describes elements in responses.

Table 3-535 Elements


Element Description

vlan Specifies the ID of the VLAN to which


an interface is added.

protocolIndex Specifies a protocol index.

priority Specifies a priority.

Table 3-536 describes status codes in responses.

Table 3-536 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.16.5 Interface Layer 2 Isolation Group

3.16.5.1 Add an Interface to a Layer 2 Isolation Group


Opera URI Description
tion

POST /ethernet/ethernetIfs/ethernetIf Add an interface to a Layer


2 isolation group.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 320


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<ethernetIf operation="merge">
<ifName>10GE1/0/1</ifName>
<l2Attribute>
<portIsolateGroups>
<portIsolateGroup operation="create">
<groupId>2</groupId>
</portIsolateGroup>
</portIsolateGroups>
</l2Attribute>
</ethernetIf>

Table 3-537 describes elements in requests.

Table 3-537 Elements


Element Description

ifName Specifies an interface name.

groupId Specifies the ID of the Layer 2 isolation


group to which an interface is added.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-538 describes status codes in responses.

Table 3-538 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.16.5.2 Remove an Interface from a Layer 2 Isolation Group


Operation URI Description

PUT /ethernet/ethernetIfs/ethernetIf Remove an interface from a


Layer 2 isolation group.

l Request example

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 321


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<?xml version="1.0" encoding="UTF-8"?>


<ethernetIf operation="merge">
<ifName>10GE1/0/1</ifName>
<l2Attribute>
<portIsolateGroups>
<portIsolateGroup operation="delete">
<groupId>2</groupId>
</portIsolateGroup>
</portIsolateGroups>
</l2Attribute>
</ethernetIf>

Table 3-539 describes elements in requests.

Table 3-539 Elements


Element Description

ifName Specifies an interface name.

groupId Specifies the ID of the Layer 2 isolation


group to which an interface is added.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-540 describes status codes in responses.

Table 3-540 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.16.5.3 Query Interface Layer 2 Isolation Groups


Operati URI Description
on

GET /ethernet/ethernetIfs/ethernetIf Query interface Layer 2


isolation groups.

l Request example

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 322


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<?xml version="1.0" encoding="UTF-8"?>


<ethernetIf operation="merge">
<ifName>10GE1/0/1</ifName>
<l2Attribute>
<portIsolateGroups>
<portIsolateGroup>
<groupId></groupId>
</portIsolateGroup>
</portIsolateGroups>
</l2Attribute>
</ethernetIf>

Table 3-541 describes elements in requests.

Table 3-541 Elements

Element Description

ifName Specifies an interface name.

groupId Specifies the ID of the Layer 2 isolation


group to which an interface is added.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ethernetIf>
<ifName>10GE1/0/1</ifName>
<l2Attribute>
<ifIndex>9</ifIndex>
<portIsolateGroups>
<portIsolateGroup>
<groupId>2</groupId>
</portIsolateGroup>
</portIsolateGroups>
</l2Attribute>
</ethernetIf>

Table 3-542 describes elements in responses.

Table 3-542 Elements

Element Description

ifName Specifies an interface name.

groupId Specifies the ID of the Layer 2 isolation


group to which an interface is added.

Table 3-543 describes status codes in responses.

Table 3-543 Status codes

Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 323


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.16.6 Stacking VLAN of an Interface

3.16.6.1 Add an Interface to a Stacking VLAN


Operat URI Description
ion

POST /ethernet/createL2StackExt Add an interface to a


stacking VLAN.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<createL2StackExt>
<ifName>10GE1/0/1</ifName>
<l2StackType>Stacking</l2StackType>
<stackVidBgn>2</stackVidBgn>
<stackVidEnd>3</stackVidEnd>
<stackingVid>5</stackingVid>
</createL2StackExt>

Table 3-544 describes elements in requests.

Table 3-544 Elements


Element Description

ifName Specifies an interface name.

l2StackType Specifies a Layer 2 stacking type.

stackVidBgn Specifies the start VLAN ID before


VLAN stacking is configured.

stackVidEnd Specifies the end VLAN ID before


VLAN stacking is configured.

stackingVid Specifies the VLAN ID stacked.

l Response example (XML format)

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 324


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<?xml version="1.0" encoding="UTF-8"?>


<ok/>

Table 3-545 describes status codes in responses.

Table 3-545 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.16.6.2 Remove an Interface from a Stacking VLAN


Operati URI Description
on

POST /ethernet/deleteL2StackExt Remove an interface from a


stacking VLAN.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<deleteL2StackExt>
<ifName>10GE1/0/1</ifName>
<l2StackType>Stacking</l2StackType>
<stackVidBgn>2</stackVidBgn>
<stackVidEnd></stackVidEnd>
<stackingVid>5</stackingVid>
</deleteL2StackExt>

Table 3-546 describes elements in requests.

Table 3-546 Elements

Element Description

ifName Specifies an interface name.

l2StackType Specifies a Layer 2 stacking type.

stackVidBgn Specifies the start VLAN ID before


VLAN stacking is configured.

stackVidEnd Specifies the end VLAN ID before


VLAN stacking is configured.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 325


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

stackingVid Specifies the VLAN ID stacked.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-547 describes status codes in responses.

Table 3-547 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.16.6.3 Query the Stacking VLAN


Operatio URI Description
n

GET /ethernet/ethernetIfs/ethernetIf Query the stacking VLAN.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<ethernetIf>
<ifName>10GE1/0/1</ifName>
<l2Attribute>
<l2StackPortExts>
<l2StackPortExt>
<segIndex></segIndex>
<l2StackType></l2StackType>
<stackVidBgn></stackVidBgn>
<stackVidEnd></stackVidEnd>
<stackingVid></stackingVid>
</l2StackPortExt>
</l2StackPortExts>
</l2Attribute>
</ethernetIf>

Table 3-548 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 326


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-548 Elements


Element Description

ifName Specifies an interface name.

l2StackType Specifies a Layer 2 stacking type.

stackVidBgn Specifies the start VLAN ID before


VLAN stacking is configured.

stackVidEnd Specifies the end VLAN ID before


VLAN stacking is configured.

stackingVid Specifies the VLAN ID stacked.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ethernetIf>
<ifName>10GE1/0/1</ifName>
<l2Attribute>
<ifIndex>6</ifIndex>
<l2StackPortExts>
<l2StackPortExt>
<segIndex>1</segIndex>
<l2StackType>Stacking</l2StackType>
<stackVidBgn>2</stackVidBgn>
<stackVidEnd>3</stackVidEnd>
<stackingVid>5</stackingVid>
</l2StackPortExt>
</l2StackPortExts>
</l2Attribute>
</ethernetIf>

Table 3-549 describes elements in responses.

Table 3-549 Elements


Element Description

ifName Specifies an interface name.

l2StackType Specifies a Layer 2 stacking type.

stackVidBgn Specifies the start VLAN ID before


VLAN stacking is configured.

stackVidEnd Specifies the end VLAN ID before


VLAN stacking is configured.

stackingVid Specifies the VLAN ID stacked.

Table 3-550 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 327


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-550 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.16.7 Mapping VLAN of an Interface

3.16.7.1 Add an Interface to a Mapping VLAN


Operation URI Description

POST /ethernet/createL2MapExt Add an interface to a


mapping VLAN.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<createL2MapExt>
<ifName>10GE1/0/1</ifName>
<l2MapType>Mapping1to1</l2MapType>
<mapVid>10</mapVid>
<mapInnerVid></mapInnerVid>
<mappingVid>2</mappingVid>
</createL2MapExt>

Table 3-551 describes elements in requests.

Table 3-551 Elements


Element Description

ifName Specifies an interface name.

mappingType Specifies a Layer 2 mapping type.

l2mapVid Specifies a VLAN ID before VLAN


mapping is configured.

mapInnerVid Specifies an inner VLAN ID before


VLAN mapping is configured.

mappingVid Specifies a VLAN ID to which another


VLAN ID is mapped.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 328


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-552 describes status codes in responses.

Table 3-552 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.16.7.2 Remove an Interface from a Mapping VLAN


Operation URI Description

POST /ethernet/deleteL2MapExt Remove an interface from a


mapping VLAN.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<deleteL2MapExt>
<ifName>10GE1/0/1</ifName>
<l2MapType>Mapping1to1</l2MapType>
<mapVid>10</mapVid>
<mapInnerVid></mapInnerVid>
<mappingVid>2</mappingVid>
</deleteL2MapExt>

Table 3-553 describes elements in requests.

Table 3-553 Elements

Element Description

ifName Specifies an interface name.

mappingType Specifies a Layer 2 mapping type.

l2mapVid Specifies a VLAN ID before VLAN


mapping is configured.

mapInnerVid Specifies an inner VLAN ID before


VLAN mapping is configured.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 329


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

mappingVid Specifies a VLAN ID to which another


VLAN ID is mapped.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-554 describes status codes in responses.

Table 3-554 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.16.7.3 Query the Mapping VLAN


Oper URI Description
ation

GET /ethernet/ethernetIfs/ethernetIf Query the mapping VLAN.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<ethernetIf>
<ifName>10GE1/0/1</ifName>
<l2Attribute>
<l2MapPortExts>
<l2MapPortExt>
<segIndex></segIndex>
<l2MapType></l2MapType>
<mapVid></mapVid>
<mapInnerVid></mapInnerVid>
<mappingVid></mappingVid>
</l2MapPortExt>
</l2MapPortExts>
</l2Attribute>
</ethernetIf>

Table 3-555 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 330


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-555 Elements


Element Description

ifName Specifies an interface name.

mappingType Specifies a Layer 2 mapping type.

l2mapVid Specifies a VLAN ID before VLAN


mapping is configured.

mapInnerVid Specifies an inner VLAN ID before


VLAN mapping is configured.

mappingVid Specifies a VLAN ID to which another


VLAN ID is mapped.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ethernetIf>
<ifName>10GE1/0/1</ifName>
<l2Attribute>
<ifIndex>6</ifIndex>
<l2MapPortExts>
<l2MapPortExt>
<segIndex>3</segIndex>
<l2MapType>Mapping1to1</l2MapType>
<mapVid>10</mapVid>
<mapInnerVid/>
<mappingVid>2</mappingVid>
</l2MapPortExt>
</l2MapPortExts>
</l2Attribute>
</ethernetIf>

Table 3-556 describes elements in responses.

Table 3-556 Elements


Element Description

ifName Specifies an interface name.

mappingType Specifies a Layer 2 mapping type.

l2mapVid Specifies a VLAN ID before VLAN


mapping is configured.

mapInnerVid Specifies an inner VLAN ID before


VLAN mapping is configured.

mappingVid Specifies a VLAN ID to which another


VLAN ID is mapped.

Table 3-557 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 331


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-557 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.16.8 Dot1q VLAN Tag Termination Sub-interface

3.16.8.1 Create a Dot1q VLAN Tag Termination Sub-interface


Opera URI Description
tion

POST /ethernet/ethSubIfs/ethSubIf Create an Ethernet dot1q


VLAN tag termination sub-
interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<ethSubIf operation="create">
<ifName>10GE1/0/1.1</ifName>
<flowType>Dot1qTerm</flowType>
<dot1qBitmap>20000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000:200000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 332


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000</dot1qBitmap>
</ethSubIf>

Table 3-558 describes elements in requests.

Table 3-558 Elements


Element Description

ifName Specifies the name of a sub-interface.

flowType Specifies the type of a sub-interface.


l Dot1qTerm: dot1q VLAN tag
termination sub-interface

dot1qBitmap Specifies the ID of the VLAN to which a


sub-interface is added.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-559 describes status codes in responses.

Table 3-559 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.16.8.2 Delete a Dot1q VLAN Tag Termination Sub-interface


Operation URI Description

DELETE /ethernet/ethSubIfs/ethSubIf Delete an Ethernet dot1q


VLAN tag termination sub-
interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<ethSubIf operation="delete">

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 333


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<ifName>10GE1/0/1.1</ifName>
</ethSubIf>

Table 3-560 describes elements in requests.

Table 3-560 Elements


Element Description

ifName Specifies the name of a sub-interface.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-561 describes status codes in responses.

Table 3-561 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.16.8.3 Modify the VLAN of a Dot1q VLAN Tag Termination Sub-interface


Operation URI Description

PUT /ethernet/ethSubIfs/ethSubIf Modify the VLAN of an


Ethernet dot1q VLAN tag
termination sub-interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<ethSubIf operation="merge">
<ifName>10GE1/0/1.1</ifName>
<flowType>Dot1qTerm</flowType>

<dot1qBitmap>20000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 334


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000:200000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000</dot1qBitmap>
</ethSubIf>

Table 3-562 describes elements in requests.

Table 3-562 Elements

Element Description

ifName Specifies the name of a sub-interface.

flowType Specifies the type of a sub-interface.


l Dot1qTerm: dot1q VLAN tag
termination sub-interface

dot1qBitmap Specifies the ID of the VLAN to which a


sub-interface is added.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-563 describes status codes in responses.

Table 3-563 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 335


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.16.8.4 Query the VLAN of a Dot1q VLAN Tag Termination Sub-interface


Oper URI Description
ation

GET /ethernet/ethSubIfs/ethSubIf Query the VLAN of a dot1q VLAN tag


termination sub-interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<ethSubIf>
<ifName>10GE1/0/1.1</ifName>
<flowType></flowType>
<dot1qBitmap></dot1qBitmap>
</ethSubIf>

Table 3-564 describes elements in requests.

Table 3-564 Elements


Element Description

ifName Specifies the name of a sub-interface.

flowType Specifies the type of a sub-interface.


l Dot1qTerm: dot1q VLAN tag
termination sub-interface

dot1qBitmap Specifies the ID of the VLAN to which a


sub-interface is added.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ethSubIf>
<ifName>10GE1/0/1.1</ifName>
<flowType>Dot1qTerm</flowType>

<dot1qBitmap>20000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000</dot1qBitmap>
</ethSubIf>

Table 3-565 describes elements in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 336


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-565 Elements


Element Description

ifName Specifies the name of a sub-interface.

flowType Specifies the type of a sub-interface.


l Dot1qTerm: dot1q VLAN tag
termination sub-interface

dot1qBitmap Specifies the ID of the VLAN to which a


sub-interface is added.

Table 3-566 describes status codes in responses.

Table 3-566 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.17 MSTP

3.17.1 MSTP Process

3.17.1.1 Create an MSTP Process


Operation URI Description

POST /mstp/processs/process Create an MSTP process.

l Request example
<mstp xmlns='http://www.huawei.com/netconf/vrp' content-version='1.0' format-
version='1.0'>
<processs>
<process operation='create'>
<processId>1</processId>
<enable>false</enable>
<bpduProtection>false</bpduProtection>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 337


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<flushCapability>false</flushCapability>
<maxHops>20</maxHops>
<mode>Mstp</mode>
<pathCostStandard>Dot1T</pathCostStandard>
<tcNotify>false</tcNotify>
<tcProtection>false</tcProtection>
<tcProtectionThreshold>1</tcProtectionThreshold>
<interval/>
<timerFactor>3</timerFactor>
<linkShareProtect>false</linkShareProtect>
<regionName/>
<revisionLevel>0</revisionLevel>
<modulo/>
<instVlanMode>false</instVlanMode>
<forwardDelay>1500</forwardDelay>
<helloTime>200</helloTime>
<maxAge>2000</maxAge>
<timerParaMode>false</timerParaMode>
<convergeMode>Normal</convergeMode>
/process>
</processs>
</mstp>

Table 3-567 describes elements in requests.

Table 3-567 Elements


Element Description

processId Specifies a process ID.

enable Enables or disables STP/RSTP/MSTP on


a switch.

bpduProtection Enables or disables BPDU protection on


the edge port to prevent network flapping
in the case of attacks.

flushCapability Enables or disables the flush function.

mode Specifies a working mode for an MSTP


process. The value can be STP, RSTP, or
MSTP.

pathCostStandard Specifies a method for calculating the


path cost. The value can be dot1d-1998,
dot1t, or legacy. The default value is
dot1t.

tcNotify Enables TC notification for an MSTP


process. By default, TC notification is
disabled.

tcProtection Enables protection for TC BPDUs of an


MSTP process. By default, protection for
TC BPDUs of an MSTP process is
disabled, meaning that the MSTP process
updates entries upon receipt of a TC
BPDU.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 338


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

tcProtectionThreshold Specifies the maximum number of TC


BPDUs that an MSTP process can
process in a specified period of time. By
default, an MSTP process can process
only one TC BPDU in a specified period
of time.

interval Specifies a period of time during which


an MSTP process can process received
TC BPDUs. By default, an MSTP process
can process only one TC BPDU in a
specified period of time.

timerFactor Specifies a multiplier of HelloTime to


obtain the timeout period. The value is an
integer ranging from 1 to 10. The default
value is 3.

linkShareProtect Enables shared link protection for an


MSTP process.

regionName Specifies an MSTP region name. By


default, the MSTP region name is the
MAC address of the switch's main control
board.

revisionLevel Specifies an MSTP revision level. The


default value is 0.

modulo Specifies an instance-VLAN mapping


mode.

instVlanMode Indicates whether to use the instance-


VLAN mapping mode.

forwardDelay Specifies a Forward Delay time. The


value is an integer ranging from 400 to
3000, in centiseconds. The step is 100.
The default value is 1500 centiseconds.

helloTime Specifies a Hello time. The value is an


integer ranging from 100 to 1000, in
centiseconds. The step is 100. The default
value is 200 centiseconds.

maxAge Specifies an aging time of BPDUs on


interfaces. The value is an integer ranging
from 600 to 4000, in centiseconds. The
step is 100. The default value is 2000
centiseconds.

timerParaMode Indicates whether to use the network


diameter of the bridge to configure
timers.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 339


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

convergeMode Specifies an MSTP convergence mode.


By default, the value is normal.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-568 describes status codes in responses.

Table 3-568 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.17.1.2 Query an MSTP Process


Operation URI Description

GET /mstp/processs/process Query an MSTP process.

l Request example
<mstp xmlns='http://www.huawei.com/netconf/vrp' content-version='1.0' format-
version='1.0'>
<processs>
<process>
<processId>0</processId>
<enable/>
<bpduProtection/>
<flushCapability/>
<maxHops/>
<mode/>
<pathCostStandard/>
<tcNotify/>
<tcProtection/>
<tcProtectionThreshold/>
<interval/>
<timerFactor/>
<linkShareProtect/>
<regionName/>
<revisionLevel/>
<modulo/>
<instVlanMode/>
<forwardDelay/>
<helloTime/>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 340


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<maxAge/>
<bridgeDiameter/>
<timerParaMode/>
<convergeMode/>
<syncFlag/>
</process>
</processs>
</mstp>

Table 3-569 describes elements in requests.

Table 3-569 Elements

Element Description

processId Specifies a process ID.

enable Enables or disables STP/RSTP/MSTP on


a switch.

bpduProtection Enables or disables BPDU protection on


the edge port to prevent network flapping
in the case of attacks.

flushCapability Enables or disables the flush function.

mode Specifies a working mode for an MSTP


process. The value can be STP, RSTP, or
MSTP.

pathCostStandard Specifies a method for calculating the


path cost. The value can be dot1d-1998,
dot1t, or legacy. The default value is
dot1t.

tcNotify Enables TC notification for an MSTP


process. By default, TC notification is
disabled.

tcProtection Enables protection for TC BPDUs of an


MSTP process. By default, protection for
TC BPDUs of an MSTP process is
disabled, meaning that the MSTP process
updates entries upon receipt of a TC
BPDU.

tcProtectionThreshold Specifies the maximum number of TC


BPDUs that an MSTP process can
process in a specified period of time. By
default, an MSTP process can process
only one TC BPDU in a specified period
of time.

interval Specifies a period of time during which


an MSTP process can process received
TC BPDUs. By default, an MSTP process
can process only one TC BPDU in a
specified period of time.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 341


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

timerFactor Specifies a multiplier of HelloTime to


obtain the timeout period. The value is an
integer ranging from 1 to 10. The default
value is 3.

linkShareProtect Enables shared link protection for an


MSTP process.

regionName Specifies an MSTP region name. By


default, the MSTP region name is the
MAC address of the switch's main control
board.

revisionLevel Specifies an MSTP revision level. The


default value is 0.

modulo Specifies an instance-VLAN mapping


mode.

instVlanMode Indicates whether to use the instance-


VLAN mapping mode.

forwardDelay Specifies a Forward Delay time. The


value is an integer ranging from 400 to
3000, in centiseconds. The step is 100.
The default value is 1500 centiseconds.

helloTime Specifies a Hello time. The value is an


integer ranging from 100 to 1000, in
centiseconds. The step is 100. The default
value is 200 centiseconds.

maxAge Specifies an aging time of BPDUs on


interfaces. The value is an integer ranging
from 600 to 4000, in centiseconds. The
step is 100. The default value is 2000
centiseconds.

timerParaMode Indicates whether to use the network


diameter of the bridge to configure
timers.

convergeMode Specifies an MSTP convergence mode.


The default value is normal.

syncFlag Specifies the process synchronization


status.

l Response example (XML format)


<mstp xmlns="http://www.huawei.com/netconf/vrp" format-version="1.0" content-
version="1.0">
<processs>
<process>
<processId>0</processId>
<enable>false</enable>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 342


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<bpduProtection>false</bpduProtection>
<maxHops>20</maxHops>
<mode>Mstp</mode>
<pathCostStandard>Dot1T</pathCostStandard>
<tcNotify>false</tcNotify>
<tcProtection>true</tcProtection>
<tcProtectionThreshold>1</tcProtectionThreshold>
<interval>2</interval>
<timerFactor>3</timerFactor>
<linkShareProtect>false</linkShareProtect>
<regionName>389a04111200</regionName>
<revisionLevel>0</revisionLevel>
<modulo/>
<instVlanMode>false</instVlanMode>
<forwardDelay>1500</forwardDelay>
<helloTime>200</helloTime>
<maxAge>2000</maxAge>
<bridgeDiameter>7</bridgeDiameter>
<timerParaMode>false</timerParaMode>
<convergeMode>Normal</convergeMode>
<syncFlag>true</syncFlag>
<flushCapability>false</flushCapability>
</process>
</processs>
</mstp>

Table 3-570 describes elements in responses.

Table 3-570 Elements


Element Description

processId Specifies a process ID.

enable Enables or disables STP/RSTP/MSTP on


a switch.

bpduProtection Enables or disables BPDU protection on


the edge port to prevent network flapping
in the case of attacks.

flushCapability Enables or disables the flush function.

mode Specifies a working mode for an MSTP


process. The value can be STP, RSTP, or
MSTP.

pathCostStandard Specifies a method for calculating the


path cost. The value can be dot1d-1998,
dot1t, or legacy. The default value is
dot1t.

tcNotify Enables TC notification for an MSTP


process. By default, TC notification is
disabled.

tcProtection Enables protection for TC BPDUs of an


MSTP process. By default, protection for
TC BPDUs of an MSTP process is
disabled, meaning that the MSTP process
updates entries upon receipt of a TC
BPDU.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 343


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

tcProtectionThreshold Specifies the maximum number of TC


BPDUs that an MSTP process can
process in a specified period of time. By
default, an MSTP process can process
only one TC BPDU in a specified period
of time.

interval Specifies a period of time during which


an MSTP process can process received
TC BPDUs. By default, an MSTP process
can process only one TC BPDU in a
specified period of time.

timerFactor Specifies a multiplier of HelloTime to


obtain the timeout period. The value is an
integer ranging from 1 to 10. The default
value is 3.

linkShareProtect Enables shared link protection for an


MSTP process.

regionName Specifies an MSTP region name. By


default, the MSTP region name is the
MAC address of the switch's main control
board.

revisionLevel Specifies an MSTP revision level. The


default value is 0.

modulo Specifies an instance-VLAN mapping


mode.

instVlanMode Indicates whether to use the instance-


VLAN mapping mode.

forwardDelay Specifies a Forward Delay time. The


value is an integer ranging from 400 to
3000, in centiseconds. The step is 100.
The default value is 1500 centiseconds.

helloTime Specifies a Hello time. The value is an


integer ranging from 100 to 1000, in
centiseconds. The default step is 100. The
default value is 200 centiseconds.

maxAge Specifies an aging time of BPDUs on


interfaces. The value is an integer ranging
from 600 to 4000, in centiseconds. The
step is 100. The default value is 2000
centiseconds.

timerParaMode Indicates whether to use the network


diameter of the bridge to configure
timers.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 344


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

convergeMode Specifies an MSTP convergence mode.


The default value is normal.

syncFlag Specifies the process synchronization


status.

Table 3-571 describes status codes in responses.

Table 3-571 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.17.1.3 Delete an MSTP Process


Operation URI Description

DELETE /mstp/processs/process Delete an MSTP process.

l Request example
<mstp xmlns='http://www.huawei.com/netconf/vrp' content-version='1.0' format-
version='1.0'>
<processs>
<process operation='delete'>
<processId>1</processId>
</process>
</processs>
</mstp>

Table 3-572 describes elements in requests.

Table 3-572 Elements


Element Description

processId Specifies a process ID.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 345


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-573 describes status codes in responses.

Table 3-573 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.17.1.4 Modify MSTP Process Attributes


Operation URI Description

PUT /mstp/processs/process Modify MSTP process


attributes.

l Request example
<mstp xmlns='http://www.huawei.com/netconf/vrp' content-version='1.0' format-
version='1.0'>
<processs>
<process operation='merge'>
<processId>0</processId>
<timerFactor>10</timerFactor>
</process>
</processs>
</mstp>

Table 3-574 describes elements in requests.

Table 3-574 Elements


Element Description

processId Specifies a process ID.

timerFactor Specifies a multiplier of HelloTime to


obtain the timeout period. The value is an
integer ranging from 1 to 10. The default
value is 3.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-575 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 346


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-575 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.17.2 Instance-VLAN Mapping

3.17.2.1 Modify the Instance-VLAN Mapping


Operation URI Description

POST /mstp/processs/process/ Modify the instance-VLAN


instVlans mapping.

l Request example
<mstp xmlns="http://www.huawei.com/netconf/vrp" content-version="1.0" format-
version="1.0">
<processs>
<process operation="merge">
<processId>0</processId>
<instVlans>
<instVlan operation="create">
<instanceId>1</instanceId>

<vlans>7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFE:
7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 347


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFE</vlans>
</instVlan>
</instVlans>
</process>
</processs>
</mstp>

Table 3-576 describes elements in requests.

Table 3-576 Elements


Element Description

processId Specifies a process ID.

instVlans Specifies an instance-VLAN mapping.

instanceId Specifies an instance ID.

vlans Specifies a VLAN list.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-577 describes status codes in responses.

Table 3-577 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.17.2.2 Query the Instance-VLAN Mapping


Operation URI Description

GET /mstp/processs/process/instVlans Query the instance-VLAN


mapping.

l Request example
<mstp xmlns='http://www.huawei.com/netconf/vrp' content-version='1.0' format-
version='1.0'>
<processs>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 348


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<process>
<processId>0</processId>
<instVlans>
<instVlan>
<instanceId>0</instanceId>
<vlans/>
</instVlan>
</instVlans>
</process>
</processs>
</mstp>

Table 3-578 describes elements in requests.

Table 3-578 Elements

Element Description

processId Specifies a process ID.

instVlans Specifies an instance-VLAN mapping.

instanceId Specifies an instance ID.

vlans Specifies a VLAN list.

l Response example (XML format)


<mstp xmlns="http://www.huawei.com/netconf/vrp" format-version="1.0" content-
version="1.0">
<processs>
<process>
<processId>0</processId>
<instVlans>
<instVlan>
<instanceId>0</instanceId>

<vlans>7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFE</vlans>
</instVlan>
</instVlans>
</process>
</processs>
</mstp>

Table 3-579 describes elements in responses.

Table 3-579 Elements

Element Description

processId Specifies a process ID.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 349


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

instVlans Specifies an instance-VLAN mapping.

instanceId Specifies an instance ID.

vlans Specifies a VLAN list.

Table 3-580 describes status codes in responses.

Table 3-580 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18 TRILL Configurations

3.18.1 TRILL Administrative VLAN

3.18.1.1 TRILL Administrative VLAN

3.18.1.1.1 Create a TRILL Administrative VLAN

Operation URI Description

PUT /trill/trillSites/trillSite/ Create a TRILL


trillAdminVlans/ administrative VLAN.
trillAdminVlan

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<trillAdminVlans>
<trillAdminVlan operation='create'>
<vlanId>1</vlanId>
</trillAdminVlan>
</trillAdminVlans>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 350


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

vlanId Specifies a TRILL The value is an Mandatory


VLAN ID. integer ranging from
1 to 4094.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>
Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.1.2 Query a TRILL Administrative VLAN

Operation URI Description

GET /trill/trillSites/trillSite/ Query a TRILL


trillAdminVlans/ administrative VLAN.
trillAdminVlan

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillAdminVlans>
<trillAdminVlan>
<vlanId></vlanId>
</trillAdminVlan>
</trillAdminVlans>
</trillSite>

Elements

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 351


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

vlanId Specifies a TRILL The value is an Mandatory


VLAN ID. integer ranging from
1 to 4094.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillAdminVlans>
<trillAdminVlan>
<vlanId>1</vlanId>
</trillAdminVlan>
</trillAdminVlans>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

vlanId Specifies a TRILL The value is an Mandatory


VLAN ID. integer ranging from
1 to 4094.

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.1.3 Delete a TRILL Administrative VLAN

Operation URI Description

PUT /trill/trillSites/trillSite/ Delete a TRILL


trillAdminVlans/ administrative VLAN.
trillAdminVlan

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 352


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<trillAdminVlans> <trillAdminVlan operation='delete'>
<vlanId>1</vlanId>
</trillAdminVlan>
</trillAdminVlans>
</trillSite>

Elements
Element Description Value Range Mandatory/
Optional

vlanId Specifies a TRILL The value is an Mandatory


VLAN ID. integer ranging
from 1 to 4094.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.2 AF Selection Mode on a TRILL Network

3.18.1.2.1 Set the AF Selection Mode to Load Balancing

Operation URI Description

PUT /trill/trillSites/trillSite Set the AF selection mode


to load balancing. The
configuration can be
performed only after a
TRILL process is created.

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 353


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<instanceId>0</instanceId>
<afSelectMode>load-balance</afSelectMode>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

afSelectMode Specifies the AF The values are as Mandatory


selection mode on a follows:
TRILL network. l default
l load-balance
l select-switch

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.2.2 Query the AF Selection Mode

Operation URI Description

GET /trill/trillSites/trillSite Query the AF selection


mode.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<afSelectMode></afSelectMode>
</trillSite>

Elements

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 354


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

afSelectMode Specifies the AF The values are as Mandatory


selection mode on a follows:
TRILL network. l default
l load-balance
l select-switch

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<afSelectMode>load-balance</afSelectMode>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

afSelectMode Specifies the AF The values are as Mandatory


selection mode on a follows:
TRILL network. l default
l load-balance
l select-switch

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 355


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.18.1.2.3 Restore the Default AF Selection Mode

Operation URI Description

PUT /trill/trillSites/trillSite Restore the default AF


selection mode.

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<afSelectMode>default</afSelectMode>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

afSelectMode Specifies the AF The values are as Mandatory


selection mode on a follows:
TRILL network. l default
l load-balance
l select-switch

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.3 LSP Authentication

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 356


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.18.1.3.1 Set an LSP Authentication Type

Operation URI Description

PUT /trill/trillSites/trillSite/ Set the LSP authentication


trillLspAuths/trillLspAuth type to simple. The LSP
authentication type can also
be MD5 or HMAC-
SHA256.

l Request example (simple authentication)


<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<trillLspAuths>
<trillLspAuth operation='create'>
<authenticationType>Simple</authenticationType>
<authenticationSimple>1111111111111111</authenticationSimple>
<authenticationMD5></authenticationMD5>
<usageType>usage_default</usageType>
</trillLspAuth>
</trillLspAuths>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

trillLspAuth Specifies an The values are as Mandatory


authentication type. follows:
This element is the l Simple
primary key in the
table. l Md5
l hmac_sha256

authenticationSim- Specifies a password The value is a string Optional


ple for simple of 1 to 16 characters.
authentication.

authenticationMD5 Specifies a password The value is a string Optional


for MD5 or SHA256 of 1 to 255
authentication. characters.

usageType Specifies an The values are as Optional


authentication usage follows:
scenario. l usage_default
l authentication_a
void
l send_only
l all_send_only

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 357


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

keyId Specifies a key ID. The value is an Optional


integer ranging from
0 to 65535.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.3.2 Query the LSP Authentication Type

Operation URI Description

GET /trill/trillSites/trillSite/ Query the LSP


trillLspAuths/trillLspAuth authentication type.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillLspAuths>
<trillLspAuth>
<authenticationType></authenticationType>
<authenticationSimple></authenticationSimple>
<authenticationMD5></authenticationMD5>
<usageType></usageType>
<keyId></keyId>
</trillLspAuth>
</trillLspAuths>
</trillSite>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 358


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

trillLspAuth Specifies an The values are as Mandatory


authentication type. follows:
This element is the l Simple
primary key in the
table. l Md5
l hmac_sha256

authenticationSim- Specifies a password The value is a string Optional


ple for simple of 1 to 16 characters.
authentication.

authenticationMD5 Specifies a password The value is a string Optional


for MD5 or SHA256 of 1 to 255
authentication. characters.

usageType Specifies an The values are as Optional


authentication usage follows:
scenario. l usage_default
l authentication_a
void
l send_only
l all_send_only

keyId Specifies a key ID. The value is an Optional


integer ranging from
0 to 65535.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillLspAuths>
<trillLspAuth>
<authenticationType>Simple</authenticationType>
<authenticationSimple></authenticationSimple>
<authenticationMD5></authenticationMD5>
<usageType>usage_default</usageType>
<keyId>0</keyId>
</trillLspAuth>
</trillLspAuths>
</trillSite>

Elements

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 359


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

trillLspAuth Specifies an The values are as Mandatory


authentication type. follows:
This element is the l Simple
primary key in the
table. l Md5
l hmac_sha256

authenticationSim- Specifies a password The value is a string Optional


ple for simple of 1 to 16 characters.
authentication.

authenticationMD5 Specifies a password The value is a string Optional


for MD5 or SHA256 of 1 to 255
authentication. characters.

usageType Specifies an The values are as Optional


authentication usage follows:
scenario. l usage_default
l authentication_a
void
l send_only
l all_send_only

keyId Specifies a key ID. The value is an Optional


integer ranging from
0 to 65535.

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 360


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.18.1.3.3 Delete an LSP Authentication Configuration

Operation URI Description

PUT /trill/trillSites/trillSite/ Delete an LSP


trillLspAuths/trillLspAuth authentication configuration.

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<trillLspAuths>
<trillLspAuth operation='delete'>
<authenticationType>Simple</authenticationType>
</trillLspAuth>
</trillLspAuths>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

trillLspAuth Specifies an The values are as Mandatory


authentication type. follows:
This element is the l Simple
primary key in the
table. l Md5
l hmac_sha256

authenticationSim- Specifies a password The value is a string Optional


ple for simple of 1 to 16 characters.
authentication.

authenticationMD5 Specifies a password The value is a string Optional


for MD5 or SHA256 of 1 to 255
authentication. characters.

usageType Specifies an The values are as Optional


authentication usage follows:
scenario. l usage_default
l authentication_a
void
l send_only
l all_send_only

keyId Specifies a key ID. The value is an Optional


integer ranging from
0 to 65535.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 361


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<ok/>

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.4 Bandwidth Reference Value Used in Automatic Interface Cost


Calculation

3.18.1.4.1 Configure the Bandwidth Reference Value

Operation URI Description

PUT /trill/trillSites/trillSite Configure the bandwidth


reference value, in Mbit/s.
The configuration can be
performed only after a
TRILL process is created.

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<bandWidth>20000</bandWidth>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

instanceId Specifies a process The value is an Mandatory


ID. This element is integer ranging from
the primary key in 0 to 4294967295.
the table.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 362


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

bandWidth Specifies a The value is an Optional


bandwidth reference integer ranging from
value, in Mbit/s. 1 to 2147483648.
The default value
(20000000) is used
after a TRILL
process is
configured.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.4.2 Query the Bandwidth Reference Value

Operation URI Description

GET /trill/trillSites/trillSite Query the bandwidth


reference value.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<bandWidth></bandWidth>
</trillSite>

Elements

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 363


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

instanceId Specifies a process The value is an Mandatory


ID. This element is integer ranging from
the primary key in 0 to 4294967295.
the table.

bandWidth Specifies a The value is an Optional


bandwidth reference integer ranging from
value, in Mbit/s. 1 to 2147483648.
The default value
(20000000) is used
after a TRILL
process is
configured.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<bandWidth>30000000</bandWidth>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

instanceId Specifies a process The value is an Mandatory


ID. This element is integer ranging from
the primary key in 0 to 4294967295.
the table.

bandWidth Specifies a The value is an Optional


bandwidth reference integer ranging from
value, in Mbit/s. 1 to 2147483648.
The default value
(20000000) is used
after a TRILL
process is
configured.

Status codes in responses

Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 364


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.4.3 Restore the Default Bandwidth Reference Value

Operation URI Description

PUT /trill/trillSites/trillSite Restore the default


bandwidth reference value.

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<bandWidth>20000000</bandWidth>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

instanceId Specifies a process The value is an Mandatory


ID. This element is integer ranging from
the primary key in 0 to 4294967295.
the table.

bandWidth Specifies a The value is an Optional


bandwidth reference integer ranging from
value, in Mbit/s. 1 to 2147483648.
The default value
(20000000) is used
after a TRILL
process is
configured.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 365


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.5 Carrier VLAN

3.18.1.5.1 Create a Carrier VLAN

Operation URI Description

PUT /trill/trillSites/trillSite/ Create a carrier VLAN.


trillVlans/trillVlan

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<trillVlans>
<trillVlan operation='create'>
<vlanId>10</vlanId>
</trillVlan>
</trillVlans>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

vlanId Specifies a TRILL The value is an Mandatory


VLAN ID. This integer ranging from
element is the 1 to 4090.
primary key in the
table.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 366


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.5.2 Query a Carrier VLAN

Operation URI Description

GET /trill/trillSites/trillSite/ Query a carrier VLAN.


trillVlans/trillVlan

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillVlans>
<trillVlan>
<vlanId></vlanId>
</trillVlan>
</trillVlans>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

vlanId Specifies a TRILL The value is an Mandatory


VLAN ID. This integer ranging from
element is the 1 to 4090.
primary key in the
table.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillVlans>
<trillVlan>
<vlanId>100</vlanId>
</trillVlan>
</trillVlans>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 367


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

vlanId Specifies a TRILL The value is an Mandatory


VLAN ID. This integer ranging from
element is the 1 to 4090.
primary key in the
table.

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.5.3 Delete a Carrier VLAN

Operation URI Description

PUT /trill/trillSites/trillSite/ Delete a carrier VLAN.


trillVlans/trillVlan

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<trillVlans>
<trillVlan operation='delete'>
<vlanId>10</vlanId>
</trillVlan>
</trillVlans>
</trillSite>

Elements

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 368


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

vlanId Specifies a TRILL The value is an Mandatory


VLAN ID. This integer ranging from
element is the 1 to 4090.
primary key in the
table.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.6 TRILL CE VLAN

3.18.1.6.1 Create a TRILL CE VLAN

Operation URI Description

PUT /trill/trillSites/trillSite/ Create a TRILL CE VLAN.


trillCeVlans/trillCeVlan

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<trillCeVlans>
<trillCeVlan operation="create">

<ceVlanBitmap>00200000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 369


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000:002000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000</ceVlanBitmap>
</trillCeVlan>
</trillCeVlans>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

ceVlanBitmap Specifies a CE The value is an Mandatory


VLAN ID. integer ranging from
1 to 4094.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 370


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.18.1.6.2 Query a TRILL CE VLAN

Operation URI Description

GET /trill/trillSites/trillSite/ Query a TRILL CE VLAN.


trillCeVlans/trillCeVlan

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillCeVlans>
<trillCeVlan>
<ceVlanBitmap></ceVlanBitmap>
</trillCeVlan>
</trillCeVlans>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

ceVlanBitmap Specifies a CE The value is an Mandatory


VLAN ID. integer ranging from
1 to 4094.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillCeVlans>
<trillCeVlan>

<ceVlanBitmap>00000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000080000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000</ceVlanBitmap>
</trillCeVlan>
</trillCeVlans>
</trillSite>

Elements

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 371


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

ceVlanBitmap Specifies a CE The value is an Mandatory


VLAN ID. integer ranging from
1 to 4094.

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.6.3 Delete a TRILL CE VLAN

Operation URI Description

PUT /trill/trillSites/trillSite/ Delete a TRILL CE VLAN.


trillCeVlans/trillCeVlan

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation="merge">
<instanceId>0</instanceId>
<trillCeVlans>
<trillCeVlan operation="delete">

<ceVlanBitmap>00200000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000:002000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 372


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000</ceVlanBitmap>
</trillCeVlan>
</trillCeVlans>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

ceVlanBitmap Specifies a CE The value is an Mandatory


VLAN ID. integer ranging from
1 to 4094.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.7 Global TRILL Cost

3.18.1.7.1 Configure a TRILL Cost Globally

Operation URI Description

PUT /trill/trillSites/trillSite/ Configure a TRILL cost


trillCost globally.

l Request example

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 373


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<?xml version='1.0' encoding='UTF-8'?>


<trillSite operation='merge'>
<instanceId>0</instanceId>
<trillCost operation='create'>
<cost>16777214</cost>
</trillCost>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

cost Specifies an The value is an Optional


interface cost. integer ranging from
0 to 16777215.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.7.2 Query the Global TRILL Cost

Operation URI Description

GET /trill/trillSites/trillSite/ Query the global TRILL


trillCost cost.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillCost>
<cost></cost>
</trillCost>
</trillSite>

Elements

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 374


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

cost Specifies an The value is an Optional


interface cost. integer ranging from
0 to 16777215.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillCost>
<cost>20</cost>
</trillCost>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

cost Specifies an The value is an Optional


interface cost. integer ranging from
0 to 16777215.

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.7.3 Restore the Default Global TRILL Cost

Operation URI Description

PUT /trill/trillSites/trillSite/ Restore the default global


trillCost TRILL cost.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 375


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<trillCost operation='create'>
<cost>0</cost>
</trillCost>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

cost Specifies an The value is an Optional


interface cost. integer ranging from
0 to 16777215.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.8 Maximum Number of Equal-Cost Routes for Load Balancing

3.18.1.8.1 Configure the Maximum Number of Equal-Cost Routes for Load Balancing

Operation URI Description

PUT /trill/trillSites/trillSite/ Configure the maximum


trillMaxLoad number of equal-cost routes
for load balancing.

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 376


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<instanceId>0</instanceId>
<trillMaxLoad>
<maxLoadNumber>1</maxLoadNumber>
</trillMaxLoad>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

maxLoadNumber Specifies the The value is an Optional


maximum number integer ranging from
of equal-cost routes 1 to 16. The default
for load balancing. value is 16.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.8.2 Query the Maximum Number of Equal-Cost Routes for Load Balancing

Operation URI Description

GET /trill/trillSites/trillSite/ Query the maximum


trillMaxLoad number of equal-cost routes
for load balancing.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillMaxLoad>
<maxLoadNumber></maxLoadNumber>
</trillMaxLoad>
</trillSite>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 377


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Elements

Element Description Value Range Mandatory/


Optional

maxLoadNumber Specifies the The value is an Optional


maximum number integer ranging from
of equal-cost routes 1 to 16. The default
for load balancing. value is 16.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillMaxLoad>
<maxLoadNumber>16</maxLoadNumber>
</trillMaxLoad>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

maxLoadNumber Specifies the The value is an Optional


maximum number integer ranging from
of equal-cost routes 1 to 16. The default
for load balancing. value is 16.

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 378


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.18.1.8.3 Restore the Default Maximum Number of Equal-Cost Routes for Load
Balancing

Operation URI Description

PUT /trill/trillSites/trillSite/ Restore the default


trillMaxLoad maximum number of equal-
cost routes for load
balancing.

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<trillMaxLoad>
<maxLoadNumber>16</maxLoadNumber>
</trillMaxLoad>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

maxLoadNumber Specifies the The value is an Optional


maximum number integer ranging from
of equal-cost routes 1 to 16. The default
for load balancing. value is 16.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.9 TRILL MDT Quantity

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 379


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.18.1.9.1 Configure the TRILL MDT Quantity

Operation URI Description

PUT /trill/trillSites/trillSite/ Set the TRILL MDT


trillTreeNumber quantity.

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<trillTreeNumber>
<computeNumber>1</computeNumber>
</trillTreeNumber>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

computeNumber Specifies the The value is 1 or 2, Optional


number of and the default value
computable MDTs. is 2.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.9.2 Query the Configuration of the TRILL MDT Quantity

Operation URI Description

GET /trill/trillSites/trillSite/ Query the configuration of


trillTreeNumber the TRILL MDT quantity.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 380


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillTreeNumber>
<computeNumber></computeNumber>
</trillTreeNumber>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

computeNumber Specifies the The value is 1 or 2, Optional


number of and the default value
computable MDTs. is 2.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillTreeNumber>
<computeNumber>2</computeNumber>
</trillTreeNumber>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

computeNumber Specifies the The value is 1 or 2, Optional


number of and the default value
computable MDTs. is 2.

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 381


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.18.1.9.3 Restore the Default Quantity of TRILL MDTs

Operation URI Description

PUT /trill/trillSites/trillSite/ Restore the default quantity


trillTreeNumber of TRILL MDTs.

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<trillTreeNumber>
<computeNumber>2</computeNumber>
</trillTreeNumber>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

computeNumber Specifies the The value is 1 or 2, Optional


number of and the default value
computable MDTs. is 2.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.10 TRILL Multicast Group-based Pruning

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 382


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.18.1.10.1 Enable TRILL Multicast Group-based Pruning

Operation URI Description

PUT /trill/trillSites/trillSite Enable TRILL multicast


group-based pruning.

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<multicastGroupPruningEnable>true</multicastGroupPruningEnable>
</trillSite>

Element

Element Description Value Range Mandatory/


Optional

multicastGroupPru- Specifies whether The value is a Optional


ningEnable TRILL multicast Boolean data type.
group-based pruning The default value is
is enabled. FALSE.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status Code in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 383


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.18.1.10.2 Query Whether TRILL Multicast Group-based Pruning Is Enabled

Operation URI Description

GET /trill/trillSites/trillSite/ Query whether TRILL


multicastGroupPruningEna- multicast group-based
ble pruning is enabled.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<multicastGroupPruningEnable> </multicastGroupPruningEnable>
</trillSite>

Element

Element Description Value Range Mandatory/


Optional

multicastGroupPru- Specifies whether The value is a Optional


ningEnable TRILL multicast Boolean data type.
group-based pruning The default value is
is enabled. FALSE.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<multicastGroupPruningEnable>false </multicastGroupPruningEnable>
</trillSite>

Element

Element Description Value Range Mandatory/


Optional

multicastGroupPru- Specifies whether The value is a Optional


ningEnable TRILL multicast Boolean data type.
group-based pruning The default value is
is enabled. FALSE.

Status Codes in responses

Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 384


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.10.3 Disable TRILL Multicast Group-based Pruning

Operation URI Description

PUT /trill/trillSites/trillSite Disable TRILL multicast


group-based pruning.

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<multicastGroupPruningEnable>false
</multicastGroupPruningEnable>
</trillSite>

Element

Element Description Value Range Mandatory/


Optional

multicastGroupPru- Specifies whether The value is a Optional


ningEnable TRILL multicast Boolean data type.
group-based pruning The default value is
is enabled. FALSE.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 385


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.11 TRILL Network

3.18.1.11.1 Configure a TRILL Network Address

Operation URI Description

PUT /trill/trillSites/trillSite/ Configure a TRILL NET.


trillNetEntitys/trillNetEntity

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<trillNetEntitys>
<trillNetEntity operation='create'>
<netEntity>000000.0000.000100</netEntity>
</trillNetEntity>
</trillNetEntitys>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

netEntity Specifies a TRILL The value is a string Mandatory


NET. This element of a maximum of 49
is the primary key in characters.
the table.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 386


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.11.2 Query the TRILL Network Address

Operation URI Description

GET /trill/trillSites/trillSite/ Query the TRILL NET.


trillNetEntitys/trillNetEntity

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillNetEntitys>
<trillNetEntity>
<netEntity></netEntity>
</trillNetEntity>
</trillNetEntitys>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

netEntity Specifies a TRILL The value is a string Mandatory


NET. This element of a maximum of 49
is the primary key in characters.
the table.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillNetEntitys>
<trillNetEntity>
<netEntity>00.0000.0000.0001.00</netEntity>
</trillNetEntity>
</trillNetEntitys>
</trillSite>

Elements

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 387


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

netEntity Specifies a TRILL The value is a string Mandatory


NET. This element of a maximum of 49
is the primary key in characters.
the table.

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.11.3 Delete a TRILL Network Address

Operation URI Description

PUT /trill/trillSites/trillSite/ Delete a TRILL NET.


trillNetEntitys/trillNetEntity

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<trillNetEntitys>
<trillNetEntity operation='delete'>
<netEntity>000000.0000.000100</netEntity>
</trillNetEntity>
</trillNetEntitys>
</trillSite>

Elements

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 388


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

netEntity Specifies a TRILL The value is a string Mandatory


NET. This element of a maximum of 49
is the primary key in characters.
the table.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.12 Global TRILL Port Type

3.18.1.12.1 Set the Global TRILL Port Type

Operation URI Description

PUT /trill/trillSites/trillSite Set the global TRILL port


type.

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<portMode>access</portMode>
</trillSite>

Elements

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 389


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

portMode Specifies a TRILL The values are as Optional


port type. follows:
l Access
l Trunk
l Hybrid
l P2P
The default value is
P2P.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.12.2 Query the Global TRILL Port Type

Operation URI Description

GET /trill/trillSites/trillSite/ Query the global TRILL


trillOverload port type.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<portMode></portMode>
</trillSite>

Elements

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 390


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

portMode Specifies a TRILL The values are as Optional


port type. follows:
l Access
l Trunk
l Hybrid
l P2P
The default value is
P2P.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
< portMode > access </ portMode >
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

portMode Specifies a TRILL The values are as Optional


port type. follows:
l Access
l Trunk
l Hybrid
l P2P
The default value is
P2P.

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 391


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.18.1.12.3 Restore the Default Global TRILL Port Type

Operation URI Description

PUT /trill/trillSites/trillSite Restore the default global


TRILL port type.

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<portMode>p2p</portMode>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

portMode Specifies a TRILL The values are as Optional


port type. follows:
l Access
l Trunk
l Hybrid
l P2P
The default value is
P2P.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 392


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.18.1.13 TRILL Overload State

3.18.1.13.1 Set the TRILL Overload State

Operation URI Description

PUT /trill/trillSites/trillSite/ Set the TRILL overload


trillOverload state.

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<trillOverload>
<overloadEnableType>on_startup</overloadEnableType>
<overloadWaitTime>86400</overloadWaitTime>
<overloadSendSaBit>true</overloadSendSaBit>
<overloadSendSaTime>120</overloadSendSaTime>
</trillOverload>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

overloadEnableType Specifies the TRILL The values are as Optional


overload state. follows:
l no_set
l on_startup
l manual
The default value is
no_set.

overloadWaitTime Specifies the The value is an Optional


overload time. integer ranging from
5 to 86400.

overloadSendSaBit Specifies whether The value is Optional


Hello packets carry TRUE or FALSE.
the SA bit.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 393


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.13.2 Query the TRILL Overload State

Operation URI Description

GET /trill/trillSites/trillSite/ Query the TRILL overload


trillOverload state.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillOverload>
<overloadEnableType></overloadEnableType>
</trillOverload>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

overloadEnableType Specifies the TRILL The values are as Optional


overload state. follows:
l no_set
l on_startup
l manual
The default value is
no_set.

overloadWaitTime Specifies the The value is an Optional


overload time. integer ranging from
5 to 86400.

overloadSendSaBit Specifies whether The value is Optional


Hello packets carry TRUE or FALSE.
the SA bit.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 394


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillOverload>
<overloadEnableType> on_startup </overloadEnableType>
</trillOverload>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

overloadEnableType Specifies the TRILL The values are as Optional


overload state. follows:
l no_PUT
l on_startup
l manual
The default value is
no_set.

overloadWaitTime Specifies the The value is an Optional


overload time. integer ranging from
5 to 86400.

overloadSendSaBit Specifies whether The value is Optional


Hello packets carry TRUE or FALSE.
the SA bit.

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 395


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.18.1.13.3 Delete the TRILL Overload State

Operation URI Description

PUT /trill/trillSites/trillSite/ Delete the TRILL overload


trillOverload state.

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<trillOverload>
<overloadEnableType>no_set</overloadEnableType>
</trillOverload>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

overloadEnableType Specifies the TRILL The values are as Optional


overload state. follows:
l no_set
l on_startup
l manual
The default value is
no_set.

overloadWaitTime Specifies the The value is an Optional


overload time. integer ranging from
5 to 86400.

overloadSendSaBit Specifies whether The value is Optional


Hello packets carry TRUE or FALSE.
the SA bit.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

3.18.1.14 TRILL LSP Timer

3.18.1.14.1 Set the TRILL LSP Timer

Operation URI Description

PUT /trill/trillSites/trillSite/ Set the TRILL LSP timer.


trillLspTimer

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 396


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<trillLspTimer>
<lspGenMaxTime>120</lspGenMaxTime>
<lspGenInitTime>60000</lspGenInitTime>
<lspGenIncrTime>60000</lspGenIncrTime>
<lspMaxAge>1200</lspMaxAge>
<lspRefreshTime>1</lspRefreshTime>
</trillLspTimer>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

lspGenMaxTime Specifies the The value is an Optional


maximum interval at integer ranging from
which LSPs are 1 to 120, in seconds.
generated. The default value is
2.

lspGenInitTime Specifies the initial The value is an Optional


interval for integer ranging from
generating the same 0 to 60000, in
LSP fragment. milliseconds. The
default value is 0.

lspGenIncrTime Specifies the The value is an Optional


incremental interval integer ranging from
for generating the 0 to 60000, in
same LSP fragment. milliseconds. The
default value is 0.

lspMaxAge Specifies the The value is an Optional


maximum age of integer ranging from
LSPs. 2 to 65535. The
default value is
1200.

lspRefreshTime Specifies the LSP The value is an Optional


update interval. integer ranging from
1 to 65534, in
seconds. The default
value is 900.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 397


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.14.2 Query the TRILL LSP Timer

Operation URI Description

GET /trill/trillSites/trillSite/ Query the TRILL LSP


trillLspTimer timer.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillLspTimer>
<lspGenMaxTime></lspGenMaxTime>
<lspGenInitTime></lspGenInitTime>
<lspGenIncrTime></lspGenIncrTime>
<lspMaxAge></lspMaxAge>
<lspRefreshTime></lspRefreshTime>
</trillLspTimer>
</trillSite>

Elements
Element Description Value Range Mandatory/
Optional

lspGenMaxTime Specifies the The value is an Optional


maximum interval integer ranging
at which LSPs are from 1 to 120, in
generated. seconds. The
default value is 2.

lspGenInitTime Specifies the initial The value is an Optional


interval for integer ranging
generating the from 0 to 60000, in
same LSP milliseconds. The
fragment. default value is 0.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 398


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

lspGenIncrTime Specifies the The value is an Optional


incremental integer ranging
interval for from 0 to 60000, in
generating the milliseconds. The
same LSP default value is 0.
fragment.

lspMaxAge Specifies the The value is an Optional


maximum age of integer ranging
LSPs. from 2 to 65535, in
seconds. The
default value is
1200.

lspRefreshTime Specifies the LSP The value is an Optional


update interval. integer ranging
from 1 to 65534, in
seconds. The
default value is
900.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillLspTimer>
<lspGenMaxTime>2</lspGenMaxTime>
<lspGenInitTime>0</lspGenInitTime>
<lspGenIncrTime>0</lspGenIncrTime>
<lspMaxAge>1200</lspMaxAge>
<lspRefreshTime>900</lspRefreshTime>
</trillLspTimer>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

lspGenMaxTime Specifies the The value is an Optional


maximum interval at integer ranging from
which LSPs are 1 to 120. The default
generated, in value is 2.
seconds.

lspGenInitTime Specifies the initial The value is an Optional


interval for integer ranging from
generating the same 0 to 60000. The
LSP fragment, in default value is 0.
milliseconds.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 399


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

lspGenIncrTime Specifies the The value is an Optional


incremental interval integer ranging from
for generating the 0 to 60000. The
same LSP fragment, default value is 0.
in milliseconds.

lspMaxAge Specifies the The value is an Optional


maximum age of integer ranging from
LSPs, in seconds. 2 to 65535. The
default value is
1200.

lspRefreshTime Specifies the LSP The value is an Optional


update interval, in integer ranging from
seconds. 1 to 65534. The
default value is 900.

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.14.3 Restore the Default TRILL LSP Timer

Operation URI Description

PUT /trill/trillSites/trillSite/ Restore the default TRILL


trillLspTimer LSP timer.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<trillLspTimer>
<lspGenMaxTime>2</lspGenMaxTime>
<lspGenInitTime>0</lspGenInitTime>
<lspGenIncrTime>0</lspGenIncrTime>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 400


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<lspMaxAge>1200</lspMaxAge>
<lspRefreshTime>900</lspRefreshTime>
</trillLspTimer>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

lspGenMaxTime Specifies the The value is an Optional


maximum interval at integer ranging from
which LSPs are 1 to 120, in seconds.
generated. The default value is
2.

lspGenInitTime Specifies the initial The value is an Optional


interval for integer ranging from
generating the same 0 to 60000, in
LSP fragment. milliseconds. The
default value is 0.

lspGenIncrTime Specifies the The value is an Optional


incremental interval integer ranging from
for generating the 0 to 60000, in
same LSP fragment. milliseconds. The
default value is 0.

lspMaxAge Specifies the The value is an Optional


maximum age of integer ranging from
LSPs. 2 to 65535, in
seconds. The default
value is 1200.

lspRefreshTime Specifies the LSP The value is an Optional


update interval. integer ranging from
1 to 65534, in
seconds. The default
value is 900.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 401


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.15 TRILL SPF Intelligent Timer

3.18.1.15.1 Set the TRILL SPF Intelligent Timer

Operation URI Description

PUT /trill/trillSites/trillSite/ Set the TRILL SPF


trillSpfTimer intelligent timer.

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<trillSpfTimer>
<spfMaxInterval>1</spfMaxInterval>
<spfInitInterval>1</spfInitInterval>
<spfIncrInterval>1</spfIncrInterval>
</trillSpfTimer>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

spfMaxInterval Specifies the The value is an Optional


maximum delay in integer ranging from
route calculation. 1 to 120, in seconds.
The default value is
5.

spfInitInterval Specifies the initial The value is an Optional


delay in route integer ranging from
calculation. 0 to 60000, in
milliseconds. The
default value is 50.

spfIncrInterval Specifies the The value is an Optional


incremental delay in integer ranging from
route calculation. 0 to 60000, in
milliseconds. The
default value is 200.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 402


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.15.2 Query the TRILL SPF Intelligent Timer

Operation URI Description

GET /trill/trillSites/trillSite/ Query the TRILL SPF


trillSpfTimer intelligent timer.

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite>
<instanceId>0</instanceId>
<trillSpfTimer>
<spfMaxInterval></spfMaxInterval>
<spfInitInterval></spfInitInterval>
<spfIncrInterval></spfIncrInterval>
</trillSpfTimer>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

spfMaxInterval Specifies the The value is an Optional


maximum delay in integer ranging from
route calculation. 1 to 120, in seconds.
The default value is
5.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 403


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

spfInitInterval Specifies the initial The value is an Optional


delay in route integer ranging from
calculation. 0 to 60000, in
milliseconds. The
default value is 50.

spfIncrInterval Specifies the The value is an Optional


incremental delay in integer ranging from
route calculation. 0 to 60000, in
milliseconds. The
default value is 200.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillSpfTimer>
<spfMaxInterval>5</spfMaxInterval>
<spfInitInterval>50</spfInitInterval>
<spfIncrInterval>200</spfIncrInterval>
</trillSpfTimer>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

spfMaxInterval Specifies the The value is an Optional


maximum delay in integer ranging from
route calculation. 1 to 120, in seconds.
The default value is
5.

spfInitInterval Specifies the initial The value is an Optional


delay in route integer ranging from
calculation. 0 to 60000, in
milliseconds. The
default value is 50.

spfIncrInterval Specifies the The value is an Optional


incremental delay in integer ranging from
route calculation. 0 to 60000, in
milliseconds. The
default value is 200.

Status codes in responses

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 404


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.15.3 Restore the Default TRILL SPF Intelligent Timer

Operation URI Description

PUT /trill/trillSites/trillSite/ Restore the default TRILL


trillSpfTimer SPF intelligent timer.

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<trillSpfTimer>
<spfMaxInterval>5</spfMaxInterval>
<spfInitInterval>50</spfInitInterval>
<spfIncrInterval>200</spfIncrInterval>
</trillSpfTimer>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

spfMaxInterval Specifies the The value is an Optional


maximum delay in integer ranging from
route calculation. 1 to 120, in seconds.
The default value is
5.

spfInitInterval Specifies the initial The value is an Optional


delay in route integer ranging from
calculation. 0 to 60000, in
milliseconds. The
default value is 50.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 405


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

spfIncrInterval Specifies the The value is an Optional


incremental delay in integer ranging from
route calculation. 0 to 60000, in
milliseconds. The
default value is 200.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.16 Configurations on a TRILL Interface

3.18.1.16.1 Create a TRILL Interface

Operation URI Description

PUT /trill/trillSites/trillSite/ Create a TRILL interface.


trillPorts/trillPort

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<trillPorts>
<trillPort>
<ifName>Ethernet3/0/0</ifName>
<portMode>p2p</portMode>
<cost>20</cost>
<drbPriority>127</drbPriority>
<csnpIntervals>
<csnpInterval>65535</csnpInterval>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 406


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

</csnpIntervals>
<helloIntervals>
<helloInterval>3</helloInterval>
<holdMultiplier>1000</holdMultiplier>
</helloIntervals>
<lspRetranIntervals>
<retranInterval>5</retranInterval>
<throttInterval>1</throttInterval>
<throttCount>1</throttCount>
</lspRetranIntervals>
<trillHelloAuths>
<trillHelloAuth operation='create'>
<authenticationType>Simple</authenticationType>
<authenticationSimple>1</authenticationSimple>
<authenticationMD5></authenticationMD5>
<sendOnly>true</sendOnly>
<keyId></keyId>
</trillHelloAuth>
</trillHelloAuths>
</trillPort>
</trillPorts>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

ifName Specifies the name The value is a string Mandatory


of an interface. This of 1 to 63 characters.
element is the
primary key in the
table.

portMode Specifies an The values are as Optional


interface type. follows:
l Access
l Trunk
l Hybrid
l P2P
The default value is
P2P.

cost Specifies a cost on The value is an Optional


the TRILL interface. integer ranging from
0 to 16777215. The
default value is 0.

desiredDVlan Specifies a desired The value is an Optional


designated VLAN integer ranging from
(DVLAN). 1 to 4090.

drbPriority Specifies a DRB The value is an Optional


priority. integer ranging from
0 to 127.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 407


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

csnpInterval Specifies an interval The value is an Optional


at which CSNPs are integer ranging from
sent. 1 to 65535. The
default value is 10.

helloInterval Specifies an interval The value is an Optional


at which Hello integer ranging from
packets are sent. 3 to 255. The default
value is 10.

holdMultiplier Specifies the The value is an Optional


number of integer ranging from
consecutive Hello 3 to 1000. The
packets that an RB default value is 3.
sends to a neighbor
before the RB
considers the
neighbor Down.

retranInterval Specifies an interval The value is an Optional


at which Level-1 integer ranging from
LSPs are 1 to 300. The default
retransmitted over a value is 5.
P2P link.

throttInterval Specifies the The value is an Optional


minimum interval at integer ranging from
which LSPs are sent. 1 to 10000, in
milliseconds. The
default value is 50.

throttCount Specifies the The value is an Optional


maximum number integer ranging from
of LSPs that are sent 1 to 1000. The
during the throttle default value is 10.
interval.

authenticationType Specifies the The values are as Mandatory


authentication type follows:
for TRILL Hello l Simple
packets. This
element is the l Md5
primary key of l KEYCHAIN
trillHelloAuths. l hmac_sha256

authenticationSim- Specifies a password The value is a string Optional


ple for simple of 1 to 16 characters.
authentication.

authenticationMD5 Specifies a password The value is a string Optional


for MD5 or SHA256 of 1 to 255
authentication. characters.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 408


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

sendOnly Specifies whether The value is a Optional


the system Boolean data type.
authenticates only The default value is
the packets to be FALSE.
sent.

keyId Specifies a key ID. The value is an Optional


integer ranging from
0 to 65535. The
default value is 0.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.16.2 Query Configurations on a TRILL Interface

Operation URI Description

GET /trill/trillSites/trillSite/ Query configurations on a


trillPorts/trillPort TRILL interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillPorts>
<trillPort>
<ifName></ifName>
<portMode></portMode>
<cost></cost>
<circuitId></circuitId>
<circuitMTU></circuitMTU>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 409


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<drbStatus></drbStatus>
<trillStatus></trillStatus>
<dVlan></dVlan>
<drbPriority></drbPriority>
<csnpIntervals>
<csnpInterval></csnpInterval>
</csnpIntervals>
<helloIntervals>
<helloInterval></helloInterval>
<holdMultiplier></holdMultiplier>
</helloIntervals>
<lspRetranIntervals>
<retranInterval></retranInterval>
<throttInterval></throttInterval>
<throttCount></throttCount>
</lspRetranIntervals>
</trillPort>
</trillPorts>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

ifName Specifies the name The value is a string Mandatory


of an interface. This of 1 to 63 characters.
element is the
primary key in the
table.

portMode Specifies an The values are as Optional


interface type. follows:
l Access
l Trunk
l Hybrid
l P2P
The default value is
P2P.

cost Specifies a cost on The value is an Optional


the TRILL interface. integer ranging from
0 to 16777215. The
default value is 0.

desiredDVlan Specifies a desired The value is an Optional


DVLAN. integer ranging from
1 to 4090.

drbPriority Specifies a DRB The value is an Optional


priority. integer ranging from
0 to 127.

csnpInterval Specifies an interval The value is an Optional


at which CSNPs are integer ranging from
sent. 1 to 65535. The
default value is 10.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 410


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

helloInterval Specifies an interval The value is an Optional


at which Hello integer ranging from
packets are sent. 3 to 255. The default
value is 10.

holdMultiplier Specifies the The value is an Optional


number of integer ranging from
consecutive Hello 3 to 1000. The
packets that an RB default value is 3.
sends to a neighbor
before the RB
considers the
neighbor Down.

retranInterval Specifies an interval The value is an Optional


at which Level-1 integer ranging from
LSPs are 1 to 300. The default
retransmitted over a value is 5.
P2P link.

throttInterval Specifies the The value is an Optional


minimum interval at integer ranging from
which LSPs are sent. 1 to 10000, in
milliseconds. The
default value is 50.

throttCount Specifies the The value is an Optional


maximum number integer ranging from
of LSPs that are sent 1 to 1000. The
during the throttle default value is 10.
interval.

authenticationType Specifies the The values are as Mandatory


authentication type follows:
for TRILL Hello l Simple
packets. This
element is the l Md5
primary key of l KEYCHAIN
trillHelloAuths. l hmac_sha256

authenticationSim- Specifies a password The value is a string Optional


ple for simple of 1 to 16 characters.
authentication.

authenticationMD5 Specifies a password The value is a string Optional


for MD5 or SHA256 of 1 to 255
authentication. characters.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 411


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

sendOnly Specifies whether The value is a Optional


the system Boolean data type.
authenticates only The default value is
the packets to be FALSE.
sent.

keyId Specifies a key ID. The value is an Optional


integer ranging from
0 to 65535. The
default value is 0.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillPorts>
<trillPort>
<ifName>Ethernet3/0/0</ifName>
<cost>20</cost>
<portMode>access</portMode>
<circuitId>1</circuitId>
<circuitMTU>1497</circuitMTU>
<drbStatus>Down</drbStatus>
<trillStatus>Mtu:Up/Lnk:Dn</trillStatus>
<dVlan>0</dVlan>
<drbPriority>50</drbPriority>
<csnpIntervals>
<csnpInterval>400</csnpInterval>
</csnpIntervals>
<helloIntervals>
<helloInterval>60</helloInterval>
<holdMultiplier>5</holdMultiplier>
</helloIntervals>
<lspRetranIntervals>
<retranInterval>5</retranInterval>
<throttInterval>500</throttInterval>
<throttCount>10</throttCount>
</lspRetranIntervals>
</trillPort>
</trillPorts>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

ifName Specifies the name The value is a string Mandatory


of an interface. This of 1 to 63 characters.
element is the
primary key in the
table.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 412


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

portMode Specifies an The values are as Optional


interface type. follows:
l Access
l Trunk
l Hybrid
l P2P
The default value is
P2P.

cost Specifies a cost on The value is an Optional


the TRILL interface. integer ranging from
0 to 16777215. The
default value is 0.

desiredDVlan Specifies a desired The value is an Optional


DVLAN. integer ranging from
1 to 4090.

drbPriority Specifies a DRB The value is an Optional


priority. integer ranging from
0 to 127.

csnpInterval Specifies an interval The value is an Optional


at which CSNPs are integer ranging from
sent. 1 to 65535. The
default value is 10.

helloInterval Specifies an interval The value is an Optional


at which Hello integer ranging from
packets are sent. 3 to 255. The default
value is 10.

holdMultiplier Specifies the The value is an Optional


number of integer ranging from
consecutive Hello 3 to 1000. The
packets that an RB default value is 3.
sends to a neighbor
before the RB
considers the
neighbor Down.

retranInterval Specifies an interval The value is an Optional


at which Level-1 integer ranging from
LSPs are 1 to 300. The default
retransmitted over a value is 5.
P2P link.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 413


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

throttInterval Specifies the The value is an Optional


minimum interval at integer ranging from
which LSPs are sent. 1 to 10000, in
milliseconds. The
default value is 50.

throttCount Specifies the The value is an Optional


maximum number integer ranging from
of LSPs that are sent 1 to 1000. The
during the throttle default value is 10.
interval.

authenticationType Specifies the The values are as Mandatory


authentication type follows:
for TRILL Hello l Simple
packets. This
element is the l Md5
primary key of l KEYCHAIN
trillHelloAuths. l hmac_sha256

authenticationSim- Specifies a password The value is a string Optional


ple for simple of 1 to 16 characters.
authentication.

authenticationMD5 Specifies a password The value is a string Optional


for MD5 or SHA256 of 1 to 255
authentication. characters.

sendOnly Specifies whether The value is a Optional


the system Boolean data type.
authenticates only The default value is
the packets to be FALSE.
sent.

keyId Specifies a key ID. The value is an Optional


integer ranging from
0 to 65535. The
default value is 0.

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 414


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.16.3 Delete a TRILL Interface

Operation URI Description

PUT /trill/trillSites/trillSite/ Delete a TRILL interface.


trillPorts/trillPort

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation='merge'>
<instanceId>0</instanceId>
<trillPorts>
<trillPort operation='delete'>
<ifName>Ethernet3/0/0</ifName>
</trillPort>
</trillPorts>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

ifName Specifies the name The value is a string Mandatory


of an interface. This of 1 to 63 characters.
element is the
primary key in the
table.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 415


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.17 TRILL Nickname Instance

3.18.1.17.1 Create a TRILL NickName Instance

Operation URI Description

PUT /trill/trillSites/trillSite/ Create a TRILL nickname


trillNicknames/ instance.
trillNickname

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation="merge">
<instanceId>0</instanceId>
<trillNicknames>
<trillNickname operation="create">
<nickName>100</nickName>
<priority>192</priority>
<rootPriority>32768</rootPriority>
</trillNickname>
</trillNicknames>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

nickName Set a nickname The value is an Optional


instance. integer ranging from
1 to 65471.

priority Set a priority value The value is an Optional


for a nickname. integer ranging from
128 to 255. The
default value is 192.

rootPriority Set a tree root The value is an Optional


priority value for a integer ranging from
nickname. 1 to 65535. The
default value is
32768.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 416


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.17.2 Query a TRILL NickName Instance

Operation URI Description

GET /trill/trillSites/trillSite/ Query configurations on a


trillNicknames/ TRILL nickname instance.
trillNickname

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillNicknames>
<trillNickname>
<nickName></nickName>
<priority></priority>
<rootPriority></rootPriority>
</trillNickname>
</trillNicknames>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

nickName Set a nickname The value is an Optional


instance. integer ranging from
1 to 65471.

priority Set a priority value The value is an Optional


for a nickname. integer ranging from
128 to 255. The
default value is 192.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 417


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

rootPriority Set a tree root The value is an Optional


priority value for a integer ranging from
nickname. 1 to 65535. The
default value is
32768.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite operation="merge">
<instanceId>0</instanceId>
<trillNicknames>
<trillNickname operation="create">
<nickName>100</nickName>
<priority>192</priority>
<rootPriority>32768</rootPriority>
</trillNickname>
</trillNicknames>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

nickName Set a nickname The value is an Optional


instance. integer ranging from
1 to 65471.

priority Set a priority value The value is an Optional


for a nickname. integer ranging from
128 to 255. The
default value is 192.

rootPriority Set a tree root The value is an Optional


priority value for a integer ranging from
nickname. 1 to 65535. The
default value is
32768.

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 418


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.17.3 Delete a TRILL NickName Instance

Operation URI Description

PUT /trill/trillSites/trillSite/ Delete a TRILL nickname


trillNicknames/ instance.
trillNickname

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<trillSite operation="merge">
<instanceId>0</instanceId>
<trillNicknames>
<trillNickname operation="delete">
<nickName>100</nickName>
<priority>192</priority>
<rootPriority>32768</rootPriority>
</trillNickname>
</trillNicknames>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

nickName Set a nickname The value is an Optional


instance. integer ranging from
1 to 65471.

priority Set a priority value The value is an Optional


for a nickname. integer ranging from
128 to 255. The
default value is 192.

rootPriority Set a tree root The value is an Optional


priority value for a integer ranging from
nickname. 1 to 65535. The
default value is
32768.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 419


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.18 TRILL LSP Database Information

3.18.1.18.1 Query the TRILL LSP Database Information

Operation URI Description

GET /trill/trillSites/trillSite/ Query the TRILL LSP


trillLsdbInfos/trillLsdbInfo database information.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillLsdbInfos>
<trillLsdbInfo>
<lspId></lspId>
<seqenceNumber></seqenceNumber>
<checkSum></checkSum>
<lspLength></lspLength>
<attBit></attBit>
<partitionBit></partitionBit>
<overloadBit></overloadBit>
<holdTime></holdTime>
<localLsp></localLsp>
</trillLsdbInfo>
</trillLsdbInfos>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

lspId LSP ID. The value is a string. Mandatory

seqenceNumber Serial number of an The value is a Optional


LSP. string .

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 420


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

checkSum Set a tree root The value is a string. Optional


priority value for a
nickname.

lspLength Length of an LSP. The value is an Optional


integer.

attBit ATT flag of an LSP. The value is an Optional


integer.

partitionBit Split flag of an LSP. The value is an Optional


integer.

overloadBit Overload flag of an The value is an Optional


LSP. integer.

holdTime Holdoff time of an The value is a string. Optional


LSP.

localLsp Local flag of an The value is a Optional


LSP. Boolean data type.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillLsdbInfos>
<trillLsdbInfo>
<lspId>380e.a811.1200.00-00*</lspId>
<seqenceNumber>0x0000004a</seqenceNumber>
<checkSum>0xe380</checkSum>
<lspLength>70</lspLength>
<attBit>0</attBit>
<partitionBit>0</partitionBit>
<overloadBit>0</overloadBit>
<holdTime>755</holdTime>
<localLsp>true</localLsp>
</trillLsdbInfo>
</trillLsdbInfos>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

lspId LSP ID. The value is a string. Mandatory

seqenceNumber Serial number of an The value is a Optional


LSP. string .

checkSum Set a tree root The value is a string. Optional


priority value for a
nickname.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 421


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

lspLength Length of an LSP. The value is an Optional


integer.

attBit ATT flag of an LSP. The value is an Optional


integer.

partitionBit Split flag of an LSP. The value is an Optional


integer.

overloadBit Overload flag of an The value is an Optional


LSP. integer.

holdTime Holdoff time of an The value is a string. Optional


LSP.

localLsp Local flag of an The value is a Optional


LSP. Boolean data type.

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.19 TRILL Neighbor Information

3.18.1.19.1 Query the TRILL neighbor information

Operation URI Description

GET /trill/trillSites/trillSite/ Query the TRILL neighbor


trillPeerInfos/trillPeerInfo information.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 422


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<trillPeerInfos>
<trillPeerInfo>
<hostName></hostName>
<interfaceName></interfaceName>
<circuitId></circuitId>
<status></status>
<holdTime></holdTime>
<priority></priority>
</trillPeerInfo>
</trillPeerInfos>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

hostName System name of a The value is a string. Mandatory


neighbor.

interfaceName Name of a The value is a Optional


neighboring string .
interface.

circuitId Circuit ID of a The value is a string. Optional


neighbor.

status Status of a neighbor. The value is an Optional


ENUM type.

holdTime Holdoff time of a The value is an Optional


neighbor. integer.

priority Priority value of a The value is a string. Optional


neighbor.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillPeerInfos>
<trillPeerInfo>
<hostName>380e.a821.1200</hostName>
<interfaceName>Eth3/0/0</interfaceName>
<circuitId>0000000006</circuitId>
<status>report</status>
<holdTime>27</holdTime>
<priority>--</priority>
</trillPeerInfo>
</trillPeerInfos>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

hostName System name of a The value is a string. Mandatory


neighbor.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 423


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

interfaceName Name of a The value is a Optional


neighboring string .
interface.

circuitId Circuit ID of a The value is a string. Optional


neighbor.

status Status of a neighbor. The value is an Optional


ENUM type.

holdTime Holdoff time of a The value is an Optional


neighbor. integer.

priority Priority value of a The value is a string. Optional


neighbor.

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.20 TRILL CMT Information

3.18.1.20.1 Query the TRILL CMT information

Operation URI Description

GET /trill/trillSites/trillSite/ Query the TRILL CMT


trillCmtInfos/trillCmtInfo information.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillCmtInfos>
<trillCmtInfo>
<groupId></groupId>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 424


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<peerNickName></peerNickName>
<pseudoNickName></pseudoNickName>
<priority></priority>
<cmtState></cmtState>
<localTreeId></localTreeId>
<rootNickName></rootNickName>
<localPseudoNickname></localPseudoNickname>
<localPriority></localPriority>
<peerStatus></peerStatus>
</trillCmtInfo>
</trillCmtInfos>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

groupId DFS(Dynamic The value is an Mandatory


Fabric Service) integer.
Group ID.

peerNickName Circuit ID of a The value is a string. Optional


neighbor.

pseudoNickName Status of a neighbor. The value is an Optional


ENUM type.

priority Priority of the The value is an Optional


Pseudo NickName. integer.

cmtState State of CMT. The value is an Optional


ENUM type.

localTreeId The Local Tree ID. The value is an Optional


integer.

rootNickName The Local Root Tree The value is an Optional


NickName. integer.

localPseudoNick- The Local Pseudo The value is an Optional


name NickName. integer.

localPriority Holdoff time of a The value is an Optional


neighbor. integer.

peerStatus Priority value of a The value is a string. Optional


neighbor.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillCmtInfos>
<trillCmtInfo>
<groupId>1</groupId>
<peerNickName>10</peerNickName>
<pseudoNickName>9244</pseudoNickName>
<priority>64</priority>
<cmtState>Up</cmtState>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 425


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<localTreeId>0</localTreeId>
<rootNickName>20</rootNickName>
<localPseudoNickname>9244</localPseudoNickname>
<localPriority>64</localPriority>
<peerStatus>Up</peerStatus>
</trillCmtInfo>
</trillCmtInfos>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

groupId DFS(Dynamic The value is an Mandatory


Fabric Service) integer.
Group ID.

peerNickName Circuit ID of a The value is a string. Optional


neighbor.

pseudoNickName Status of a neighbor. The value is an Optional


ENUM type.

priority Priority of the The value is an Optional


Pseudo NickName. integer.

cmtState State of CMT. The value is an Optional


ENUM type.

localTreeId The Local Tree ID. The value is an Optional


integer.

rootNickName The Local Root Tree The value is an Optional


NickName. integer.

localPseudoNick- The Local Pseudo The value is an Optional


name NickName. integer.

localPriority Holdoff time of a The value is an Optional


neighbor. integer.

peerStatus Priority value of a The value is a string. Optional


neighbor.

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 426


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.21 TRILL Name Mapping Table

3.18.1.21.1 Query the TRILL name mapping table

Operation URI Description

GET /trill/trillSites/trillSite/ Query the TRILL name


trillDispNameTables/ mapping table.
trillDispNameTable

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillDispNameTables>
<trillDispNameTable>
<hostName></hostName>
<systemId></systemId>
<hostType></hostType>
</trillDispNameTable>
</trillDispNameTables>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

hostName Host Name. The value is a string. Optional

systemId System ID. The value is a string. Optional

hostType Mapping Type. The value is an Optional


ENUM type.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillDispNameTables>
<trillDispNameTable>
<hostName>hw</hostName>
<hostType>DYNAMIC</hostType>
<systemId>3893.2c11.1200</systemId>
</trillDispNameTable>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 427


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

</trillDispNameTables>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

hostName Host Name. The value is a string. Optional

systemId System ID. The value is a string. Optional

hostType Mapping Type. The value is an Optional


ENUM type.

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.22 TRILL Nickname Information

3.18.1.22.1 Query the TRILL nickname information

Operation URI Description

GET /trill/trillSites/trillSite/ Query the TRILL nickname


trillNicknameInfos/ information.
trillNicknameInfo

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillNicknameInfos>
<trillNicknameInfo>
<nickName></nickName>
<priority></priority>
<rootPriority></rootPriority>
<systemId></systemId>
<conflictState></conflictState>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 428


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<staticFlag></staticFlag>
<isLocal></isLocal>
</trillNicknameInfo>
</trillNicknameInfos>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

nickName Nickname vlaue. The value is an Mandatory


integer.

priority Nickname priority The value is an Optional


value. integer.

rootPriority Tree root priority The value is an Optional


value. integer.

systemId System ID of an The value is a string. Optional


RBridge.

conflictState State of an The value is an Optional


RBridge's nickname. ENUM type.

staticFlag Static flag of an The value is an Optional


RBridge's nickname. ENUM type.

isLocal Local nickname flag The value is a Optional


of an RBridge. BOOL type.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillNicknameInfos>
<trillNicknameInfo>
<nickName>45219</nickName>
<priority>1</priority>
<rootPriority>32768</rootPriority>
<systemId>3893.2c11.1200</systemId>
<conflictState>A</conflictState>
<staticFlag>Dynamic</staticFlag>
<isLocal>true</isLocal>
</trillNicknameInfo>
</trillNicknameInfos>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

nickName Nickname vlaue. The value is an Mandatory


integer.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 429


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

priority Nickname priority The value is an Optional


value. integer.

rootPriority Tree root priority The value is an Optional


value. integer.

systemId System ID of an The value is a string. Optional


RBridge.

conflictState State of an The value is an Optional


RBridge's nickname. ENUM type.

staticFlag Static flag of an The value is an Optional


RBridge's nickname. ENUM type.

isLocal Local nickname flag The value is a Optional


of an RBridge. BOOL type.

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.23 Configurations on a TRILL Multi-Topology

3.18.1.23.1 Query the TRILL Routing Information

Operation URI Description

GET /trill/trillSites/trillSite/ Query the TRILL routing


trillSiteMTs/trillSiteMT/ information.
trillRouteInfos/
trillRouteInfo

l Request example

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 430


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<?xml version="1.0" encoding="UTF-8"?>


<trillSite>
<instanceId>0</instanceId>
<trillSiteMTs>
<trillSiteMT>
<mtId>0</mtId>
<trillRouteInfos>
<trillRouteInfo>
<nickName></nickName>
<cost></cost>
<outInterface></outInterface>
<outVlan></outVlan>
<nextHopName></nextHopName>
<hopCount></hopCount>
<flag></flag>
<age></age>
</trillRouteInfo>
</trillRouteInfos>
</trillSiteMT>
</trillSiteMTs>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

mtId TRILL multi- The value is an Mandatory


topology ID. integer.

nickName Nickname prefix of The value is an Mandatory


a route. integer.

cost Cost value of a The value is an Optional


route. integer.

outInterface Outbound interface The value is a string. Optional


name of a route.

outVlan Outer VLAN ID of a The value is an Optional


route. integer.

nextHopName Next-hop address of The value is a string. Optional


a route.

hopCount Hop count of a The value is an Optional


route. integer.

flag Route Information The value is a string. Optional


Flag.

age Route Time. The value is a string. Optional

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillSiteMTs>
<trillSiteMT>
<mtId>0</mtId>
<trillRouteInfos>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 431


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<trillRouteInfo>
<nickName>10</nickName>
<cost>200000</cost>
<outInterface>Eth3/0/0</outInterface>
<outVlan>100</outVlan>
<nextHopName>10/380e-a811-1200</nextHopName>
<hopCount>1</hopCount>
<flag>D/R</flag>
<age>15m33s</age>
</trillRouteInfo>
</trillRouteInfos>
</trillSiteMT>
</trillSiteMTs>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

mtId TRILL multi- The value is an Mandatory


topology ID. integer.

nickName Nickname prefix of The value is an Mandatory


a route. integer.

cost Cost value of a The value is an Optional


route. integer.

outInterface Outbound interface The value is an Optional


name of a route. ENUM type.

outVlan Outer VLAN ID of a The value is an Optional


route. integer.

nextHopName Next-hop address of The value is a string. Optional


a route.

hopCount Hop count of a The value is an Optional


route. integer.

flag Route Information The value is a string. Optional


Flag.

age Route Time. The value is a string. Optional

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 432


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.23.2 Query TRILL Multicast Routes

Operation URI Description

GET /trill/trillSites/trillSite/ Query TRILL multicast


trillSiteMTs/trillSiteMT/ routes.
trillMRouteInfos/
trillMRouteInfo

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillSiteMTs>
<trillSiteMT>
<mtId>0</mtId>
<trillMRouteInfos>
<trillMRouteInfo>
<vlan></vlan>
<rootNickname></rootNickname>
<hopCount></hopCount>
</trillMRouteInfo>
</trillMRouteInfos>
</trillSiteMT>
</trillSiteMTs>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

mtId Multi-topology ID The value is an Mandatory


integer.

vlan Multicast VLAN The value is an Mandatory


integer.

rootNickname Multicast root The value is an Mandatory


nickname integer.

hopCount Hop count The value is an Optional


integer.

l Response example (XML format)

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 433


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<?xml version="1.0" encoding="UTF-8"?>


<trillSite>
<instanceId>0</instanceId>
<trillSiteMTs>
<trillSiteMT>
<mtId>0</mtId>
<trillMRouteInfos>
<trillMRouteInfo>
<vlan>19</vlan>
<rootNickname>10</rootNickname>
<hopCount>2</hopCount>
</trillMRouteInfo>
</trillMRouteInfos>
</trillSiteMT>
</trillSiteMTs>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

mtId Multi-topology ID The value is an Mandatory


integer.

vlan Multicast VLAN The value is an Mandatory


integer.

rootNickname Multicast root The value is an Mandatory


nickname integer.

hopCount Hop count The value is an Optional


integer.

Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 434


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.18.1.23.3 Query the TRILL Multicast Routing Downstream Interface Information

Operation URI Description

GET /trill/trillSites/trillSite/ Query the TRILL multicast


trillSiteMTs/trillSiteMT/ routing downstream
trillMRouteInfos/ interface information.
trillMRouteInfo/
trillMRouteOutInterfaceIn-
fos/trillMRouteOutInterfa-
ceInfo

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillSiteMTs>
<trillSiteMT>
<mtId>0</mtId>
<trillMRouteInfos>
<trillMRouteInfo>
<vlan>19</vlan>
<rootNickname>10</rootNickname>
<trillMRouteOutInterfaceInfos>
<trillMRouteOutInterfaceInfo>
<outInterface></outInterface>
<outVlan></outVlan>
<flag></flag>
<age></age>
<nexpSystemId></nexpSystemId>
</trillMRouteOutInterfaceInfo>
</trillMRouteOutInterfaceInfos>
</trillMRouteInfo>
</trillMRouteInfos>
</trillSiteMT>
</trillSiteMTs>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

mtId TRILL multi- The value is an Mandatory


topology ID. integer.

vlan VLAN ID of a The value is an Optional


multicast route. integer.

rootNickname Root nickname of a The value is an Optional


multicast route. integer.

outInterface Outbound interface The value is an Optional


name of a route. ENUM type.

outVlan Outer VLAN ID of a The value is an Optional


out interface. integer.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 435


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

flag Route Information The value is a string. Optional


Flag.

age Route Time. The value is a string. Optional

nexpSystemId Root System ID. The value is a string. Optional

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillSiteMTs>
<trillSiteMT>
<mtId>0</mtId>
<trillMRouteInfos>
<trillMRouteInfo>
<vlan>19</vlan>
<rootNickname>10</rootNickname>
<trillMRouteOutInterfaceInfos>
<trillMRouteOutInterfaceInfo>
<outInterface>Eth3/0/0</outInterface>
<outVlan>100</outVlan>
<flag>-/-/T/D</flag>
<age>55m33s</age>
<nexpSystemId>0000.0000.0001</nexpSystemId>
</trillMRouteOutInterfaceInfo>
</trillMRouteOutInterfaceInfos>
</trillMRouteInfo>
</trillMRouteInfos>
</trillSiteMT>
</trillSiteMTs>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

mtId TRILL multi- The value is an Mandatory


topology ID. integer.

vlan VLAN ID of a The value is an Optional


multicast route. integer.

rootNickname Root nickname of a The value is an Optional


multicast route. integer.

outInterface Outbound interface The value is an Optional


name of a route. ENUM type.

outVlan Outer VLAN ID of a The value is an Optional


out interface. integer.

flag Route Information The value is a string. Optional


Flag.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 436


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

age Route Time. The value is a string. Optional

nexpSystemId Root System ID. The value is a string. Optional

Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.23.4 Query Information About Pruned Routes in a TRILL Multicast Group

Operation URI Description

GET /trill/trillSites/trillSite/ Query information about


trillSiteMTs/trillSiteMT/ pruned routes in a TRILL
trillMRouteGroupInfos/ multicast group.
trillMRouteGroupInfo

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillSiteMTs>
<trillSiteMT>
<mtId>0</mtId>
<trillMRouteGroupInfos>
<trillMRouteGroupInfo>
<vlan></vlan>
<groupIp></groupIp>
<rootNickname></rootNickname>
<hopCount></hopCount>
</trillMRouteGroupInfo>
</trillMRouteGroupInfos>
</trillSiteMT>
</trillSiteMTs>
</trillSite>

Elements

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 437


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

mtId Specifies a multi- The value is an Mandatory


topology ID. integer.

vlan Specifies a multicast The value is an Optional


VLAN. integer.

rootNickname Specifies a multicast The value is an Mandatory


root nickname. integer.

hopCount Specifies the The value is an Optional


number of hops. integer.

groupIp Specifies a multicast The value is a string. Optional


IP address.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillSiteMTs>
<trillSiteMT>
<mtId>0</mtId>
<trillMRouteInfos>
<trillMRouteInfo>
<vlan>19</vlan>
<rootNickname>10</rootNickname>
<hopCount>2</hopCount>
</trillMRouteInfo>
</trillMRouteInfos>
</trillSiteMT>
</trillSiteMTs>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

mtId Specifies a multi- The value is an Mandatory


topology ID. integer.

vlan Specifies a multicast The value is an Optional


VLAN. integer.

rootNickname Specifies a multicast The value is an Mandatory


root nickname. integer.

hopCount Specifies the The value is an Optional


number of hops. integer.

groupIp Specifies a multicast The value is a string. Optional


IP address.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 438


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.23.5 Query Information About the Next Hop of a Pruned Route in a TRILL
Multicast Group

Operation URI Description

GET /trill/trillSites/trillSite/ Query information about the


trillSiteMTs/trillSiteMT/ next hop of a pruned route
trillMRouteGroupInfos/ in a TRILL multicast group.
trillMRouteGroupInfo/
trillMRouteGroupOutIntIn-
fos/trillMRouteGroupOutIn-
tInfo

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillSiteMTs>
<trillSiteMT>
<mtId>0</mtId>
<trillMRouteGroupInfos>
<trillMRouteGroupInfo>
<vlan>19</vlan>
<groupIp>225.0.1.1</groupIp>
<rootNickname>10</rootNickname>
<trillMRouteGroupOutIntInfos>
<trillMRouteGroupOutIntInfo>
<outInterface></outInterface>
<outVlan></outVlan>
<flag></flag>
</trillMRouteGroupOutIntInfo>
</trillMRouteGroupOutIntInfos>
</trillMRouteGroupInfo>
</trillMRouteGroupInfos>
</trillSiteMT>
</trillSiteMTs>
</trillSite>

Elements

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 439


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

mtId Specifies a multi- The value is an Mandatory


topology ID. integer.

vlan Specifies a multicast The value is an Optional


VLAN. integer.

rootNickname Specifies a multicast The value is an Optional


root nickname. integer.

groupIp Specifies a multicast The value is an Optional


IP address. integer.

outInterface Specifies an The value is an Optional


outbound interface. integer.

outVlan Specifies an outer The value is an Optional


VLAN ID. integer.

flag Specifies a route The value is a string. Optional


flag.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillSiteMTs>
<trillSiteMT>
<mtId>0</mtId>
<trillMRouteGroupInfos>
<trillMRouteGroupInfo>
<vlan>19</vlan>
<groupIp>225.0.1.1</groupIp>
<rootNickname>10</rootNickname>
<trillMRouteGroupOutIntInfos>
<trillMRouteGroupOutIntInfo>
<outInterface>Eth3/0/0</outInterface>
<outVlan>100</outVlan>
<flag>-/-/T/D</flag>
</trillMRouteGroupOutIntInfo>
</trillMRouteGroupOutIntInfos>
</trillMRouteGroupInfo>
</trillMRouteGroupInfos>
</trillSiteMT>
</trillSiteMTs>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

mtId Specifies a multi- The value is an Mandatory


topology ID. integer.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 440


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

vlan Specifies a multicast The value is an Optional


VLAN. integer.

rootNickname Specifies a multicast The value is an Optional


root nickname. integer.

outInterface Specifies an The value is an Optional


outbound interface. integer.

outVlan Specifies an outer The value is an Optional


VLAN ID. integer.

flag Specifies a route The value is an Optional


flag. integer.

age Specifies a route The value is a string. Optional


time.

nexpSystemId Specifies the system The value is a string. Optional


ID of the next hop.

Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.18.1.23.6 Query TRILL Multicast RPF Check Information

Operation URI Description

GET /trill/trillSites/trillSite/ Query TRILL multicast RPF


trillSiteMTs/trillSiteMT/ check information.
trillRpfCheckInfos/
trillRpfCheckInfo

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<trillSite>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 441


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<instanceId>0</instanceId>
<trillSiteMTs>
<trillSiteMT>
<mtId>0</mtId>
<trillRpfCheckInfos>
<trillRpfCheckInfo>
<ingressNickname></ingressNickname>
<treeNickname></treeNickname>
<interfaceName></interfaceName>
<neighborMac></neighborMac>
<outVlan></outVlan>
</trillRpfCheckInfo>
</trillRpfCheckInfos>
</trillSiteMT>
</trillSiteMTs>
</trillSite>

Elements

Element Description Value Range Mandatory/


Optional

mtId Specifies a multi- The value is an Mandatory


topology ID. integer.

ingressNickname Specifies an ingress The value is an Mandatory


nickname. integer.

treeNickname Specifies a multicast The value is an Mandatory


root nickname. integer.

interfaceName Specifies an The value is a string. Optional


interface name.

neighborMac Specifies the MAC The value is a string. Optional


address of a
neighbor.

outVlan Specifies an outer The value is an Optional


VLAN ID. integer.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<trillSite>
<instanceId>0</instanceId>
<trillSiteMTs>
<trillSiteMT>
<mtId>0</mtId>
<trillRpfCheckInfos>
<trillRpfCheckInfo>
<ingressNickname>10</ingressNickname>
<treeNickname>10</treeNickname>
<interfaceName>Eth3/0/0</interfaceName>
<neighborMac>380e-a811-1200</neighborMac>
<outVlan>100</outVlan>
</trillRpfCheckInfo>
</trillRpfCheckInfos>
</trillSiteMT>
</trillSiteMTs>
</trillSite>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 442


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Elements

Element Description Value Range Mandatory/


Optional

mtId Specifies a multi- The value is an Mandatory


topology ID. integer.

ingressNickname Specifies an ingress The value is an Mandatory


nickname. integer.

treeNickname Specifies a multicast The value is an Mandatory


root nickname. integer.

interfaceName Specifies an The value is a string. Optional


interface name.

neighborMac Specifies the MAC The value is a string. Optional


address of a
neighbor.

outVlan Specifies an outer The value is an Optional


VLAN ID. integer.

Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.19 ARP

3.19.1 Create a Static ARP Entry


Operation URI Description

POST /arp/arpStaticTables/ Create a static ARP entry.


arpStaticTable

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 443


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<arpStaticTable>
<ipAddr>10.137.208.99</ipAddr>
<macAddr>0001-0001-0001</macAddr>
<ifName>MEth0/0/0</ifName>
<vrfName>_public_</vrfName>
</arpStaticTable>

Table 3-581 describes elements in requests.

Table 3-581 Elements

Element Description

vrfName Specifies the name of a VPN instance.


The value is a character string.

ipAddr Specifies an IPv4 address.

macAddr Specifies a MAC address. The value is in


the format of H-H-H, MAC type.

ifName Specifies a Layer 3 interface. The value is


a character string.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-582 describes status codes in responses.

Table 3-582 Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.19.2 Query an ARP Entry


Operation URI Description

GET /arp/arpTables Query ARP forwarding


entries.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 444


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1024">
<get>
<filter type="subtree">
<arp xmlns="http://www.huawei.com/netconf/vrp" content-version="1.0"
format-version="1.0">
<arpTables></arpTables>
</arp>
</filter>
</get>
</rpc>

Table 3-583 describes elements in requests.

Table 3-583 Elements


Element Description

arpTables Specifies an ARP entry.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="1024" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<data>
<arp xmlns="http://www.huawei.com/netconf/vrp" format-version="1.0"
content-version="1.0">
<arpTables>
<arpTable>
<vrfName>_public_</vrfName>
<ipAddr>2.1.1.1</ipAddr>
<macAddr>08e8-4f6b-4602</macAddr>
<expireTime/>
<styleType>InterfaceArp</styleType>
<ifName>10GE2/0/0</ifName>
<peVid/>
<ceVid/>
<pvc/>
<slotId/>
<vni/>
<sourceAddr/>
<peerAddr/>
</arpTable>
<arpTable>
<vrfName>_public_</vrfName>
<ipAddr>2.1.1.2</ipAddr>
<macAddr>08e8-4f6b-4b02</macAddr>
<expireTime>20</expireTime>
<styleType>DynamicArp</styleType>
<ifName>10GE2/0/0</ifName>
<peVid/>
<ceVid/>
<pvc/>
<slotId>2</slotId>
<vni/>
<sourceAddr/>
<peerAddr/>
</arpTable>
</arpTables>
</arp>
</data>
</rpc-reply>

Table 3-584 describes elements in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 445


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-584 Elements

Element Description

vrfName Specifies the name of a VPN instance.


The value is a string of characters.

ipAddr Specifies an IPv4 address.

macAddr Specifies a MAC address in the format of


H-H-H.

styleType Specifies the type of an entry. The value


is an enumerated type.
StaticArp: Specifies a static ARP entry.
DynamicArp: Specifies a dynamic ARP
entry.
InterfaceArp: Specifies an interface ARP
entry.
OpenFlowArp: Specifies a controller
entry.

expireTime Specifies the aging time for obtaining


entries. The value is an integer.

ifName Specifies the Layer 3 interface where the


ARP entry resides. The value is a string
of characters.

slotId Specifies the board number. The value is


an integer.

peVid Specifies the outer VLAN ID of the ARP


entry. The value is an integer.

Table 3-585 describes status codes in responses.

Table 3-585 Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 446


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Operation URI Description

GET /arp/arpTables/arpTable Query an ARP entry.

– Request example
<?xml version="1.0" encoding="UTF-8"?>
<arpTable>
<vrfName></vrfName>
<ipAddr></ipAddr>
<macAddr></macAddr>
<expireTime></expireTime>
<styleType></styleType>
<ifName></ifName>
<slotId></slotId>
<peVid></peVid>
</arpTable>

Table 3-586 describes elements in requests.

Table 3-586 Elements


Element Description

vrfName Specifies the name of a VPN instance.


The value is a character string.

ipAddr Specifies an IPv4 address.

macAddr Specifies a MAC address. The value is


in the format of H-H-H, MAC type.

styleType Specifies the type of an ARP entry.


The value is an enumerated type that
can be:
StaticArp: static ARP entry.
DynamicArp: dynamic ARP entry.
InterfaceArp: interface ARP entry.
OpenFlowArp: OpenFlow ARP entry.

expireTime Specifies the aging time of an ARP


entry. The value is an integer.

ifName Specifies a Layer 3 interface. The


value is a character string.

slotId Specifies the slot ID of a board. The


value is an integer.

peVid Specifies an outer VLAN ID. The


value is an integer.

– Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<arpTable>
<vrfName>_public_</vrfName>
<ipAddr>1.1.1.1</ipAddr>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 447


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<macAddr>38c4-8211-11ff</macAddr>
<expireTime>20</expireTime>
<styleType>DynamicArp</styleType>
<ifName>MEth0/0/0</ifName>
<slotId>0</slotId>
</peVid>
</arpTable>

Table 3-587 describes elements in responses.

Table 3-587 Elements

Element Description

vrfName Specifies the name of a VPN instance.


The value is a character string.

ipAddr Specifies an IPv4 address.

macAddr Specifies a MAC address. The value is


in the format of H-H-H, MAC type.

styleType Specifies the type of an ARP entry.


The value is an enumerated type that
can be:
StaticArp: static ARP entry.
DynamicArp: dynamic ARP entry.
InterfaceArp: interface ARP entry.
OpenFlowArp: OpenFlow ARP entry.

expireTime Specifies the aging time of an ARP


entry. The value is an integer.

ifName Specifies a Layer 3 interface. The


value is a character string.

slotId Specifies the slot ID of a board. The


peVid value is an integer.
Specifies an outer VLAN ID. The
value is an integer.

Table 3-588 describes status codes in responses.

Table 3-588 Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 448


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or
unidentified processing errors.

Operatio URI Description


n

GET /arp/arpStaticTables Query static ARP entries.

n Request example
<?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-
id="1024">
<get>
<filter type="subtree">
<arp xmlns="http://www.huawei.com/netconf/vrp" content-
version="1.0" format-version="1.0">
<arpStaticTables></arpStaticTables>
</arp>
</filter>
</get>
</rpc>

Table 3-589 describes elements in requests.

Table 3-589 Elements

Element Description

arpStaticTables Specifies a static ARP entry.

n Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="1024"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<data>
<arp xmlns="http://www.huawei.com/netconf/vrp" format-
version="1.0" content-version="1.0">
<arpStaticTables>
<arpStaticTable>
<vrfName>_public_</vrfName>
<ipAddr>11.1.1.100</ipAddr>
<macAddr>0001-0001-0001</macAddr>
<ifName></ifName>
<peVid/>
<ceVid/>
<vni/>
</arpStaticTable>
</arpStaticTables>
</arp>
</data>
</rpc-reply>

Table 3-590 describes elements in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 449


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-590 Elements

Element Description

vrfName Specifies the name of a VPN


instance. The value is a string of
characters.

ipAddr Specifies an IPv4 address.

macAddr Specifies a MAC address in the


format of H-H-H.

ifName Specifies the Layer 3 interface


where the ARP entry resides. The
value is a string of characters.

peVid Specifies the outer VLAN ID of the


ARP entry. The value is an integer.

ceVid Specifies the inner VLAN ID of the


ARP entry. The value is an integer.

vni Specifies the name of a VNI


instance.

Table 3-591 describes status codes in responses.

Table 3-591 Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because


the request is incorrect in syntax or
the information attribute in the
request is incorrect.

500 Internal Server Error The request operation failed because


of internal errors in services or
unidentified processing errors.

3.19.3 Modify a Static ARP Entry


Operation URI Description

PUT /arp/arpStaticTables/ Modify a static ARP entry.


arpStaticTable

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 450


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<arpStaticTable>
<ipAddr>10.137.208.99</ipAddr>
<macAddr>0001-0001-0002</macAddr>
<ifName>MEth0/0/0</ifName>
<vrfName>_public_</vrfName>
</arpStaticTable>

Table 3-592 describes elements in requests.

Table 3-592 Elements


Element Description

vrfName Specifies the name of a VPN instance.


The value is a character string.

ipAddr Specifies an IPv4 address.

macAddr Specifies a MAC address. The value is in


the format of H-H-H, MAC type.

ifName Specifies a Layer 3 interface. The value is


a character string.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-593 describes status codes in responses.

Table 3-593 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.19.4 Delete a Static ARP Entry


Operation URI Description

DELETE /arp/arpStaticTables/ Delete a static ARP entry.


arpStaticTable

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 451


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<arpStaticTable>
<vrfName>_public_</vrfName>
<ipAddr>10.137.208.99</ipAddr>
<macAddr>0001-0001-0001</macAddr>
</arpStaticTable>

Table 3-594 describes elements in requests.

Table 3-594 Elements


Element Description

vrfName Specifies the name of a VPN instance.


The value is a character string.

ipAddr Specifies an IPv4 address.

macAddr Specifies a MAC address. The value is in


the format of H-H-H, MAC type.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-595 describes status codes in responses.

Table 3-595 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.20 Ping

3.20.1 IPv4 Ping

Start an IPv4 Ping Test


Operation URI Description

POST /dgntl/ipv4/startIpPing Start an IPv4 ping operation.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 452


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<startIpPing>
<testName>ping</testName>
<destAddr>192.168.1.2</destAddr>
<sourceAddr>192.168.1.1</sourceAddr>
</startIpPing>

Table 3-596 describes elements in requests.

Table 3-596 Elements


Element Description

destAddr Specifies the destination IP address of


ICMP Echo Request packets. This
element is mandatory.

sourceAddr Specifies the source IP address of ICMP


Echo Request packets.

ifName Specifies the name of an interface for


sending ICMP packets.

packetCount Specifies the number of ICMP packets to


be sent.

packetSize Specifies the number of bytes of ICMP


packets.

interval Specifies an interval at which ICMP


packets are sent.

timeout Specifies the timeout period of ICMP


packets.

ttl Specifies the TTL of ICMP Echo Request


packets to be sent.

tos Specifies the ToS of ICMP Echo Request


packets to be sent.

vrfName Specifies a VPN instance name.

testName Specifies a ping test name. This element


is mandatory.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="801" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ok/>
</rpc-reply>

Table 3-597 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 453


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-597 Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Stop an IPv4 Ping Test


Operation URI Description

POST /dgntl/ipv4/stopIpPing Stop an IPv4 ping test.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<stopIpPing>
<testName>ping</testName>
</stopIpPing>

Table 3-598 describes elements in requests.

Table 3-598 Elements

Element Description

testName Specifies a ping test name. This element


is mandatory.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="801" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ok/>
</rpc-reply>

Table 3-599 describes status codes in responses.

Table 3-599 Status codes in responses

Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 454


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Delete an IPv4 Ping Test


Operation URI Description

POST /dgntl/ipv4/deleteIpPing Delete an IPv4 ping


operation.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<deleteIpPing>
<testName>ping</testName>
</deleteIpPing>

Table 3-600 describes elements in requests.

Table 3-600 Elements


Element Description

testName Specifies a ping test name. This element


is mandatory.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="801" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ok/>
</rpc-reply>

Table 3-601 describes status codes in responses.

Table 3-601 Status codes in responses


Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 455


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Query an IPv4 Ping Test


Operation URI Description

GET /dgntl/ipv4/ipv4PingResults Query all IPv4 ping results.

GET /dgntl/ipv4/ipv4PingResults Query an IPv4 ping result.

l Request example
Query all results.
<?xml version='1.0' encoding='UTF-8'?>
<ipv4PingResults>
<ipv4PingResult>
<testName></testName>
<packetRecv/>
<packetSend/>
<lossRatio/>
<rttMin/>
<rttMax/>
<averageRtt/>
<status/>
<errorType/>
</ipv4PingResult>
</ipv4PingResults>

Query a single result.


<?xml version='1.0' encoding='UTF-8'?>
<ipv4PingResults>
<ipv4PingResult>
<testName>testName</testName>
<packetRecv/>
<packetSend/>
<lossRatio/>
<rttMin/>
<rttMax/>
<averageRtt/>
<status/>
<errorType/>
</ipv4PingResult>
</ipv4PingResults>

Table 3-602 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 456


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-602 Elements


Element Description

testName Specifies a ping test name. This element


is mandatory.

packetRecv Specifies the number of packets received.

packetSend Specifies the number of packets sent.

lossRatio Specifies a packet loss rate.

rttMin Specifies the minimum delay.

rttMax Specifies the maximum delay.

averageRtt Specifies the average delay.

status Specifies the detection status.


l finished
l processing

errorType Specifies a ping result.


l success
l failed

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ipv4PingResults>
<ipv4PingResult>
<testName>s7</testName>
<packetRecv>3</packetRecv>
<packetSend>3</packetSend>
<lossRatio>0</lossRatio>
<rttMin>1</rttMin>
<rttMax>1</rttMax>
<averageRtt>1</averageRtt>
<status>finished</status>
<errorType>success</errorType>
</ipv4PingResult>
</ipv4PingResults>

Table 3-603 describes elements in responses.

Table 3-603 Elements


Element Description

testName Specifies a ping test name.

packetRecv Specifies the number of packets received.

packetSend Specifies the number of packets sent.

lossRatio Specifies a packet loss rate.

rttMin Specifies the minimum delay.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 457


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

rttMax Specifies the maximum delay.

averageRtt Specifies the average delay.

status Specifies the detection status.


l finished
l processing

errorType Specifies a ping result.


l success
l failed

Table 3-604 describes status codes in responses.

Table 3-604 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Query the Detailed IPv4 Ping Result


Operation URI Description

GET /dgntl/ipv4/ipv4PingResults/ Query the detailed IPv4 ping


ipv4PingResult result.

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<ipv4PingResult>
<testName>s7</testName>
<pingResultDetails>
<pingResultDetail>
<testName></testName>
<index></index>
<ipAddr/>
<packetSize/>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 458


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<ttl/>
<rtt/>
<isDelete/>
<resultType/>
</pingResultDetail>
</pingResultDetails>
</ipv4PingResult>

Table 3-605 describes elements in requests.

Table 3-605 Elements


Element Description

testName Specifies a ping test name. This element


is mandatory.

index Specifies a packet index. This element is


mandatory.

ipAddr Specifies the IP address of packets.

packetSize Specifies the number of bytes of a packet.

ttl Specifies the TTL of packets.

rtt Specifies a delay.

isDelete Indicates whether the ping test is deleted.

resultType Specifies a ping result.


l success
l timeout
l failed

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<pingResultDetails>
<pingResultDetail>
<testName>s7</testName>
<index>2</index>
<ipAddr>127.0.0.1</ipAddr>
<packetSize>56</packetSize>
<ttl>255</ttl>
<rtt>1</rtt>
<isDelete>false</isDelete>
<resultType>success</resultType>
</pingResultDetail>
</pingResultDetails>

Table 3-606 describes elements in responses.

Table 3-606 Elements


Element Description

testName Specifies a ping test name.

index Specifies a packet index.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 459


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

ipAddr Specifies the IP address of packets.

packetSize Specifies the number of bytes of a packet.

ttl Specifies the TTL of packets.

rtt Specifies a delay.

isDelete Indicates whether the ping test is deleted.

resultType Specifies a ping result.


l success
l timeout
l failed

Table 3-607 describes status codes in responses.

Table 3-607 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.20.2 IPv6 Ping


Start an IPv6 Ping Test
Operation URI Description

POST /dgntl/ipv6/startIpPing Start an IPv6 ping test.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<startIpPing>
<testName>ipv6_ping</testName>
<destAddr>2001:db8::2</destAddr>
<sourceAddr>2001:db8::3</sourceAddr>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 460


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<ifName>XXX</ifName>
</startIpPing>

Table 3-608 describes elements in requests.

Table 3-608 Elements


Element Description

destAddr Specifies the destination IP address of


ICMP Echo Request packets. This
element is mandatory.

sourceAddr Specifies the source IP address of ICMP


Echo Request packets.

ifName Specifies the name of an interface for


sending ICMP packets.

packetCount Specifies the number of ICMP packets


sent.

packetSize Specifies the number of bytes of ICMP


packets sent.

interval Specifies an interval at which ICMP


packets are sent.

timeout Specifies the timeout period of ICMP


packets.

ttl Specifies the TTL of ICMP Echo Request


packets to be sent.

tos Specifies the ToS of ICMP Echo Request


packets to be sent.

vrfName Specifies a VPN instance name.

testName Specifies a ping test name. This element


is mandatory.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="801" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ok/>
</rpc-reply>

Table 3-609 describes status codes in responses.

Table 3-609 Status codes in responses


Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 461


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Stop an IPv6 Ping Test


Operation URI Description

POST /dgntl/ipv6/stopIpPing Stop an IPv6 ping test.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<stopIpPing>
<testName>ipv6_ping</testName>
</stopIpPing>

Table 3-610 describes elements in requests.

Table 3-610 Elements


Element Description

testName Specifies a ping test name. This element


is mandatory.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="801" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ok/>
</rpc-reply>

Table 3-611 describes status codes in responses.

Table 3-611 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 462


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Delete an IPv6 Ping Test


Operation URI Description

POST /dgntl/ipv6/deleteIpPing Delete an IPv6 Ping Test

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<deleteIpPing>
<testName>ipv6_ping</testName>
</deleteIpPing>

Table 3-612 describes elements in requests.

Table 3-612 Elements


Element Description

testName Delete ping test name. This element is


mandatory.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="801" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ok/>
</rpc-reply>

Table 3-613 describes status codes in responses.

Table 3-613 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 463


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Query an IPv6 Ping Test


Operation URI Description

GET /dgntl/ipv6/ipv6PingResults Query all IPv6 ping results.

GET /dgntl/ipv6/ipv6PingResults Query an IPv6 ping result.

l Request example
Query all results
<?xml version='1.0' encoding='UTF-8'?>
<ipv6PingResults>
<ipv6PingResult>
<testName></testName>
<packetRecv/>
<packetSend/>
<lossRatio/>
<rttMin/>
<rttMax/>
<averageRtt/>
<status/>
<errorType/>
</ipv6PingResult>
</ipv6PingResults>

Query a single result


<?xml version='1.0' encoding='UTF-8'?>
<ipv6PingResults>
<ipv6PingResult>
<testName>testName</testName>
<packetRecv/>
<packetSend/>
<lossRatio/>
<rttMin/>
<rttMax/>
<averageRtt/>
<status/>
<errorType/>
</ipv6PingResult>
</ipv6PingResults>

Table 3-614 describes elements in requests.

Table 3-614 Elements

Element Description

testName Specifies a ping test name. This element


is mandatory.

packetRecv Specifies the number of packets received.

packetSend Specifies the number of packets sent.

lossRatio Specifies a packet loss rate.

rttMin Specifies the minimum delay.

rttMax Specifies the maximum delay.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 464


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

averageRtt Specifies the average delay.

status Specifies the detection status.


l finished
l processing

errorType Specifies a ping result.


l success
l failed

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ipv6PingResults>
<ipv6PingResult>
<testName>s1</testName>
<packetRecv>2</packetRecv>
<packetSend>2</packetSend>
<lossRatio>0</lossRatio>
<rttMin>1</rttMin>
<rttMax>1</rttMax>
<averageRtt>1</averageRtt>
<status>finished</status>
<errorType>success</errorType>
</ipv6PingResult>
</ipv6PingResults>
Table 3-615 describes elements in responses.

Table 3-615 Elements


Element Description

testName Specifies a ping test name.

packetRecv Specifies the number of packets received.

packetSend Specifies the number of packets sent.

lossRatio Specifies a packet loss rate.

rttMin Specifies the minimum delay.

rttMax Specifies the maximum delay.

averageRtt Specifies the average delay.

status Specifies the detection status.


l finished
l processing

errorType Specifies a ping result.


l success
l failed

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 465


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-616 describes status codes in responses.

Table 3-616 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Query the Detailed IPv6 Ping Result


Operation URI Description

GET /dgntl/ipv6/ipv6PingResults/ Query the detailed IPv6 ping


ipv6PingResult/ result.
pingResultDetails

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<ipv6PingResults>
<ipv6PingResult>
<testName>ipv6_ping</testName>
<pingResultDetails>
<pingResultDetail>
<index></index>
<destIpAddr></destIpAddr>
<packetSize></packetSize>
</pingResultDetail>
</pingResultDetails>
</ipv6PingResult>
</ipv6PingResults>

Table 3-617 describes elements in requests.

Table 3-617 Elements


Element Description

testName Specifies a ping test name. This element


is mandatory.

index Specifies a packet index. This element is


mandatory.

destIpAddr Specifies the IP address of packets.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 466


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

packetSize Specifies the number of bytes of a packet.

ttl Specifies the TTL of packets.

rtt Specifies a delay.

isDelete Indicates whether the ping test is deleted.

resultType Specifies a ping result.


l success
l timeout
l failed

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ipv6PingResults>
<ipv6PingResult>
<testName>ipv6_ping</testName>
<pingResultDetails>
<pingResultDetail>
<index>1</index>
<destIpAddr>2001:db8::2</destIpAddr>
<packetSize>56</packetSize>
</pingResultDetail>
<pingResultDetail>
<index>2</index>
<destIpAddr>2001:db8::2</destIpAddr>
<packetSize>56</packetSize>
</pingResultDetail>
<pingResultDetail>
<index>3</index>
<destIpAddr>2001:db8::2</destIpAddr>
<packetSize>56</packetSize>
</pingResultDetail>
<pingResultDetail>
<index>4</index>
<destIpAddr>2001:db8::2</destIpAddr>
<packetSize>56</packetSize>
</pingResultDetail>
<pingResultDetail>
<index>5</index>
<destIpAddr>2001:db8::2</destIpAddr>
<packetSize>56</packetSize>
</pingResultDetail>
</pingResultDetails>
</ipv6PingResult>
</ipv6PingResults>

Table 3-618 describes elements in responses.

Table 3-618 Elements

Element Description

testName Specifies a ping test name.

index Specifies a packet index.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 467


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

destIpAddr Specifies the IP address of packets.

packetSize Specifies the number of bytes of a packet.

ttl Specifies the TTL of packets.

rtt Specifies a delay.

isDelete Indicates whether the ping test is deleted.

resultType Specifies a ping result.


l success
l timeout
l failed

Table 3-619 describes status codes in responses.

Table 3-619 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.21 Trace

3.21.1 IPv4 Trace

Start an IPv4 Trace Test


Operation URI Description

POST /dgntl/ipv4/startIpTrace Start an IPv4 trace test.

l Request example

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 468


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<?xml version="1.0" encoding="UTF-8"?>


<startIpTrace>
<testName>trace</testName>
<destAddr>192.168.1.2</destAddr>
<sourceAddr>192.168.1.1</sourceAddr>
</startIpTrace>

Table 3-620 describes elements in requests.

Table 3-620 Elements


Element Description

destIpAddr Specifies the destination IP address of


trace test packets. This element is
mandatory.

sourceAddress Specifies the source IP address of trace


test packets.

ifName Specifies the name of an interface for


sending test packets.

packetSize Specifies the number of bytes in sent test


packets.

probePktsNum Specifies the number of sent test packets.

udpPortNum Specifies a destination port number.

timeout Specifies a timeout period for test


packets.

firstTtl Specifies the TTL of the first packet sent


during the test.

maxTtl Specifies the maximum TTL of test


packets.

vrfName Specifies a VPN instance name.

testName Specifies a trace test name. This element


is mandatory.

showMplsLabelFlag Specifies whether to display label


information.

showHostNameFlag Specifies whether to perform reverse


domain name parsing.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="801" xmlns="urn:ietf:params:xml:ns:netconf:base:
1.0">
<ok/>
</rpc-reply>

Table 3-621 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 469


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-621 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Stop an IPv4 Trace Test


Operation URI Description

POST /dgntl/ipv4/stopIpTrace Stop an IPv4 trace test.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<stopIpTrace>
<testName>trace</testName>
</stopIpTrace>

Table 3-622 describes elements in requests.

Table 3-622 Elements


Element Description

testName Specifies a trace test name. This element


is mandatory.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="801" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ok/>
</rpc-reply>

Table 3-623 describes status codes in responses.

Table 3-623 Status codes in responses


Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 470


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Delete an IPv4 Trace Test


Operation URI Description

Delete /dgntl/ipv4/deleteIpTrace Delete an IPv4 trace test.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<deleteIpTrace>
<testName>trace</testName>
</deleteIpTrace>

Table 3-624 describes elements in requests.

Table 3-624 Elements

Element Description

testName Specifies a trace test name. This element


is mandatory.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="801" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ok/>
</rpc-reply>

Table 3-625 describes status codes in responses.

Table 3-625 Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 471


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Query an IPv4 Trace Test


Operation URI Description

GET /dgntl/ipv4/ Query all IPv4 trace results.


ipv4TraceResults

GET /dgntl/ipv4/ Query a single IPv4 trace


ipv4TraceResults result.

l Request example
Query all results.
<?xml version="1.0" encoding="UTF-8"?>
<ipv4TraceResults>
</ipv4TraceResults>

Query a single result.


<?xml version="1.0" encoding="UTF-8"?>
<ipv4TraceResults>
<ipv4TraceResult>
<testName>trace</testName>
<status/>
<errorType/>
</ipv4TraceResult>
</ipv4TraceResults>

Table 3-626 describes elements in requests.

Table 3-626 Elements


Element Description

testName Specifies a trace test name.

status Specifies the test status.


l finished
l processing

errorType Specifies a test result.


l success
l failed

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ipv4TraceResults>
<ipv4TraceResult>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 472


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<testName>trace</testName>
<status>finished</status>
<errorType>success</errorType>
</ipv4TraceResult>
</ipv4TraceResults>

Table 3-627 describes elements in responses.

Table 3-627 Elements

Element Description

testName Specifies a test name.

status Specifies the test status.


l finished
l processing

errorType Specifies a test result.


l success
l failed

Table 3-628 describes status codes in responses.

Table 3-628 Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Query Detailed IPv4 Trace Test Results


Operation URI Description

GET /dgntl/ipv4/ Query detailed IPv4 trace


ipv4TraceResults/ test results.
ipv4TraceResult/
traceResultDetails

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 473


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<traceResultDetails>
</traceResultDetails>

Table 3-629 describes elements in requests.

Table 3-629 Elements


Element Description

testName Specifies a trace test name. This element


is mandatory.

status Specifies the test status.


l finished
l processing

errorType Specifies a test result.


l success
l timeout
l failed

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<traceResultDetails>
<traceResultDetail>
<testName>trace</testName>
<hopIndex>1</hopIndex>
<ttl>1</ttl>
<rtt>2</rtt>
<dsIpAddr>192.168.1.2</dsIpAddr>
<isDelete>false</isDelete>
<hostName></hostName>
</traceResultDetail>
<traceResultDetail>
<testName>trace</testName>
<hopIndex>2</hopIndex>
<ttl>1</ttl>
<rtt>5</rtt>
<dsIpAddr>192.168.1.2</dsIpAddr>
<isDelete>false</isDelete>
<hostName></hostName>
</traceResultDetail>
<traceResultDetail>
<testName>trace</testName>
<hopIndex>3</hopIndex>
<ttl>1</ttl>
<rtt>8</rtt>
<dsIpAddr>192.168.1.2</dsIpAddr>
<isDelete>false</isDelete>
<hostName></hostName>
</traceResultDetail>
</traceResultDetails>

Table 3-630 describes elements in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 474


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-630 Elements


Element Description

testName Specifies a test name.

status Specifies the test status.

errorType Specifies a test result.

hopIndex Specifies the serial number of a hop on


the test path.

ttl Specifies the TTL of the received


response.

type Specifies the type of a node.

rtt Specifies the round trip time of test


packets, in milliseconds.

dsIpAddr Specifies the destination address


corresponding to a specified hop.

isDelete Indicates whether query results are


deleted.

hostName Specifies a domain name.

mplsLabelInfo Specifies MPLS label information.

labelCountIndex Specifies an MPLS label index.

mplsLabel Specifies an MPLS label.

mplsExp Specifies an MPLS priority.

mplsStackBottom Specifies the MPLS stack bottom.

mplsTtl Specifies an MPLS TTL.

Table 3-631 describes status codes in responses.

Table 3-631 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 475


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.21.2 IPv6 Trace

Start an IPv6 Trace Test


Operation URI Description

POST /dgntl/ipv6/startIpTrace Start an IPv6 trace test.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<startIpTrace>
<testName>trace</testName>
<destAddr>2001:db8::2</destAddr>
<sourceAddr>2001:db8::1</sourceAddr>
</startIpTrace>

Table 3-632 describes elements in requests.

Table 3-632 Elements


Element Description

destAddr Specifies the destination IP address of


trace test packets. This element is
mandatory.

sourceAddr Specifies the source IP address of trace


test packets.

packetSize Specifies the number of bytes in sent test


packets.

packetCount Specifies the number of sent test packets.

udpPortNum Specifies a destination port number.

timeout Specifies a timeout period for test


packets.

initTtl Specifies the TTL of the first packet sent


during the test.

maxTtl Specifies the maximum TTL of test


packets.

vrfName Specifies a VPN instance name.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 476


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

testName Specifies a trace test name. This element


is mandatory.

showMplsLabelFlag Specifies whether to display label


information.

showHostNameFlag Specifies whether to perform reverse


domain name parsing.

showHostNameFlag Specifies whether to perform reverse


domain name parsing.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="801" xmlns="urn:ietf:params:xml:ns:netconf:base:
1.0">
<ok/>
</rpc-reply>

Table 3-633 describes status codes in responses.

Table 3-633 Status codes in responses

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Stop an IPv6 Trace Test


Operation URI Description

POST /dgntl/ipv6/stopIpTrace Stop an IPv6 trace test.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<stopIpTrace>
<testName>trace</testName>
</stopIpTrace>

Table 3-634 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 477


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-634 Elements


Element Description

testName Specifies a trace test name. This element


is mandatory.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="801" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ok/>
</rpc-reply>

Table 3-635 describes status codes in responses.

Table 3-635 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Delete an IPv4 Trace Test


Operation URI Description

Delete /dgntl/ipv4/deleteIpTrace Delete an IPv4 trace test.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<deleteIpTrace>
<testName>trace</testName>
</deleteIpTrace>

Table 3-636 describes elements in requests.

Table 3-636 Elements


Element Description

testName Specifies a trace test name. This element


is mandatory.

l Response example (XML format)

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 478


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<?xml version="1.0" encoding="UTF-8"?>


<rpc-reply message-id="801" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ok/>
</rpc-reply>

Table 3-637 describes status codes in responses.

Table 3-637 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Query an IPv6 Trace Test


Operation URI Description

GET /dgntl/ipv6/ Query all IPv6 trace results.


ipv6TraceResults

GET /dgntl/ipv6/ Query a single IPv6 trace


ipv6TraceResults result.

l Request example
Query all results.
<?xml version="1.0" encoding="UTF-8"?>
<ipv6TraceResults>
</ipv6TraceResults>

Query a single result.


<?xml version="1.0" encoding="UTF-8"?>
<ipv6TraceResults>
<ipv6TraceResult>
<testName>trace</testName>
<status/>
<errorType/>
</ipv6TraceResult>
</ipv6TraceResults>

Table 3-638 describes elements in requests.

Table 3-638 Elements


Element Description

testName Specifies a trace test name.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 479


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

status Specifies the test status.


l finished
l processing

errorType Specifies a test result.


l success
l failed

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ipv6TraceResults>
<ipv6TraceResult>
<testName>trace</testName>
<status>finished</status>
<errorType>success</errorType>
</ipv6TraceResult>
</ipv6TraceResults>

Table 3-639 describes elements in responses.

Table 3-639 Elements


Element Description

testName Specifies a test name.

status Specifies the test status.


l finished
l processing

errorType Specifies a test result.


l success
l failed

Table 3-640 describes status codes in responses.

Table 3-640 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 480


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Query Detailed IPv6 Trace Test Results


Operation URI Description

GET /dgntl/ipv6/ Query detailed IPv6 trace


ipv6TraceResults/ test results.
ipv6TraceResult/
traceResultDetails

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<traceResultDetails>
</traceResultDetails>

Table 3-641 describes elements in requests.

Table 3-641 Elements


Element Description

testName Specifies a trace test name. This element


is mandatory.

status Specifies the test status.


l finished
l processing

errorType Specifies a test result.


l success
l timeout
l failed

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<traceResultDetails>
<traceResultDetail>
<vrId>0</vrId>
<testName>trace</testName>
<hopIndex>1</hopIndex>
<ttl>1</ttl>
<rtt>2</rtt>
<destIpAddr>2001:db8:::2</destIpAddr>
<isDelete>false</isDelete>
<hostName></hostName>
</traceResultDetail>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 481


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<traceResultDetail>
<vrId>0</vrId>
<testName>trace</testName>
<hopIndex>2</hopIndex>
<ttl>1</ttl>
<rtt>2</rtt>
<destIpAddr>2001:db8:::2</destIpAddr>
<isDelete>false</isDelete>
<hostName></hostName>
</traceResultDetail>
<traceResultDetail>
<vrId>0</vrId>
<testName>trace</testName>
<hopIndex>3</hopIndex>
<ttl>1</ttl>
<rtt>2</rtt>
<destIpAddr>2001:db8:::2</destIpAddr>
<isDelete>false</isDelete>
<hostName></hostName>
</traceResultDetail>
</traceResultDetails>
</ipv6TraceResult>
</ipv6TraceResults>
</ipv6>
</dgntl>
</data>
</rpc-reply>]]>]]>

describes elements in responses.

Table 3-642 Elements


Element Description

testName Specifies a test name.

status Specifies the test status.

errorType Specifies a test result.

hopIndex Specifies the serial number of a hop on


the test path.

ttl Specifies the TTL of the received


response.

type Specifies the type of a node.

rtt Specifies the round trip time of test


packets, in milliseconds.

dsIpAddr Specifies the destination address


corresponding to a specified hop.

isDelete Indicates whether query results are


deleted.

hostName Specifies a domain name.

mplsLabelInfo Specifies MPLS label information.

labelCountIndex Specifies an MPLS label index.

mplsLabel Specifies an MPLS label.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 482


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

mplsExp Specifies an MPLS priority.

mplsStackBottom Specifies the MPLS stack bottom.

mplsTtl Specifies an MPLS TTL.

Table 3-643 describes status codes in responses.

Table 3-643 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.22 LLDP

3.22.1 Global LLDP Attributes


Query Global LLDP Attributes
Operation URI Description

GET /lldp/lldpSys Query global LLDP


attributes.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1024">
<get>
<filter type="subtree">
<lldp xmlns="http://www.huawei.com/netconf/vrp" content-version="1.0"
format-version="1.0">
<lldpSys>
<lldpEnable></lldpEnable>
<mdnStatus></mdnStatus>
<lldpSysInformation></lldpSysInformation>
<lldpSysParameter></lldpSysParameter>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 483


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<mdnSysStatistics></mdnSysStatistics>
<lldpSysStatistics></lldpSysStatistics>
</lldpSys>
</lldp>
</filter>
</get>
</rpc>

Table 3-644 describes elements in requests.

Table 3-644 Elements


Element Description

lldpEnable Specifies whether LLDP is globally


enabled.

mdnStatus Specifies whether MDN is globally


enabled.

lldpSysInformation Specifies global dynamic LLDP


information.

lldpSysParameter Specifies global LLDP configurations.

mdnSysStatistics Specifies global MDN statistics.

lldpSysStatistics Specifies global LLDP statistics.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1024">
<data>
<lldp xmlns="http://www.huawei.com/netconf/vrp" content-version="1.0"
format-version="1.0">
<lldpSys>
<lldpEnable>enabled</lldpEnable>
<mdnStatus>disabled</mdnStatus>
</lldpSys>
</lldp>
</data>
</rpc-reply>

Table 3-645 describes elements in responses.

Table 3-645 Elements


Element Description

lldpEnable Specifies whether LLDP is globally


enabled.

mdnStatus Specifies whether MDN is globally


enabled.

Operation URI Description

PUT /lldp/lldpSys Modify global LLDP


parameters.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 484


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="801">
<edit-config>
<target>
<running/>
</target>
<default-operation>merge</default-operation>
<error-option>rollback-on-error</error-option>
<config>
<lldp xmlns="http://www.huawei.com/netconf/vrp" content-version="1.0"
format-version="1.0">
<lldpSys operation="merge">
<lldpEnable>enabled</lldpEnable>
<mdnStatus>disabled</mdnStatus>
</lldpSys>
</lldp>
</config>
</edit-config>
</rpc>

Table 3-646 describes elements in requests.

Table 3-646 Elements


Element Description

lldpEnable Specifies whether LLDP is globally


enabled.

mdnStatus Specifies whether MDN is globally


enabled.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="801" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
flow-id="98">
? <ok/>
</rpc-reply>

Query Global Dynamic LLDP Information


Operation URI Description

GET /lldp/lldpSys/ Query global dynamic


lldpSysInformation LLDP parameters.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<lldpSys>
<lldpEnable></lldpEnable>
<mdnStatus></mdnStatus>
<lldpSysInformation>
<chassisIdSubtype></chassisIdSubtype>
<chassisId></chassisId>
<sysName></sysName>
<sysDesc></sysDesc>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 485


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<sysCapEnabled></sysCapEnabled>
<sysCapSupported></sysCapSupported>
<manAddrSubtype></manAddrSubtype>
<manAddr></manAddr>
<manAddrLen></manAddrLen>
<manAddrIfSubtype></manAddrIfSubtype>
<manAddrIfId></manAddrIfId>
<manAddrOid></manAddrOid>
<lldpUpTime></lldpUpTime>
</lldpSysInformation>
</lldpSys>
Table 3-647 describes elements in requests.

Table 3-647 Elements


Elemen Description

lldpEnable Specifies whether LLDP is globally


enabled.

mdnStatus Specifies whether MDN is globally


enabled.

chassisIdSubtype Specifies the device ID sub-type.

chassisId Specifies the device ID.

sysName Specifies the system name.

sysDesc Specifies the system description.

sysCapEnabled Specifies the enabled system capability

sysCapSupported Specifies the supported system capability.

manAddrSubtype Specifies the management address sub-


type.

manAddr Specifies the management address.

manAddrLen Specifies the management address length.

manAddrIfSubtype Specifies the port sub-type of the


management address.

manAddrIfId Specifies the port ID of the management


address.

manAddrOid Specifies the OID of the management


address.

lldpUpTime Specifies the time when LLDP was


enabled.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<lldpSys>
<lldpEnable>enabled</lldpEnable>
<mdnStatus>disabled</mdnStatus>
<lldpSysInformation>
<chassisIdSubtype>macAddress</chassisIdSubtype>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 486


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<chassisId>38ba-ced9-5202</chassisId>
<sysName>HUAWEI</sysName>
<sysDesc>Huawei Versatile Routing Platform Software

VRP (R) software, Version 8.90 (CE6850 V800R009C10B060)

Copyright (C) 2012-2014 Huawei Technologies Co., Ltd.

HUAWEI CE6850

</sysDesc>
<sysCapEnabled>bridge router</sysCapEnabled>
<sysCapSupported>bridge router</sysCapSupported>
<manAddrSubtype>ipv4</manAddrSubtype>
<manAddr>10.137.211.28</manAddr>
<manAddrLen>5</manAddrLen>
<manAddrIfSubtype>ifIndex</manAddrIfSubtype>
<manAddrIfId>3</manAddrIfId>
<manAddrOid>1.3.6.1.4.1.2011.5.25.41.1.2.1.1.1</manAddrOid>
<lldpUpTime>2015-05-02T18:04:22</lldpUpTime>
</lldpSysInformation>
</lldpSys>

Table 3-648 describes elements in responses

Table 3-648 Elements


Element Description

lldpEnable Specifies whether LLDP is globally


enabled.

mdnStatus Specifies whether MDN is globally


enabled.

chassisIdSubtype Specifies the device ID sub-type.

chassisId Specifies the device ID.

sysName Specifies the system name.

sysDesc Specifies the system description.

sysCapEnabled Specifies the enabled system capability.

sysCapSupported Specifies the supported system capability.

manAddrSubtype Specifies the port sub-type of the


management address.

manAddr Specifies the management address.

manAddrLen Specifies the management address length.

manAddrIfSubtype Specifies the port sub-type of the


management address.

manAddrIfId Specifies the port ID of the management


address.

manAddrOid Specifies the OID of the management


address.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 487


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

lldpUpTime Specifies the time when LLDP was


enabled.

Query Global LLDP Configurations


Operation URI Description

GET /lldp/lldpSys/ Query global LLDP


lldpSysParameter configurations.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<lldpSys>
<lldpEnable></lldpEnable>
<mdnStatus></mdnStatus>
<lldpSysParameter>
<messageTxInterval></messageTxInterval>
<messageTxHoldMultiplier></messageTxHoldMultiplier>
<reinitDelay></reinitDelay>
<txDelay></txDelay>
<notificationInterval></notificationInterval>
<notificationEnable></notificationEnable>
<fastMessageCount></fastMessageCount>
<mdnNotificationInterval></mdnNotificationInterval>
<mdnNotificationEnable></mdnNotificationEnable>
<configManAddr></configManAddr>
<bindifName></bindifName>
</lldpSysParameter>
</lldpSys>

Table 3-649 describes elements in requests.

Table 3-649 Elements

Element Description

lldpEnable Specifies whether LLDP is globally


enabled.

mdnStatus Specifies whether MDN is globally


enabled.

messageTxInterval Specifies the interval at which LLDP


messages are sent, in seconds. The
default value is 30.

messageTxHoldMultiplier Specifies the multiplier for the LLDP


message holding time. The default value
is 4.

reinitDelay Specifies the delay after which the LLDP


module of a port is re-enabled, in
seconds. The default value is 2.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 488


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

txDelay Specifies the delay after which LLDP


messages are sent, in seconds. The
default value is 2.

notificationInterval Specifies the suppression time after


which LLDP alarms are sent, in seconds.
The default value is 5.

notificationEnable Specifies whether to enable LLDP


neighbor change alarms.

fastMessageCount Specifies the number of rapidly sent


LLDP messages. The default value is 4.

mdnNotificationInterval Specifies the suppression time after


which MDN alarms are sent, in seconds.
The default value is 5.

mdnNotificationEnable Specifies whether to enable MDN


neighbor change alarms.

configManAddr Specifies the management address of a


device. The management address, which
must actually exist, facilitates network
management.

bindifName Specifies the name of a bound interface.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<lldpSys>
<lldpEnable>enabled</lldpEnable>
<mdnStatus>disabled</mdnStatus>
<lldpSysParameter>
<configManAddr/>
<messageTxInterval>30</messageTxInterval>
<messageTxHoldMultiplier>4</messageTxHoldMultiplier>
<reinitDelay>2</reinitDelay>
<txDelay>2</txDelay>
<notificationInterval>5</notificationInterval>
<notificationEnable>enabled</notificationEnable>
<fastMessageCount>4</fastMessageCount>
<mdnNotificationInterval>5</mdnNotificationInterval>
<mdnNotificationEnable>disabled</mdnNotificationEnable>
<bindifName></bindifName>
</lldpSysParameter>
</lldpSys>

Table 3-650 describes elements in responses.

Table 3-650 Elements


Element Description

lldpEnable Specifies whether LLDP is globally


enabled.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 489


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

mdnStatus Specifies whether MDN is globally


enabled.

messageTxInterval Specifies the interval at which LLDP


messages are sent, in seconds. The
default value is 30.

messageTxHoldMultiplier Specifies the multiplier for the LLDP


message holding time. The default value
is 4.

reinitDelay Specifies the delay after which the LLDP


module of a port is re-enabled, in
seconds. The default value is 2.

txDelay Specifies the delay after which LLDP


messages are sent, in seconds. The
default value is 2.

notificationInterval Specifies the suppression time after


which LLDP alarms are sent, in seconds.
The default value is 5.

notificationEnable Specifies whether to enable LLDP


neighbor change alarms.

fastMessageCount Specifies the number of rapidly sent


LLDP packets. The default value is 4.

mdnNotificationInterval Specifies the suppression time after


which MDN alarms are sent, in seconds.
The default value is 5.

mdnNotificationEnable Specifies whether to enable MDN


neighbor change alarms.

configManAddr Specifies the management address of a


device. The management address, which
must actually exist, facilitates network
management.

bindifName Specifies the name of a bound interface.

Query Global LLDP Statistics


Operation URI Description

GET /lldp/lldpSys/ Query global LLDP


lldpSysStatistics statistics.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 490


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<lldpSys>
<lldpEnable></lldpEnable>
<mdnStatus></mdnStatus>
<lldpSysStatistics>
<remTablesLastChangeTime></remTablesLastChangeTime>
<remTablesInserts></remTablesInserts>
<remTablesDeletes></remTablesDeletes>
<remTablesDrops></remTablesDrops>
<remTablesAgeouts></remTablesAgeouts>
<totalNeighbors></totalNeighbors>
</lldpSysStatistics>
</lldpSys>

Table 3-651 describes elements in requests.

Table 3-651 Elements

Element Description

lldpEnable Specifies whether LLDP is globally


enabled.

mdnStatus Specifies whether MDN is globally


enabled.

remTablesLastChangeTime Specifies the latest time when the LLDP


neighbor table was updated.

remTablesInserts Specifies the number of new LLDP


neighbors.

remTablesDeletes Specifies the number of deleted LLDP


neighbors.

remTablesDrops Specifies the number of dropped LLDP


neighbors.

remTablesAgeouts Specifies the number of aged LLDP


neighbors.

totalNeighbors Specifies the total number of LLDP


neighbors.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<lldpSys>
<lldpEnable>enabled</lldpEnable>
<mdnStatus>disabled</mdnStatus>
<lldpSysStatistics>
<remTablesLastChangeTime>0 days, 0 hours, 0 minutes, 0 seconds</
remTablesLastChangeTime>
<remTablesInserts>0</remTablesInserts>
<remTablesDeletes>0</remTablesDeletes>
<remTablesDrops>0</remTablesDrops>
<remTablesAgeouts>0</remTablesAgeouts>
<totalNeighbors>0</totalNeighbors>
</lldpSysStatistics>
</lldpSys>

Table 3-652 describes elements in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 491


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-652 Elements


Element Description

lldpEnable Specifies whether LLDP is globally


enabled.

mdnStatus Specifies whether MDN is globally


enabled.

remTablesLastChangeTime Specifies the number of new LLDP


neighbors.

remTablesInserts Specifies the number of new LLDP


neighbors.

remTablesDeletes Specifies the number of deleted LLDP


neighbors.

remTablesDrops Specifies the number of dropped LLDP


neighbors

remTablesAgeouts Specifies the number of aged LLDP


neighbors.

totalNeighbors Specifies the total number of LLDP


neighbors.

Query Global LLDP MDN Statistics


PUT URI Description

GET /lldp/lldpSys/ Query global LLDP MDN


mdnSysStatistics statistics.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<lldpSys>
<lldpEnable></lldpEnable>
<mdnStatus></mdnStatus>
<mdnSysStatistics>
<remTablesLastChangeTime></remTablesLastChangeTime>
<remTablesInserts></remTablesInserts>
<remTablesDeletes></remTablesDeletes>
<remTablesDrops></remTablesDrops>
<remTablesAgeouts></remTablesAgeouts>
<totalNeighbors></totalNeighbors>
</mdnSysStatistics>
</lldpSys>

Table 3-653 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 492


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-653 Elements


Element Description

lldpEnable Specifies whether LLDP is globally


enabled.

mdnStatus Specifies whether MDN is globally


enabled.

remTablesLastChangeTime Specifies the latest time when the MDN


neighbor table was updated.

remTablesInserts Specifies the number of new MDN


neighbors.

remTablesDeletes Specifies the number of deleted MDN


neighbors.

remTablesDrops Specifies the number of dropped MDN


neighbors.

remTablesAgeouts Specifies the number of aged MDN


neighbors.

totalNeighbors Specifies the total number of MDN


neighbors.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<lldpSys>
<lldpEnable>enabled</lldpEnable>
<mdnStatus>disabled</mdnStatus>
<mdnSysStatistics>
<remTablesLastChangeTime>0 days, 0 hours, 0 minutes, 0 seconds</
remTablesLastChangeTime>
<remTablesInserts>0</remTablesInserts>
<remTablesDeletes>0</remTablesDeletes>
<remTablesDrops>0</remTablesDrops>
<remTablesAgeouts>0</remTablesAgeouts>
<totalNeighbors>0</totalNeighbors>
</mdnSysStatistics>
</lldpSys>

Table 3-654 describes elements in responses.

Table 3-654 Elements


Element Description

lldpEnable Specifies whether LLDP is globally


enabled.

mdnStatus Specifies whether MDN is globally


enabled.

remTablesLastChangeTime Specifies the latest time when the MDN


neighbor table was updated.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 493


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

remTablesInserts Specifies the number of new MDN


neighbors.

remTablesDeletes Specifies the number of deleted MDN


neighbors.

remTablesDrops Specifies the number of dropped MDN


neighbors.

remTablesAgeouts Specifies the number of aged MDN


neighbors.

totalNeighbors Specifies the total number of LLDP


neighbors.

Modify Global LLDP Attributes


Operation URI Description

PUT /lldp/lldpSys/ Modify global LLDP


lldpSysParameter attributes.

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<lldpSys>
<lldpSysParameter>
<messageTxInterval>30</messageTxInterval>
</lldpSysParameter>
</lldpSys>

Table 3-655 scribes elements in requests.

Table 3-655 Elements


Element Description

messageTxInterval Specifies the interval at which LLDP


messages are sent, in seconds. The value
ranges from 5 to 32768. The default value
is 30.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-656 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 494


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-656 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.22.2 Configure an LLDP Interface


Query LLDP Interface Configurations
Operation URI Description

GET /lldp/lldpInterfaces/ Query LLDP interface


lldpInterface configurations.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<lldpInterface>
<ifName>10GE1/0/1</ifName>
<lldpAdminStatus></lldpAdminStatus>
</lldpInterface>

Table 3-657 describes elements in requests.

Table 3-657 Elements


Element Description

lldpAdminStatus Specifies the LLDP status.

ifName Specifies an interface name.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<data>
<lldp xmlns="http://www.huawei.com/netconf/vrp" format-version="1.0"
content-version="1.0">
<lldpInterfaces>
<lldpInterface>
<ifName>10GE1/0/1</ifName>
<lldpAdminStatus>txAndRx</lldpAdminStatus>
</lldpInterface>
</lldpInterfaces>
</lldp>
</data>
</rpc-reply>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 495


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-658 describes elements in responses.

Table 3-658 Elements

Element Description

lldpAdminStatus Specifies the LLDP status.

ifName Specifies an interface name.

Modify LLDP Interface Configurations


Operation URI Description

PUT /lldp/lldpInterfaces/ Modify LLDP interface


lldpInterface configurations.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<lldpInterface operation="merge">
<ifName>10GE1/0/1</ifName>
<lldpAdminStatus>txAndRx</lldpAdminStatus>
<tlvTxEnable>
<manAddrTxEnable>true</manAddrTxEnable>
<portDescTxEnable>true</portDescTxEnable>
<sysCapTxEnable>true</sysCapTxEnable>
<sysDescTxEnable>true</sysDescTxEnable>
<sysNameTxEnable>true</sysNameTxEnable>
<portVlanTxEnable>true</portVlanTxEnable>
<protoVlanTxEnable>true</protoVlanTxEnable>
<vlanNameTxEnable>true</vlanNameTxEnable>
<macPhyTxEnable>true</macPhyTxEnable>
<linkAggreTxEnable>true</linkAggreTxEnable>
<maxFrameTxEnable>true</maxFrameTxEnable>
</tlvTxEnable>
</lldpInterface>

Table 3-659 describes elements in requests.

Table 3-659 Elements

Element Description

ifName Specifies an interface name.

lldpAdminStatus Specifies the LLDP status.

manAddrTxEnable Enables or disables advertisement of the


Management Address TLV.

portDescTxEnable Enables or disables advertisement of the


Port Description TLV.

sysCapTxEnable Enables or disables advertisement of the


System Capability TLV.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 496


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

sysDescTxEnable Enables or disables advertisement of the


System Description TLV.

sysNameTxEnable Enables or disables advertisement of the


System Name TLV.

portVlanTxEnable Enables or disables advertisement of the


PVID TLV.

protoVlanTxEnable Enables or disables advertisement of the


Protocol VLAN TLV.

vlanNameTxEnable Enables or disables advertisement of the


VLAN Name TLV.

macPhyTxEnable Enables or disables advertisement of the


MAC/PHY TLV.

linkAggreTxEnable Enables or disables advertisement of the


link aggregation TLV.

maxFrameTxEnable Enables or disables advertisement of the


Maximum Frame TLV.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<ok/>
</rpc-reply>

Table 3-660 describes status codes in responses.

Table 3-660 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Query LLDP Interface Packet Statistics


Operation URI Description

GET /lldp/lldpInterfaces/ Query LLDP interface


lldpInterface/lldpStatistics packet statistics.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 497


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<lldpStatistics>
<totalNeighbors></totalNeighbors>
<transmittedFrames></transmittedFrames>
<receivedFrames></receivedFrames>
<discardedFrames></discardedFrames>
<errorFrames></errorFrames>
<discardedTlvs></discardedTlvs>
<unrecognizedTlvs></unrecognizedTlvs>
<expiredNeighbors></expiredNeighbors>
<transmittedDcbxTlvs></transmittedDcbxTlvs>
<receivedDcbxTlvs></receivedDcbxTlvs>
<lastClearedTime></lastClearedTime>
</lldpStatistics>

Table 3-661 describes elements in requests.

Table 3-661 Elements


Element Description

transmittedFrames Specifies the number of LLDP packets


sent.

receivedFrames Specifies the number of LLDP packets


received.

discardedFrames Specifies the number of LLDP packets


discarded.

errorFrames Specifies the number of error LLDP


packets received.

discardedTlvs Specifies the number of LLDP TLVs


discarded.

unrecognizedTlvs Specifies the number of unrecognized


TLVs received.

expiredNeighbors Specifies the number of aged LLDP


neighbors.

transmittedDcbxTlvs Specifies the number of DCBX TLVs


sent.

receivedDcbxTlvs Specifies the number of DCBX TLVs.


received

totalNeighbors Specifies the total number of LLDP


neighbors.

lastClearedTime Specifies the time when LLDP statistics


were last cleared.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 498


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<data>
<lldp xmlns="http://www.huawei.com/netconf/vrp" format-version="1.0"
content-version="1.0">
<lldpInterfaces>
<lldpInterface>
<ifName>10GE1/0/1</ifName>
<lldpStatistics>
<transmittedFrames>201</transmittedFrames>
<receivedFrames>198</receivedFrames>
<discardedFrames>0</discardedFrames>
<errorFrames>0</errorFrames>
<discardedTlvs>0</discardedTlvs>
<unrecognizedTlvs>0</unrecognizedTlvs>
<expiredNeighbors>0</expiredNeighbors>
<transmittedDcbxTlvs>0</transmittedDcbxTlvs>
<receivedDcbxTlvs>0</receivedDcbxTlvs>
<totalNeighbors>1</totalNeighbors>
<lastClearedTime>1970-01-01T00:00:00</lastClearedTime>
</lldpStatistics>
</lldpInterface>
</lldpInterfaces>
</lldp>
</data>
</rpc-reply>

Table 3-662 describes elements in responses.

Table 3-662 Elements


Element Description

ifName Specifies an interface name.

transmittedFrames Specifies the number of LLDP packets


sent.

receivedFrames Specifies the number of LLDP packets


received.

discardedFrames Specifies the number of LLDP packets


discarded.

errorFrames Specifies the number of error LLDP


packets received.

discardedTlvs Specifies the number of LLDP TLVs


discarded.

unrecognizedTlvs Specifies the number of unrecognized


TLVs received.

expiredNeighbors Specifies the number of aged LLDP


neighbors.

transmittedDcbxTlvs Specifies the number of DCBX TLVs


sent.

receivedDcbxTlvs Specifies the number of DCBX TLVs.


received

totalNeighbors Specifies the total number of LLDP


neighbors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 499


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

lastClearedTime Specifies the time when LLDP statistics


were last cleared.

Query LLDP Neighbor Configurations


Operation URI Description

GET /lldp/lldpInterfaces/ Query LLDP neighbor


lldpInterface/lldpNeighbors/ configurations.
lldpNeighbor

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<lldpNeighbor>
<nbIndex></nbIndex>
<chassisIdSubtype></chassisIdSubtype>
<chassisId></chassisId>
<portIdSubtype></portIdSubtype>
<portId></portId>
<portDescription></portDescription>
<systemName></systemName>
<systemDescription></systemDescription>
<systemCapabilitiesEnabled></systemCapabilitiesEnabled>
<systemCapabilitiesSupported></systemCapabilitiesSupported>
<expiredTime></expiredTime>
<portVlanId></portVlanId>
<protocolIdentity></protocolIdentity>
<autoNegSupported></autoNegSupported>
<autoNegEnabled></autoNegEnabled>
<autoNegAdvertisedCap></autoNegAdvertisedCap>
<operMauType></operMauType>
<linkAggregationSupported></linkAggregationSupported>
<linkAggregationEnabled></linkAggregationEnabled>
<aggregationPortId></aggregationPortId>
<maximumFrameSize></maximumFrameSize>
<discoveredTime></discoveredTime>
</lldpNeighbor>

Table 3-663 describes elements in requests.

Table 3-663 Elements

Element Description

nbIndex Specifies a neighbor index.

chassisIdSubtype Specifies a neighbor device ID type.

chassisId Specifies a neighbor device ID.

portIdSubtype Specifies a port ID type.

portId Specifies a port ID.

portDescription Specifies a port description.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 500


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

systemName Specifies the system name.

systemDescription Specifies the system description.

systemCapabilitiesEnabled Specifies the supported system capability.

systemCapabilitiesSupported Specifies the enabled system capability.

expiredTime Specifies a neighbor aging time.

portVlanId Specifies a port VLAN ID.

protocolIdentity Specifies the protocol supported.

autoNegSupported Indicates whether autonegotiation is


supported on a port.

autoNegEnabled Indicates whether autonegotiation is


enabled on a port.

autoNegAdvertisedCap Specifies the autonegotiation capability.

operMauType Specifies an MAU type.

linkAggregationSupported Indicates whether link aggregation is


supported on a port.

linkAggregationEnabled Indicates whether link aggregation is


enabled on a port.

aggregationPortId Specifies a link aggregation port ID. The


value is 0 if link aggregation is disabled.

maximumFrameSize Specifies the maximum frame size


supported.

discoveredTime Specifies the time when a neighbor was


discovered.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<data>
<lldp xmlns="http://www.huawei.com/netconf/vrp" format-version="1.0"
content-version="1.0">
<lldpInterfaces>
<lldpInterface>
<ifName>10GE1/0/1</ifName>
<lldpNeighbors>
<lldpNeighbor>
<nbIndex>1</nbIndex>
<chassisIdSubtype>macAddress</chassisIdSubtype>
<chassisId>0000-0105-0961</chassisId>
<portIdSubtype>interfaceName</portIdSubtype>
<portId>10GE1/0/10</portId>
<portDescription></portDescription>
<systemName>39.5_fanyadong</systemName>
<systemDescription>Huawei Versatile Routing Platform
Software&#13;

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 501


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

VRP (R) software, Version 8.180 (CE6810EI V200R005C00)&#13;


Copyright (C) 2012-2018 Huawei Technologies Co., Ltd.&#13;
HUAWEI CE6810-48S4Q-EI&#13;
</systemDescription>
<systemCapabilitiesEnabled>bridge router</
systemCapabilitiesEnabled>
<systemCapabilitiesSupported>bridge router</
systemCapabilitiesSupported>
<expiredTime>105</expiredTime>
<portVlanId>1</portVlanId>
<autoNegSupported>No</autoNegSupported>
<autoNegEnabled>No</autoNegEnabled>
<autoNegAdvertisedCap>0000</autoNegAdvertisedCap>
<operMauType>dot3MauType10GigBaseX</operMauType>
<linkAggregationSupported>Yes</linkAggregationSupported>
<linkAggregationEnabled>No</linkAggregationEnabled>
<aggregationPortId>0</aggregationPortId>
<maximumFrameSize>9216</maximumFrameSize>
<discoveredTime>2016-08-18T19:50:20</discoveredTime>
<protocolIdentity></protocolIdentity>
</lldpNeighbor>
</lldpNeighbors>
</lldpInterface>
</lldpInterfaces>
</lldp>
</data>
</rpc-reply>

Table 3-664 describes elements in responses.

Table 3-664 Elements

Element Description

nbIndex Specifies a neighbor index.

ifName Specifies an interface name.

chassisIdSubtype Specifies a neighbor device ID type.

chassisId Specifies a neighbor device ID.

portIdSubtype Specifies a port ID type.

portId Specifies a port ID.

portDescription Specifies a port description.

systemName Specifies the system name.

systemDescription Specifies the system description.

systemCapabilitiesEnabled Specifies the supported system capability.

systemCapabilitiesSupported Specifies the enabled system capability.

expiredTime Specifies a neighbor aging time.

portVlanId Specifies a port VLAN ID.

protocolIdentity Specifies the protocol supported.

autoNegSupported Indicates whether autonegotiation is


supported.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 502


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

autoNegEnabled Indicates whether autonegotiation is


enabled.

autoNegAdvertisedCap Specifies the autonegotiation capability.

operMauType Specifies an MAU type.

linkAggregationSupported Indicates whether a port supports link


aggregation.

linkAggregationEnabled Indicates whether link aggregation is


enabled on a port.

aggregationPortId Specifies a link aggregation port ID. The


value is 0 if link aggregation is disabled.

maximumFrameSize Specifies the maximum frame size


supported.

discoveredTime Specifies the time when a neighbor was


discovered.

Query the Neighbor Management Address of an LLDP Interface


Operation URI Description

GET /lldp/lldpInterfaces/ Query the neighbor


lldpInterface/lldpNeighbors/ management address of an
lldpNeighbor/ LLDP interface.
managementAddresss/
managementAddress

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<managementAddress>
<manAddrSubtype></manAddrSubtype>
<manAddr></manAddr>
<manAddrLen></manAddrLen>
<manAddrIfSubtype></manAddrIfSubtype>
<manAddrIfId></manAddrIfId>
<manAddrOid></manAddrOid>
</managementAddress>

Table 3-665 describes elements in requests.

Table 3-665 Elements


Element Description

manAddrSubtype Specifies a management address type.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 503


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

manAddr Specifies a neighbor management


address.

manAddrLen Specifies the length of the neighbor


management address.

manAddrIfSubtype Specifies the interface type of the


neighbor management address.

manAddrIfId Specifies the interface ID of the neighbor


management address.

manAddrOid Specifies the OID of the neighbor


management address.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<data>
<lldp xmlns="http://www.huawei.com/netconf/vrp" format-version="1.0"
content-version="1.0">
<lldpInterfaces>
<lldpInterface>
<ifName>10GE1/0/1</ifName>
<lldpNeighbors>
<lldpNeighbor>
<nbIndex>1</nbIndex>
<managementAddresss>
<managementAddress>
<manAddrSubtype>ipv4</manAddrSubtype>
<manAddr>2.2.2.2</manAddr>
<manAddrLen>5</manAddrLen>
<manAddrIfSubtype>ifIndex</manAddrIfSubtype>
<manAddrIfId>81</manAddrIfId>
<manAddrOid>1.3.6.1.4.1.2011.5.25.41.1.2.1.1.1</manAddrOid>
</managementAddress>
</managementAddresss>
</lldpNeighbor>
</lldpNeighbors>
</lldpInterface>
</lldpInterfaces>
</lldp>
</data>
</rpc-reply>

Table 3-666 describes status codes in responses.

Table 3-666 Elements

Element Description

nbIndex Specifies a neighbor index.

ifName Specifies an interface name.

manAddrSubtype Specifies a management address type.

manAddr Specifies a neighbor management


address.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 504


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

manAddrLen Specifies the length of the neighbor


management address.

manAddrIfSubtype Specifies the interface type of the


neighbor management address.

manAddrIfId Specifies the interface ID of the neighbor


management address.

manAddrOid Specifies the OID of the neighbor


management address.

Query Protocol VLAN Information About an LLDP Interface Neighbor


Operation URI Description

GET /lldp/lldpInterfaces/ Query protocol VLAN


lldpInterface/lldpNeighbors/ information about an LLDP
lldpNeighbor/protoVlans/ interface neighbor.
protoVlan

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<protoVlan>
<protoVlanSupported></protoVlanSupported>
<protoVlanEnabled></protoVlanEnabled>
<protoVlanId></protoVlanId>
</protoVlan>

Table 3-667 describes elements in requests.

Table 3-667 Elements


Element Description

protoVlanSupported Indicates whether protocol VLAN is


supported on a port.

protoVlanEnabled Indicates whether protocol VLAN is


enabled on a port.

protoVlanId Specifies a protocol VLAN ID.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<data>
<lldp xmlns="http://www.huawei.com/netconf/vrp" format-version="1.0"
content-version="1.0">
<lldpInterfaces>
<lldpInterface>
<ifName>10GE1/0/1</ifName>
<lldpNeighbors>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 505


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<lldpNeighbor>
<nbIndex>1</nbIndex>
<protoVlans>
<protoVlan>
<protoVlanId>0</protoVlanId>
<protoVlanSupported>No</protoVlanSupported>
<protoVlanEnabled>No</protoVlanEnabled>
</protoVlan>
</protoVlans>
</lldpNeighbor>
</lldpNeighbors>
</lldpInterface>
</lldpInterfaces>
</lldp>
</data>
</rpc-reply>

Table 3-668describes elements in responses.

Table 3-668 Elements


Element Description

nbIndex Specifies a neighbor index.

ifName Specifies an interface name.

protoVlanSupported Indicates whether protocol VLAN is


supported on a port.

protoVlanEnabled Indicates whether protocol VLAN is


enabled on a port.

protoVlanId Protocol VLAN

Query Unidentifiable Basic TLV Information About an LLDP Interface Neighbor


Operation URI Description

GET /lldp/lldpInterfaces/ Query unidentifiable basic


lldpInterface/lldpNeighbors/ TLV information about an
lldpNeighbor/unknownTlvs/ LLDP interface neighbor.
unknownTlv

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<unknownTlv>
<unknownTlvType></unknownTlvType>
<unknownTlvInfo></unknownTlvInfo>
</unknownTlv>

Table 3-669 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 506


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-669 Elements


Element Description

unknownTlvType Specifies an unidentifiable TLV type.

unknownTlvInfo Specifies unidentifiable TLV information.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<data>
<lldp xmlns="http://www.huawei.com/netconf/vrp" format-version="1.0"
content-version="1.0">
<lldpInterfaces>
<lldpInterface>
<ifName>10GE1/0/1</ifName>
<lldpNeighbors>
<lldpNeighbor>
<nbIndex>1</nbIndex>
<unknownTlvs>
<unknownTlv>
<unknownTlvType>16</unknownTlvType>
<unknownTlvInfo>07 06 38 4b 7e 11 11 10 01 00 00 00 00 00</
unknownTlvInfo>
</unknownTlv>
</unknownTlvs>
</lldpNeighbor>
</lldpNeighbors>
</lldpInterface>
</lldpInterfaces>
</lldp>
</data>
</rpc-reply>

Table 3-670 describes elements in responses

Table 3-670 Elements


Element Description

nbIndex Specifies a neighbor index.

ifName Specifies an interface name.

unknownTlvType Specifies an unidentifiable TLV type.

unknownTlvInfo Specifies unidentifiable TLV information.

Query Unidentifiable Organization-defined TLV Information About an LLDP


Interface Neighbor
Operation URI Description

GET /lldp/lldpInterfaces/ Query unidentifiable


lldpInterface/lldpNeighbors/ organization-defined TLV
lldpNeighbor/ information about an LLDP
unknownOrgDefTlvs/ interface neighbor.
unknownOrgDefTlv

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 507


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<unknownOrgDefTlv>
<unknownOrgDefInfoOui></unknownOrgDefInfoOui>
<unknownOrgDefSubtype></unknownOrgDefSubtype>
<unknownOrgDefInfoIndex></unknownOrgDefInfoIndex>
<unknownOrgDefInfo></unknownOrgDefInfo>
</unknownOrgDefTlv>

Table 3-671 describes elements in requests.

Table 3-671 Elements


Element Description

unknownOrgDefInfoOui Specifies the OUI of an unidentifiable


organization-defined TLV.

unknownOrgDefInfoIndex Specifies the index of an unidentifiable


organization-defined TLV.

unknownOrgDefSubtype Specifies the type of an unidentifiable


organization-defined TLV.

unknownOrgDefInfo Specifies information about an


unidentifiable organization-defined TLV.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<data>
<lldp xmlns="http://www.huawei.com/netconf/vrp" format-version="1.0"
content-version="1.0">
<lldpInterfaces>
<lldpInterface>
<ifName>10GE1/0/1</ifName>
<lldpNeighbors>
<lldpNeighbor>
<nbIndex>1</nbIndex>
<unknownOrgDefTlvs>
<unknownOrgDefTlv>
<unknownOrgDefInfoOui>60-31-32</unknownOrgDefInfoOui>
<unknownOrgDefSubtype>51</unknownOrgDefSubtype>
<unknownOrgDefInfoIndex>1</unknownOrgDefInfoIndex>
<unknownOrgDefInfo>34 35 36 37 38 39 30 2d 3d 7e 21 40 23
24 25 5e 26 2a 28 29 5f 2b 31 30 2e 31 33 38 2e 38 31 2e 31 37 34 3b 68 74 74
70 3a 2f 2f 68 75 61 77 65 69 2e 77 33 2e 63 6f 6d 60 31 32 33 34 35 36 37 38
39 30 2d 3d 7e 21 40 23 24 25 5e 26 2a 28 29 5f 2b 31 30 2e 31 33 38 2e 38 31
2e 31 37 34 3b 68 74 74 70 3a 2f 2f 68 75 61 77 65 69 2e 77 33 2e 63 6f 6d 60
31 32 33 34 35 36 37 38 39 30 2d 3d 7e 21 40 23 24 25 5e 26 2a 28 29 5f 2b 31
30 2e 31 33 38 2e 38 31 2e 31 37 34 3b 68 74 74 70 3a 2f 2f 68 75 61 77 65 69
2e 77 33 2e 63 6f 6d 60 31 32 33 34 35 36 37 38 39 30 2d 3d 7e 21 40 23 24 25
5e 26 2a 28 29 5f 2b 31 30 2e 31 33 38 2e 38 31 2e 31 37 34 3b 68 74 74 70 3a
2f 2f 68 75 61 77 65 69 2e 77 33 2e 63 6f 6d 6c 61 60 31 32 33 34 35 6c 61 60
31 32 33 34</unknownOrgDefInfo>
</unknownOrgDefTlv>
</unknownOrgDefTlvs>
</lldpNeighbor>
</lldpNeighbors>
</lldpInterface>
</lldpInterfaces>
</lldp>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 508


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

</data>
</rpc-reply>

Table 3-672 describes elements in responses.

Table 3-672 Elements


Element Description

nbIndex Specifies a neighbor index.

ifName Specifies an interface name.

unknownOrgDefInfoOui Specifies the OUI of an unidentifiable


organization-defined TLV.

unknownOrgDefInfoIndex Specifies the index of an unidentifiable


organization-defined TLV.

unknownOrgDefSubtype Specifies the type of an unidentifiable


organization-defined TLV.

unknownOrgDefInfo Specifies information about an


unidentifiable organization-defined TLV.

Query the VLAN Name of an LLDP Interface Neighbor


Operation URI Description

GET /lldp/lldpInterfaces/ Query the VLAN name of


lldpInterface/lldpNeighbors/ an LLDP interface neighbor.
lldpNeighbor/vlanNames/
vlanName

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vlanName>
<vlanNameId></vlanNameId>
<vlanName></vlanName>
</vlanName>

Table 3-673 describes elements in requests.

Table 3-673 Elements


Element Description

vlanNameId Specifies a VLAN ID.

vlanName Specifies a VLAN name.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<data>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 509


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<lldp xmlns="http://www.huawei.com/netconf/vrp" format-version="1.0"


content-version="1.0">
<lldpInterfaces>
<lldpInterface>
<ifName>10GE1/0/1</ifName>
<lldpNeighbors>
<lldpNeighbor>
<nbIndex>1</nbIndex>
<vlanNames>
<vlanName>
<vlanNameId>2</vlanNameId>
<vlanName>vlan1</vlanName>
</vlanName>
</vlanNames>
</lldpNeighbor>
</lldpNeighbors>
</lldpInterface>
</lldpInterfaces>
</lldp>
</data>
</rpc-reply>

Table 3-674 describes elements in responses.

Table 3-674 Elements


Element Description

nbIndex Specifies a neighbor index.

ifName Specifies an interface name.

vlanNameId Specifies a VLAN ID.

vlanName Specifies a VLAN name.

Query Error Packet Information on an LLDP Interface


Operation URI Description

GET /lldp/lldpInterfaces/ Query error packet


lldpInterface/lldpErrPkt information on an LLDP
interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<lldpErrPkt>
<errPktRecvTime></errPktRecvTime>
<errPktInfo></errPktInfo>
</lldpErrPkt>

Table 3-675 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 510


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-675 Elements


Element Description

errPktRecvTime Specifies the time when error packets


were received.

errPktInfo Specifies the error LLDP packet content.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<data>
<lldp xmlns="http://www.huawei.com/netconf/vrp" format-version="1.0"
content-version="1.0">
<lldpInterfaces>
<lldpInterface>
<ifName>10GE1/0/1</ifName>
<lldpErrPkt>
<errPktRecvTime>2016-08-18T19:50:20</errPktRecvTime>
<errPktInfo>0180c200 000e485c 8f222221 88cc0207
04485c8f 22222104 0e054574 6865726e 6574332f 302f3006
02000508 ff603132 33343536 37383930 2d3d7e21 40232425
5e262a28 295f2b31 302e3133 382e3831 2e313734 3b687474
703a2f2f 68756177 65692e77 332e636f 6d603132 33343536
37383930 2d3d7e21 40232425 5e262a28 295f2b31 302e3133
382e3831 2e313734 3b687474 703a2f2f 68756177 65692e77
332e636f 6d603132 33343536 37383930 2d3d7e21 40232425
5e262a28 295f2b31 302e3133 382e3831 2e313734 3b687474
703a2f2f 68756177 65692e77 332e636f 6d603132 33343536
37383930 2d3d7e21 40232425 5e262a28 295f2b31 302e3133
382e3831 2e313734 3b687474 703a2f2f 68756177 65692e77
332e636f 6d6c6160 31323334 356c6160 31323334 0aff6874
74703a2f 2f687561 7765692e 77332e63 6f6d3132 33343536
37383930 31323334 35363738 39307e21 40232425 5e262a28
295f2b51 57455254 5955494f 507b7d7c 41534446 47484a4b
4c3a223e 3c4d4e42 5643585a 71776572 74797569 6f705b5d
5c617364 6667686a 6b6c3b27 2f2e2c6d 6e627663 787a6874
74703a2f 2f687561 7765692e 77332e63 6f6d3132 33343536
37383930 31323334 35363738 39307e21 40232425 5e262a28
295f2b51 57455254 5955494f 507b7d7c 41534446 47484a4b
4c3a223e 3c4d4e42 5643585a 71776572 74797569 6f705b5d
5c617364 6667686a 6b6c3b27 2f2e2c6d 6e627663 787a6c61
6c616161 68747470 3a2f2f68 750c3456 52502028 52292073
6f667477 6172652c 20566572 73696f6e 20382e33 30202856
52502056 38303052 30303543 30304230 3236290e 04007f00
7f100e07 06384b7e 11111001 00000000 00fe0600 80c201ff
fffe0700 80c20206 000afe27 0080c203 0ffe207e 21402324
255e262a 28295f2b 51574552 54595549 4f507b7d 7c415344
46477efe 0900120f 01030000 0000fe09 00120f03 030000ff
fffe0600 120f04ff ff0000</errPktInfo>
</lldpErrPkt>
</lldpInterface>
</lldpInterfaces>
</lldp>
</data>
</rpc-reply>

Table 3-676 describes elements in responses.

Table 3-676 Elements


Element Description

ifName Specifies an interface name.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 511


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

errPktRecvTime Specifies the time when error packets


were received.

errPktInfo Specifies the error LLDP packet content.

Query LLDP Interface Information


Operation URI Description

GET /lldp/lldpInterfaces/ Query LLDP interface


lldpInterface/ information.
lldpIfInformation

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<lldpIfInformation>
<portIdSubtype></portIdSubtype>
<portId></portId>
<portDescription></portDescription>
<portVlanId></portVlanId>
<protoVlanSupported></protoVlanSupported>
<protoVlanEnabled></protoVlanEnabled>
<protoVlanId></protoVlanId>
<vlanNameId></vlanNameId>
<vlanName></vlanName>
<protocolIdentity></protocolIdentity>
<autoNegSupported></autoNegSupported>
<autoNegEnabled></autoNegEnabled>
<autoNegAdvertisedCap></autoNegAdvertisedCap>
<operMauType></operMauType>
<linkAggregationSupported></linkAggregationSupported>
<linkAggregationEnabled></linkAggregationEnabled>
<aggregationPortId></aggregationPortId>
<maximumFrameSize></maximumFrameSize>
</lldpIfInformation>

Table 3-677 describes elements in requests.

Table 3-677 Elements


Element Description

portIdSubtype Specifies a port ID type.

portId Port ID.

portDescription Specifies a port description.

portVlanId Specifies a port VLAN ID.

protoVlanSupported Indicates whether protocol VLAN is


supported on a port.

protoVlanEnabled Indicates whether protocol VLAN is


enabled on a port.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 512


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

protoVlanId Specifies a protocol VLAN ID.

vlanNameId Specifies a VLAN ID.

vlanName Specifies a VLAN name.

protocolIdentity Specifies the protocol supported.

autoNegSupported Indicates whether autonegotiation is


supported on a port.

autoNegEnabled Indicates whether autonegotiation is


enabled on a port.

autoNegAdvertisedCap Specifies the autonegotiation capability.

operMauType Specifies an MAU type.

linkAggregationSupported Indicates whether link aggregation is


supported on a port.

linkAggregationEnabled Indicates whether link aggregation is


enabled on a port.

aggregationPortId Specifies a link aggregation port ID. The


value is 0 if link aggregation is disabled.

maximumFrameSize Specifies the maximum frame size


supported.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<data>
<lldp xmlns="http://www.huawei.com/netconf/vrp" format-version="1.0"
content-version="1.0">
<lldpInterfaces>
<lldpInterface>
<ifName>10GE1/0/1</ifName>
<lldpIfInformation>
<portIdSubtype>interfaceName</portIdSubtype>
<portId>10GE</portId>
<portDescription></portDescription>
<portVlanId>1</portVlanId>
<protoVlanSupported>No</protoVlanSupported>
<protoVlanEnabled>No</protoVlanEnabled>
<protoVlanId>0</protoVlanId>
<vlanNameId>1</vlanNameId>
<vlanName>VLAN1</vlanName>
<autoNegSupported>Yes</autoNegSupported>
<autoNegEnabled>Yes</autoNegEnabled>
<autoNegAdvertisedCap>83a0(100baseTXFD 100baseT2FD FdxPause
FdxAPause 1000baseTFD)</autoNegAdvertisedCap>
<operMauType>dot3MauType1000BaseXFD</operMauType>
<linkAggregationSupported>Yes</linkAggregationSupported>
<linkAggregationEnabled>Yes</linkAggregationEnabled>
<aggregationPortId>2</aggregationPortId>
<maximumFrameSize>9216</maximumFrameSize>
<protocolIdentity>STP RSTP/MSTP LACP</protocolIdentity>
</lldpIfInformation>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 513


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

</lldpInterface>
</lldpInterfaces>
</lldp>
</data>
</rpc-reply>

Table 3-678 describes elements in responses.

Table 3-678 Elements


Element Description

ifName Specifies an interface name.

portIdSubtype Specifies a port ID type.

portId Port ID.

portDescription Specifies a port description.

portVlanId Specifies a port VLAN ID.

protoVlanSupported Indicates whether protocol VLAN is


supported on a port.

protoVlanEnabled Indicates whether protocol VLAN is


enabled on a port.

protoVlanId Specifies a protocol VLAN ID.

vlanNameId Specifies a VLAN ID.

vlanName Specifies a VLAN name.

protocolIdentity Specifies the protocol supported.

autoNegSupported Indicates whether autonegotiation is


supported on a port.

autoNegEnabled Indicates whether autonegotiation is


enabled on a port.

autoNegAdvertisedCap Specifies the autonegotiation capability.

operMauType Specifies an MAU type.

linkAggregationSupported Indicates whether link aggregation is


supported on a port.

linkAggregationEnabled Indicates whether link aggregation is


enabled on a port.

aggregationPortId Specifies a link aggregation port ID. The


value is 0 if link aggregation is disabled.

maximumFrameSize Specifies the maximum frame size


supported.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 514


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Query LLDP TLV Configuration


Operation URI Description

GET /lldp/lldpInterfaces/ Query LLDP TLV


lldpInterface/tlvTxEnable configuration.

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<tlvTxEnable>
<manAddrTxEnable></manAddrTxEnable>
<portDescTxEnable></portDescTxEnable>
<sysCapTxEnable></sysCapTxEnable>
<sysDescTxEnable></sysDescTxEnable>
<sysNameTxEnable></sysNameTxEnable>
<portVlanTxEnable></portVlanTxEnable>
<protoVlanTxEnable></protoVlanTxEnable>
<txProtocolVlanId></txProtocolVlanId>
<vlanNameTxEnable></vlanNameTxEnable>
<txVlanNameId></txVlanNameId>
<protoIdTxEnable></protoIdTxEnable>
<macPhyTxEnable></macPhyTxEnable>
<linkAggreTxEnable></linkAggreTxEnable>
<maxFrameTxEnable></maxFrameTxEnable>
</tlvTxEnable>

Table 3-679 describes elements in requests.

Table 3-679 Elements


Element Description

manAddrTxEnable Enables or disables advertisement of the


Management Address TLV.

portDescTxEnable Enables or disables advertisement of the


Port Description TLV.

sysCapTxEnable Enables or disables advertisement of the


System Capability TLV.

sysDescTxEnable Enables or disables advertisement of the


System Description TLV.

sysNameTxEnable Enables or disables advertisement of the


System Name TLV.

portVlanTxEnable Enables or disables advertisement of the


PVID TLV.

protoVlanTxEnable Enables or disables advertisement of the


Protocol VLAN TLV.

txProtocolVlanId Specifies a protocol VLAN ID.

vlanNameTxEnable Enables or disables advertisement of the


VLAN Name TLV.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 515


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

txVlanNameId Specifies the VLAN ID of the VLAN


Name TLV.

protoIdTxEnable Enables or disables advertisement of the


Protocol Identity TLV.

macPhyTxEnable Enables or disables advertisement of the


MAC/PHY TLV.

linkAggreTxEnable Enables or disables advertisement of the


link aggregation TLV.

maxFrameTxEnable Enables or disables advertisement of the


Maximum Frame TLV.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<data>
<lldp xmlns="http://www.huawei.com/netconf/vrp" format-version="1.0"
content-version="1.0">
<lldpInterfaces>
<lldpInterface>
<ifName>10GE1/0/1</ifName>
<tlvTxEnable>
<portDescTxEnable>true</portDescTxEnable>
<sysNameTxEnable>true</sysNameTxEnable>
<sysDescTxEnable>true</sysDescTxEnable>
<sysCapTxEnable>true</sysCapTxEnable>
<manAddrTxEnable>true</manAddrTxEnable>
<portVlanTxEnable>true</portVlanTxEnable>
<vlanNameTxEnable>true</vlanNameTxEnable>
<protoVlanTxEnable>true</protoVlanTxEnable>
<macPhyTxEnable>true</macPhyTxEnable>
<linkAggreTxEnable>true</linkAggreTxEnable>
<maxFrameTxEnable>true</maxFrameTxEnable>
<txVlanNameId/>
<txProtocolVlanId/>
<protoIdTxEnable>false</protoIdTxEnable>
</tlvTxEnable>
</lldpInterface>
</lldpInterfaces>
</lldp>
</data>
</rpc-reply>

Table 3-680 describes elements in responses.

Table 3-680 Elements

Element Description

ifName Specifies an interface name.

manAddrTxEnable Enables or disables advertisement of the


Management Address TLV.

portDescTxEnable Enables or disables advertisement of the


Port Description TLV.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 516


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

sysCapTxEnable Enables or disables advertisement of the


System Capability TLV.

sysDescTxEnable Enables or disables advertisement of the


System Description TLV.

sysNameTxEnable Enables or disables advertisement of the


System Name TLV.

portVlanTxEnable Enables or disables advertisement of the


PVID TLV.

protoVlanTxEnable Enables or disables advertisement of the


Protocol VLAN TLV.

txProtocolVlanId Specifies a protocol VLAN ID.

vlanNameTxEnable Enables or disables advertisement of the


VLAN Name TLV.

txVlanNameId Specifies the VLAN ID of the VLAN


Name TLV.

protoIdTxEnable Enables or disables advertisement of the


Protocol Identity TLV.

macPhyTxEnable Enables or disables advertisement of the


MAC/PHY TLV.

linkAggreTxEnable Enables or disables advertisement of the


link aggregation TLV.

maxFrameTxEnable Enables or disables advertisement of the


Maximum Frame TLV.

3.22.3 Configuring MDN on an LLDP Interface


Querying MDN Configurations
Operation URI Description

GET /lldp/mdnInterfaces/ Queries MDN


mdnInterface configurations.

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<mdnInterface>
<ifName>10GE1/0/1</ifName>
<mdnStatus></mdnStatus>
</mdnInterface>

Table 3-681 shows the description of elements in request.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 517


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-681 Description of elements in request


Element Description

ifName Interface name.

mdnStatus MDN status.

l Response example (XML format):


<?xml version="1.0" encoding="UTF-8"?>
<mdnInterface>
<mdnStatus>default</mdnStatus>
<ifName>10GE1/0/1</ifName>
</mdnInterface>

Table 3-682 shows the description of elements in response.

Table 3-682 Description of elements in response


Element Description

ifName Interface name.

mdnStatus MDN status.

Modifying MDN Configurations


Operation URI Description

PUT /lldp/mdnInterfaces/ Modifies MDN


mdnInterface configurations.

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<mdnInterface operation="merge">
<ifName>10GE1/0/1</ifName>
<mdnStatus>rxOnly</mdnStatus>
</mdnInterface>

Table 3-683 shows the description of elements in request.

Table 3-683 Description of elements in request


Element Description

ifName Interface name.

mdnStatus MDN status.

l Response example (XML format):

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 518


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<?xml version="1.0" encoding="UTF-8"?>


<rpc-reply>
<ok/>
</rpc-reply>

Table 3-684 shows the description of status codes in response.

Table 3-684 The description of status codes in response


Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented


because the request is incorrect in syntax
or the information attribute in the request
is incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

Querying Error MDN Packet Information


Operation URI Description

GET /lldp/mdnInterfaces/ Querying error MDN packet


mdnInterface information.

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<mdnInterface>
<ifName>10GE1/0/1</ifName>
<mdnErrPkt>
<errPktRecvTime></errPktRecvTime>
<errPktInfo></errPktInfo>
</mdnErrPkt>
</mdnInterface>

Table 3-685 shows the description of elements in request.

Table 3-685 Description of elements in request


Element Description

ifName Interface name.

errPktRecvTime Time when an error packet is received.

errPktInfo Content of error MDN packets.

l Response example (XML format):


<?xml version="1.0" encoding="UTF-8"?>
<mdnInterface>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 519


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<ifName>10GE1/0/1</ifName>
</mdnInterface>

Table 3-686 shows the description of elements in response.

Table 3-686 Description of elements in response


Element Description

ifName Interface name.

Querying MDN Statistics


Operation URI Description

GET /lldp/mdnInterfaces/ Querying MDN statistics.


mdnInterface/mdnStatistics

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<mdnInterface>
<ifName>10GE</ifName>
<mdnStatistics>
<totalNeighbors></totalNeighbors>
<receivedFrames></receivedFrames>
<discardedFrames></discardedFrames>
<errorFrames></errorFrames>
<lastClearedTime></lastClearedTime>
</mdnStatistics>
</mdnInterface>

Table 3-687 shows the description of elements in request.

Table 3-687 Description of elements in request


Element Description

ifName Interface name.

totalNeighbors Total number of neighbors.

receivedFrames Number of received MDN packets.

discardedFrames Number of dropped MDN packets.

errorFrames Number of received error MDN packets.

lastClearedTime Time when packet statistics are most


recently deleted.

l Response example (XML format):


<?xml version="1.0" encoding="UTF-8"?>
<mdnInterface>
<ifName>10GE1/0/1</ifName>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 520


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<mdnStatistics>
<receivedFrames>0</receivedFrames>
<discardedFrames>0</discardedFrames>
<errorFrames>0</errorFrames>
<lastClearedTime>1970-01-01T00:00:00</lastClearedTime>
<totalNeighbors>0</totalNeighbors>
</mdnStatistics>
</mdnInterface>

Table 3-688 shows the description of elements in response.

Table 3-688 Description of elements in response


Element Description

ifName Interface name.

totalNeighbors Total number of neighbors.

receivedFrames Number of received MDN packets.

discardedFrames Number of dropped MDN packets.

errorFrames Number of received error MDN packets.

lastClearedTime Time when packet statistics are most


recently deleted.

Querying MDN Neighbor Information


Operation URI Description

GET /lldp/mdnInterfaces/ Queries MDN neighbor


mdnInterface/ information.
mdnNeighbors/
mdnNeighbor

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<mdnInterface>
<ifName>10GE1/0/1</ifName>
<mdnNeighbors>
<mdnNeighbor>
<nbIndex></nbIndex>
<remMacAddress></remMacAddress>
<discoveredTime></discoveredTime>
</mdnNeighbor>
</mdnNeighbors>
</mdnInterface>

Table 3-689 shows the description of elements in request.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 521


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-689 Description of elements in request


Element Description

ifName Interface name.

nbIndex Neighbor index.

remMacAddress Remote neighbor MAC Address.

discoveredTime MDN neighbor discovering time.

l Response example (XML format):


<?xml version="1.0" encoding="UTF-8"?>
<mdnInterface>
<ifName>10GE1/0/1</ifName>
</mdnInterface>

Table 3-690 shows the description of elements in response.

Table 3-690 Description of elements in response


Element Description

ifName Interface name.

3.23 BFD Information

3.23.1 Modify Global BFD Information


Operation URI Description

PUT /bfd/bfdSchGlobal Modify global BFD


configurations and statistics.

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<bfdSchGlobal>
<bfdEnable>false</bfdEnable>
</bfdSchGlobal>

Table 3-691 describes elements in requests.

Table 3-691 Elements


Element Description

bfdEnable Specifies the global BFD enabling flag.


BFD is globally disabled by default.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 522


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<ok/>
</rpc-reply>

Table 3-692 describes status codes in responses.

Table 3-692 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.23.2 Query Global BFD Statistics


Operation URI Description

GET /bfd/bfdStat Query global BFD statistics.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<bfdStat>
<ipSessNum></ipSessNum>
<teLspSessNum></teLspSessNum>
<totalSessNum></totalSessNum>
<SessUpNum></SessUpNum>
<SessDownNum></SessDownNum>
<staticSessNum></staticSessNum>
<dynSessNum></dynSessNum>
</bfdStat>

Table 3-693 describes elements in requests.

Table 3-693 Elements

Element Description

hafStaEnum Specifies the HA status of the BFD


component.

ipSessNum Specifies the number of IP BFD sessions.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 523


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

ldpLspSessNum Specifies the number of LDP LSP BFD


sessions.

sLspSessNum Specifies the number of static LSP BFD


sessions.

teLspSessNum Specifies the number of TE LSP BFD


sessions.

totalSessNum Specifies the total number of BFD


sessions.

SessUpNum Specifies the number of BFD sessions


that are in the Up state.

SessDownNum Specifies the number of BFD sessions


that are in the Down state.

staticSessNum Specifies the number of static BFD


sessions.

dynSessNum Specifies the number of dynamic BFD


sessions.

autoSessNum Specifies the number of static BFD


sessions with automatically negotiated
discriminators.

passiveSessNum Specifies the number of fully dynamic


(passive) BFD sessions.

teTunnelSessNum Specifies the number of TE tunnel BFD


sessions.

usedDiscrNum Specifies the number of used session


discriminators.

pwSessNum Specifies the total number of BFD PW


sessions.

vsiPwSessNum Specifies the total number of BFD VSI


PW sessions.

ldpTnlSessNum Specifies the number of LDP tunnel BFD


sessions.

bgpTnlSessNum Specifies the number of BGP tunnel BFD


sessions.

mainSessUpNum Specifies the number of main BFD


sessions that are in the Up state.

mainSessDownNum Specifies the number of main BFD


sessions that are in the Down state.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 524


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

subSessUpNum Specifies the number of BFD sub-


sessions that are in the Up state.

subSessDownNum Specifies the number of BFD sub-


sessions that are in the Down state.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<bfdStat>
<ipSessNum>1</ipSessNum>
<teLspSessNum>0</teLspSessNum>
<totalSessNum>1</totalSessNum>
<SessUpNum>0</SessUpNum>
<SessDownNum>1</SessDownNum>
<staticSessNum>1</staticSessNum>
<dynSessNum>0</dynSessNum>
<autoSessNum>0</autoSessNum>
<usedDiscrNum>1</usedDiscrNum>
<ldpTnlSessNum>0</ldpTnlSessNum>
<bgpTnlSessNum>0</bgpTnlSessNum>
<mainSessUpNum>0</mainSessUpNum>
<mainSessDownNum>0</mainSessDownNum>
<subSessUpNum>0</subSessUpNum>
<subSessDownNum>0</subSessDownNum>
</bfdStat>

Table 3-694 describes elements in responses.

Table 3-694 Elements


Element Description

ipSessNum Specifies the number of IP BFD sessions.

teLspSessNum Specifies the number of TE LSP BFD


sessions.

totalSessNum Specifies the total number BFD sessions.

SessUpNum Specifies the number of BFD sessions


that are in the Up state.

SessDownNum Specifies the number of BFD sessions


that are in the Down state.

staticSessNum Specifies the number of static BFD


sessions.

dynSessNum Specifies the number of dynamic BFD


sessions.

autoSessNum Specifies the number of static BFD


sessions with automatically negotiated
discriminators.

usedDiscrNum Specifies the number of used session


discriminators.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 525


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

ldpTnlSessNum Specifies the number of LDP tunnel BFD


sessions.

bgpTnlSessNum Specifies the number of BGP tunnel BFD


sessions.

mainSessUpNum Specifies the number of main BFD


sessions that are in the Up state.

mainSessDownNum Specifies the number of main BFD


sessions that are in the Down state.

subSessUpNum Specifies the number of BFD sub-


sessions that are in the Up state.

subSessDownNum Specifies the number of BFD sub-


sessions that are in the Down state.

Table 3-695 describes status codes in responses.

Table 3-695 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.23.3 Create a BFD Session


Operation URI Description

POST /bfd/bfdCfgSessions/ Create a BFD session.


bfdCfgSession

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<bfdCfgSession operation="create">
<sessName>2</sessName>
<localDiscr>20</localDiscr>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 526


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<remoteDiscr>20</remoteDiscr>
<minTxInt>10</minTxInt>
<minRxInt>10</minRxInt>
<detectMulti>3</detectMulti>
<tosExp>7</tosExp>
<adminDown>false</adminDown>
<destAddr>10.1.1.2</destAddr>
<linkType>IP</linkType>
<createType>SESS_STATIC</createType>
<teBackup>false</teBackup>
<outIfName></outIfName>
<processPst>false</processPst>
<pis>false</pis>
<pisSubIf>false</pisSubIf>
<useDefaultIp>false</useDefaultIp>
<addrType>IPV4</addrType>
<pwSecondary>false</pwSecondary>
<isSetTrackIf>false</isSetTrackIf>
<oneArmEcho>false</oneArmEcho>
<bundleMode>-</bundleMode>
<pisNoImpact>false</pisNoImpact>
<isGroup>false</isGroup>
</bfdCfgSession>

Table 3-696 describes elements in requests.

Table 3-696 Elements


Element Description

sessName Specifies a BFD session name, which


uniquely identifies a session.

createType Specifies a BFD session creation mode.


Only static BFD sessions or static BFD
sessions with automatically negotiated
discriminators can be manually created.

localDiscr Specifies the local discriminator of a


BFD session. This element does not need
to be configured when static BFD
sessions with automatically negotiated
discriminators are created.
NOTE
The local discriminator at the local end must
be the same as the remote discriminator at the
remote end.

remoteDiscr Specifies the remote discriminator of a


BFD session. This element does not need
to be configured when static BFD
sessions with automatically negotiated
discriminators are created.
NOTE
The remote discriminator at the local end
must be the same as the local discriminator at
the remote end.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 527


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

linkType Type of a link detected by a BFD session.


Select a correct link type as required. For
example, if the BFD session is used to
detect a TE tunnel, set Detected Link
Type to TE Tunnel.

addrType Specifies the type of an IP address.

outIfName Specifies the name of an outbound


interface for a BFD session. This element
is configured when the link type is IP or
LDP LSP. If only a destination IP address
is specified, a multi-hop link is
monitored. If both a destination IP
address and outbound interface name are
specified, a single-hop link is monitored.
That is, a BFD session monitors a
specific route in which the outbound
interface is the specified interface and the
next-hop address is the specified
destination IP address.

/destAddr Specifies the destination IP address of a


BFD session. This element must be
configured when the link type is IP or
LDP LSP.

srcAddr Specifies the source IP address of a BFD


session. This element must be configured
for static BFD sessions with
automatically negotiated discriminators
or can be configured when the link type is
IP.
NOTE
If the source IP address is specified and URPF
is enabled, BFD packets can be correctly
forwarded. The source IP address must be
configured correctly because the system
checks only the validity of the source IP
address format. A multicast or broadcast
address is invalid. After a BFD session is
created, changing the IP address of the
outbound interface for BFD packets does not
change the source IP address carried in the
BFD packets.

vrfName Specifies the name of a VPN instance to


which a BFD session belongs. If no VPN
instance is specified, the destination IP
address is regarded as a public IP address.

tunnelName Specifies the name of a TE tunnel. This


element must be configured when the link
type is TE LSP or TE Tunnel.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 528


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

teBackup Specifies whether the LSP is the primary


LSP. By default, the LSP is the primary
LSP. This element can be configured
when the link type is TE LSP.

minTxInt Specifies the minimum interval at which


BFD packets are sent, in milliseconds.

minRxInt Specifies the minimum interval at which


BFD packets are received, in
milliseconds.

detectMulti Specifies the number of times that the


system fails to be responded after which
the BFD session is considered Down. The
detection multiplier is configured on the
local and remote devices, and no
negotiation is required.

wtrTimerInt Specifies the WTR time. The configured


unit is minutes, and the query unit is
milliseconds. By default, the system does
not wait for a BFD session to restore.
After the WTR time is configured, the
system reports an Up event to the
application only after the specified WTR
time elapses. Setting the WTR time
prevents applications from switching
between the master and backup devices if
the BFD session flaps. If bidirectional
BFD sessions are configured, set the
same WTR time for the two BFD
sessions.

tosExp Specifies the packet priority. The value is


an integer ranging from 0 to 7. The
default value is 7, indicating the highest
priority. The system preferentially
transmits BFD packets with high
priorities during congestion.

adminDown Specifies whether a BFD session enters


the administratively Down state. By
default, this element is disabled. To
terminate a BFD session, enable this
element.
NOTE
Setting the administratively Down state
disables the BFD mechanism, which is a risky
operation.

Description Specifies the description of a BFD


session.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 529


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

processPst Specifies whether session status changes


trigger PST operations. This element can
be configured for only one BFD session
on each interface.

Pis Specifies whether session status changes


trigger PIS operations. This element can
be configured for only one BFD session
on each interface.

pisSubIf Specifies whether BFD session status


changes trigger PIS operations on an
associated sub-interface. This element
can be configured for only one BFD
session on each interface.

useDefaultIp Specifies that a BFD session uses a


multicast address as the destination
address of a sent packet. An outbound
interface must be specified.

perLink Specifies each member link.

oneArmEcho Specifies one-arm echo.

bundleMode Specifies the link-bundle session mode.


"-" indicates a non-bundle mode;
"standard bundle mode" indicates the
RFC 7310 mode; "compatible bundle
mode" indicates the vendor interworking
mode.

pisNoImpact Is or No impact on reboot.

isGroup Session Group.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<ok/>
</rpc-reply>

Table 3-697 describes status codes in responses.

Table 3-697 Status codes


Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 530


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.23.4 Query All BFD Sessions


Operation URI Description

GET /bfd/bfdAllSessions/ Query all BFD sessions.


bfdAllSession

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<bfdAllSession>
<sessName></sessName>
<createType></createType>
<sessType></sessType>
<localDiscr></localDiscr>
<remoteDiscr></remoteDiscr>
<shutdown></shutdown>
<description></description>
<bfdSessRunning>
<sessState></sessState>
</bfdSessRunning>
</bfdAllSession>

Table 3-698 describes elements in requests.

Table 3-698 Elements


Element Description

sessName Specifies a BFD session name.

createType Specifies the creation mode of a BFD


session.

sessType Specifies the session type, which can be


single-/multi-hop IP, LSP, tunnel, or TE
LSP.

localDiscr Specifies the local identifier of a BFD


session.

remoteDiscr Specifies the remote identifier of a BFD


session.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 531


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

shutdown Specifies whether a BFD session enters


the administratively Down state.

description Specifies the description of a BFD


session.

bfdSessRunning Specifies session running information.

sessState Specifies the session status.

l Response example (XML format)


<bfdAllSession>
<sessName>a</sessName>
<localDiscr>1048576</localDiscr>
<remoteDiscr>0</remoteDiscr>
<shutdown>false</shutdown>
<description>-</description>
<createType>SESS_AUTO</createType>
<sessType>SINGLE_HOP_IP</sessType>
<bfdSessRunning>
<sessState>DOWN</sessState>
</bfdSessRunning>
</bfdAllSession>

Table 3-699 describes elements in responses.

Table 3-699 Elements


Element Description

sessName Specifies a BFD session name.

localDiscr Specifies the local identifier of a BFD


session.

remoteDiscr Specifies the remote identifier of a BFD


session.

shutdown Specifies whether a BFD session enters


the administratively Down state.

description Specifies the description of a BFD


session.

createType Specifies the creation mode of a BFD


session.

sessType Specifies the session type, which can be


single-/multi-hop IP, LSP, tunnel, or TE
LSP.

bfdSessRunning Specifies session running information.

sessState Specifies the session status.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 532


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-700 describes status codes in responses.

Table 3-700 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.23.5 Modify a BFD Session


Operation URI Description

PUT /bfd/bfdCfgSessions/ Modify a configured BFD


bfdCfgSession session.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<bfdCfgSession operation="merge">
<sessName>mybfd</sessName>
<localDiscr>3</localDiscr>
<remoteDiscr>4</remoteDiscr>
<adminDown>false</adminDown>
</bfdCfgSession>

Table 3-701 describes elements in requests.

Table 3-701 Elements

Element Description

sessName Specifies a BFD session name, which


uniquely identifies a session.

localDiscr Specifies the local discriminator of a


BFD session. This element does not need
to be configured when static BFD
sessions with automatically negotiated
discriminators are created.
NOTE
The local discriminator at the local end must
be the same as the remote discriminator at the
remote end.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 533


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

remoteDiscr Specifies the remote discriminator of a


BFD session. This element does not need
to be configured when static BFD
sessions with automatically negotiated
discriminators are created.
NOTE
The remote discriminator at the local end
must be the same as the local discriminator at
the remote end.

adminDown Specifies whether a BFD session enters


the administratively Down state. By
default, this element is disabled. To
terminate a BFD session, enable this
element.
NOTE
Setting the administratively Down state
disables the BFD mechanism, which is a risky
operation.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<ok/>
</rpc-reply>

Table 3-702 describes status codes in responses.

Table 3-702 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.23.6 Delete a BFD Session


Operation URI Description

DELETE /bfd/bfdCfgSessions/ Delete a configured BFD


bfdCfgSession session.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 534


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<bfdCfgSession operation="delete">
<sessName>mybfd</sessName>
</bfdCfgSession>

Table 3-703 describes elements in requests.

Table 3-703 Elements


Element Description

sessName Specifies a BFD session name, which


uniquely identifies a session.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<ok/>
</rpc-reply>

Table 3-704 describes status codes in responses.

Table 3-704 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.23.7 Query a BFD Bundle Session


Operation URI Description

GET /bfd/bfdBundleSessions/ Query a BFD bundle


bfdBundleSession session.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<bfdBundleSession>
<sessName></sessName>
<localDiscr></localDiscr>
<remoteDiscr></remoteDiscr>
<mainSubRole></mainSubRole>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 535


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<sessState></sessState>
<detectMode></detectMode>
<createType></createType>
<linkType></linkType>
<destAddr></destAddr>
<srcAddr></srcAddr>
<fsmBoardStr></fsmBoardStr>
<tosExp></tosExp>
<minTxInt></minTxInt>
<minRxInt></minRxInt>
<detectMul></detectMul>
<actTxInt></actTxInt>
<actRxInt></actRxInt>
<actDetectMul></actDetectMul>
<detectTime></detectTime>
<destPort></destPort>
<wtrTimerInt></wtrTimerInt>
<localDiag></localDiag>
<bindApps></bindApps>
<subSessCount></subSessCount>
<outIfName></outIfName>
<bundleMode></bundleMode>
<vrfName></vrfName>
<dispSessType></dispSessType>
</bfdBundleSession>

Table 3-705 describes elements in requests.

Table 3-705 Elements


Element Description

sessName Specifies a BFD session name.

createType Specifies the creation mode of a BFD


session.

localDiscr Specifies the local identifier of a BFD


session.

remoteDiscr Specifies the remote identifier of a BFD


session.

linkType Specifies the link type of a BFD session.

destAddr Specifies the destination IP address of a


BFD session. This element must be
configured when the link type is IP or
LDP LSP.

srcAddr Specifies the source IP address of a BFD


session.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 536


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

outIfName Specifies the name of an outbound


interface for a BFD session. This element
is configured when the link type is IP or
LDP LSP. If only a destination IP address
is specified, a multi-hop link is
monitored. If both a destination IP
address and outbound interface name are
specified, a single-hop link is monitored.
That is, a BFD session monitors a
specific route in which the outbound
interface is the specified interface and the
next-hop address is the specified
destination IP address.

vrfName Specifies the name of a VPN instance to


which a BFD session belongs. If no VPN
instance is specified, the destination IP
address is regarded as a public IP address.

minTxInt Specifies the minimum interval at which


BFD packets are sent, in milliseconds.

minRxInt Specifies the minimum interval at which


BFD packets are received, in
milliseconds.

detectMult Specifies the number of times that the


system fails to be responded after which
the BFD session is considered Down. The
detection multiplier is configured on the
local and remote devices, and no
negotiation is required.

wtrTimerInt Specifies the WTR time, in milliseconds.


If the WTR time is 0, the system does not
wait for a BFD session to restore.

tosExp Specifies the packet priority. The value is


an integer ranging from 0 to 7. The
default value is 7, indicating the highest
priority.

bindApps Specifies information about an


application bound to a BFD session.

fsmBoardStr Specifies the number of a selected board.

mainSubRole Specifies the session role.

sessState Specifies the session status.

destPort Specifies the destination port number of


UDP packets for a BFD session.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 537


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

detectMode Specifies the actual detection mode of a


BFD session.

actTxInt Specifies the actual interval at which


BFD packets are sent.

actRxInt Specifies the actual interval at which


BFD packets are received.

actDetectMul Specifies the actual detection multiplier


of a BFD session.

detectTime Specifies the detection interval in


asynchronous mode.

localDiag Specifies the reason that a BFD session


last went Down.

subSessCount Specifies the number of sub-sessions.

bundleMode Specifies the link-bundle session mode.

dispSessType Specifies the session type.

mainSessName Specifies the main session name.

l Response example (XML format)


<bfdBundleSession>
<sessName><A/sessName>
<localDiscr>1048576</localDiscr>
<remoteDiscr>0</remoteDiscr>
<destAddr>2.2.2.1</destAddr>
<srcAddr>2.2.2.1</srcAddr>
<detectMode>ASYNC_WITHOUT_ECHO</detectMode>
<sessState>DOWN</sessState>
<createType>SESS_AUTO</createType>
<linkType>IP</linkType>
<fsmBoardStr>-</fsmBoardStr>
<tosExp>7</tosExp>
<minTxInt>1000</minTxInt>
<minRxInt>1000</minRxInt>
<detectMul>3</detectMul>
<actTxInt>0</actTxInt>
<actRxInt>0</actRxInt>
<actDetectMul>0</actDetectMul>
<detectTime>0</detectTime>
<destPort>6784</destPort>
<wtrTimerInt>0</wtrTimerInt>
<localDiag>NONE</localDiag>
<bindApps>AUTO</bindApps>
<subSessCount>0</subSessCount>
<outIfName>Eth-Trunk1</outIfName>
<mainSubRole>Bundle_Main</mainSubRole>
<bundleMode>Bundle_Standard</bundleMode>
<vrfName>-</vrfName>
<dispSessType>Link_Bundle</dispSessType>
</bfdBundleSession>

Table 3-706 describes elements in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 538


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-706 Elements


Element Description

sessName Specifies a BFD session name.

createType Specifies the creation mode of a BFD


session.

localDiscr Specifies the local identifier of a BFD


session.

remoteDiscr Specifies the remote identifier of a BFD


session.

linkType Specifies the link type of a BFD session.

destAddr Specifies the destination IP address of a


BFD session. This element must be
configured when the link type is IP or
LDP LSP.

srcAddr Specifies the source IP address of a BFD


session.

outIfName Specifies the name of an outbound


interface for a BFD session. This element
is configured when the link type is IP or
LDP LSP. If only a destination IP address
is specified, a multi-hop link is
monitored. If both a destination IP
address and outbound interface name are
specified, a single-hop link is monitored.
That is, a BFD session monitors a
specific route in which the outbound
interface is the specified interface and the
next-hop address is the specified
destination IP address.

vrfName Specifies the name of a VPN instance to


which a BFD session belongs. If no VPN
instance is specified, the destination IP
address is regarded as a public IP address.

minTxInt Specifies the minimum interval at which


BFD packets are sent, in milliseconds.

minRxInt Specifies the minimum interval at which


BFD packets are received, in
milliseconds.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 539


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

detectMult Specifies the number of times that the


system fails to be responded after which
the BFD session is considered Down. The
detection multiplier is configured on the
local and remote devices, and no
negotiation is required.

wtrTimerInt Specifies the WTR time, in milliseconds.


If the WTR time is 0, the system does not
wait for a BFD session to restore.

tosExp Specifies the packet priority. The value is


an integer ranging from 0 to 7. The
default value is 7, indicating the highest
priority.

bindApps Specifies information about an


application bound to a BFD session.

fsmBoardStr Specifies the number of a selected board.

mainSubRole Specifies the session role.

sessState Specifies the session status.

destPort Specifies the destination port number of


UDP packets for a BFD session.

detectMode Specifies the actual detection mode of a


BFD session.

actTxInt Specifies the actual interval at which


BFD packets are sent.

actRxInt Specifies the actual interval at which


BFD packets are received.

actDetectMul Specifies the actual detection multiplier


of a BFD session.

detectTime Specifies the detection interval in


asynchronous mode.

localDiag Specifies the reason that a BFD session


last went Down.

subSessCount Specifies the number of sub-sessions.

bundleMode Specifies the link-bundle session mode.

dispSessType Specifies the session type.

mainSessName Specifies the main session name.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 540


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-707 describes status codes in responses.

Table 3-707 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.24 VRRP

3.24.1 Global VRRP Attributes

Query Global VRRP Attributes


Operation URI Description

GET /vrrp/vrrpGlobalCfg Query global VRRP


attributes, including the
VRRP version and packet
transmission mode.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGlobalCfg>
<gratuitousArpFlag></gratuitousArpFlag>
<gratuitousArpTimeOut></gratuitousArpTimeOut>
<advTimeLearnFlag></advTimeLearnFlag>
<pingEnable></pingEnable>
<recoverDelay></recoverDelay>
<vipRtAdvEnable></vipRtAdvEnable>
<vipOspfEnable></vipOspfEnable>
<vipIsisEnable></vipIsisEnable>
<vipRipEnable></vipRipEnable>
<version></version>
<v3SendMode></v3SendMode>
<v6CksmMode></v6CksmMode>

</vrrpGlobalCfg>

Table 3-708 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 541


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-708 Elements


Element Description

gratuitousArpFlag Specifies whether a device is enabled to


send gratuitous ARP packets periodically.
By default, a device is enabled to send
gratuitous ARP packets periodically.

gratuitousArpTimeOut Specifies the timeout period of gratuitous


ARP packets, in seconds.

advTimeLearnFlag Specifies whether packet interval learning


is enabled.

pingEnable Specifies whether the ping function for


virtual IP addresses is enabled. By
default, the ping function is enabled.

recoverDelay Specifies the recovery delay, in seconds.

vipRtAdvEnable Specifies whether a device is enabled to


advertise dynamic routes with virtual IP
addresses. By default, a device is enabled
to advertise dynamic routes with virtual
IP addresses.

vipOspfEnable Specifies whether OSPF is enabled to


advertise dynamic routes with virtual IP
addresses. By default, OSPF is enabled to
advertise dynamic routes with virtual IP
addresses.

vipIsisEnable Specifies whether IS-IS is enabled to


advertise dynamic routes with virtual IP
addresses. By default, IS-IS is enabled to
advertise dynamic routes with virtual IP
addresses.

vipRipEnable Specifies whether RIP is enabled to


advertise dynamic routes with virtual IP
addresses. By default, RIP is enabled to
advertise dynamic routes with virtual IP
addresses.

version Specifies the VRRP version. The default


VRRP version is v2.

v3SendMode Specifies the mode in which VRRP


packets are sent globally.

v6CksmMode Specifies the VRRP6 checksum mode.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 542


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

memberLbrgTimerHello Specifies the interval at which the master


device in a load-balance redundancy
group (LBRG) configured using a service
VRRP backup group sends VRRP
Advertisement packets, in seconds.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vrrpGlobalCfg>
<gratuitousArpTimeOut>120</gratuitousArpTimeOut>
<gratuitousArpFlag>true</gratuitousArpFlag>
<advTimeLearnFlag>true</advTimeLearnFlag>
<pingEnable>true</pingEnable>
<recoverDelay>0</recoverDelay>
<vipRtAdvEnable>true</vipRtAdvEnable>
<vipOspfEnable>true</vipOspfEnable>
<vipIsisEnable>true</vipIsisEnable>
<vipRipEnable>true</vipRipEnable>
<version>v3</version>
<v3SendMode>v3-only</v3SendMode>
<v6CksmMode>include-pseudo-header</v6CksmMode>

</vrrpGlobalCfg>

Table 3-709 describes elements in responses.

Table 3-709 Elements


Element Description

gratuitousArpFlag Specifies whether a device is enabled to


send gratuitous ARP packets periodically.
By default, a device is enabled to send
gratuitous ARP packets periodically.

gratuitousArpTimeOut Specifies the timeout period of gratuitous


ARP packets, in seconds.

advTimeLearnFlag Specifies whether packet interval learning


is enabled.

pingEnable Specifies whether the ping function for


virtual IP addresses is enabled. By
default, the ping function is enabled.

recoverDelay Specifies the recovery delay, in seconds.

vipRtAdvEnable Specifies whether a device is enabled to


advertise dynamic routes with virtual IP
addresses. By default, a device is enabled
to advertise dynamic routes with virtual
IP addresses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 543


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

vipOspfEnable Specifies whether OSPF is enabled to


advertise dynamic routes with virtual IP
addresses. By default, OSPF is enabled to
advertise dynamic routes with virtual IP
addresses.

vipIsisEnable Specifies whether IS-IS is enabled to


advertise dynamic routes with virtual IP
addresses. By default, IS-IS is enabled to
advertise dynamic routes with virtual IP
addresses.

vipRipEnable Specifies whether RIP is enabled to


advertise dynamic routes with virtual IP
addresses. By default, RIP is enabled to
advertise dynamic routes with virtual IP
addresses.

version Specifies the VRRP version. The default


VRRP version is v2.

v3SendMode Specifies the mode in which VRRP


packets are sent globally.

v6CksmMode Specifies the VRRP6 checksum mode.

memberLbrgTimerHello Specifies the interval at which the master


device in a load-balance redundancy
group (LBRG) configured using a service
VRRP backup group sends VRRP
Advertisement packets, in seconds.

Modify Global VRRP Attributes


Operation URI Description

PUT /vrrp/vrrpGlobalCfg Modify global VRRP


attributes, including the
VRRP version and packet
transmission mode.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGlobalCfg>
<gratuitousArpFlag>true</gratuitousArpFlag>
<gratuitousArpTimeOut>130</gratuitousArpTimeOut>
<advTimeLearnFlag>true</advTimeLearnFlag>
<pingEnable>true</pingEnable>
<recoverDelay>2</recoverDelay>
<vipRtAdvEnable>false</vipRtAdvEnable>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 544


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<vipOspfEnable>false</vipOspfEnable>
<vipIsisEnable>false</vipIsisEnable>
<vipRipEnable>false</vipRipEnable>
<naFlag>true</naFlag>
<naTimeOut>130</naTimeOut>
<v3SendMode>v2v3-both</v3SendMode>
<v6CksmMode>exclude-pseudo-header</v6CksmMode>
<memberLbrgTimerHello>100</memberLbrgTimerHello>
</vrrpGlobalCfg>

Table 3-710 describes elements in requests.

Table 3-710 Elements


Element Description

gratuitousArpFlag Specifies whether a device is enabled to


send gratuitous ARP packets periodically.
By default, a device is enabled to send
gratuitous ARP packets periodically.

gratuitousArpTimeOut Specifies the timeout period of gratuitous


ARP packets, in seconds.

advTimeLearnFlag Specifies whether packet interval learning


is enabled.

pingEnable Specifies whether the ping function for


virtual IP addresses is enabled. By
default, the ping function is enabled.

recoverDelay Specifies the recovery delay, in seconds.

vipRtAdvEnable Specifies whether a device is enabled to


advertise dynamic routes with virtual IP
addresses. By default, a device is enabled
to advertise dynamic routes with virtual
IP addresses.

vipOspfEnable Specifies whether OSPF is enabled to


advertise dynamic routes with virtual IP
addresses. By default, OSPF is enabled to
advertise dynamic routes with virtual IP
addresses.

vipIsisEnable Specifies whether IS-IS is enabled to


advertise dynamic routes with virtual IP
addresses. By default, IS-IS is enabled to
advertise dynamic routes with virtual IP
addresses.

vipRipEnable Specifies whether RIP is enabled to


advertise dynamic routes with virtual IP
addresses. By default, RIP is enabled to
advertise dynamic routes with virtual IP
addresses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 545


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

naFlag Specifies whether a device is enabled to


periodically send unsolicited NA packets.

naTimeOut Specifies the timeout period of


unsolicited NA packets, in seconds.

v3SendMode Specifies the mode in which VRRP


packets are sent globally.

v6CksmMode Specifies the VRRP6 checksum mode.

memberLbrgTimerHello Specifies the interval at which the master


device in a load-balance redundancy
group (LBRG) configured using a service
VRRP backup group sends VRRP
Advertisement packets, in seconds.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-711 describes status codes in responses.

Table 3-711 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.24.2 VRRP Interface Configurations


Query VRRP Interface Configurations
Operation URI Description

GET /vrrp/interfaces/interface Query VRRP interface


configurations, including the
interface name and recovery
delay.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 546


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<ifName></ifName>
<ttlCheckFlag></ttlCheckFlag>
<sendModeAll></sendModeAll>
<sendSubVlanId></sendSubVlanId>
<recoverDelay></recoverDelay>
</interface>

Table 3-712describes elements in requests.

Table 3-712 Elements


Element Description

ifName Specifies an interface name.

ttlCheckFlag Specifies whether a device is enabled to


check the TTL value in received VRRP
packets. If the TTL value is not 255, the
packets are discarded. By default, a
device is enabled to check the TTL value
in received VRRP packets.

sendModeAll Specifies that VRRP packets are sent to


all sub-VLANs of a super VLAN.

sendSubVlanId Specifies a sub-VLAN to which VRRP


packets are sent. The default value is 0,
indicating that VRRP packets are sent to
an active sub-VLAN with the smallest
ID. This element is configured for a super
VLAN interface only.

recoverDelay Specifies the recovery delay, in seconds.


After a recovery delay is configured, a
VRRP backup group responds to an
interface Up event after the configured
recovery delay. The default recovery
delay is 0s. Configuring a recovery delay
helps suppress interface status flapping.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<interface>
<ifName>10GE1/0/1</ifName>
<ttlCheckFlag>true</ttlCheckFlag>
<sendSubVlanId>0</sendSubVlanId>
<sendModeAll>false</sendModeAll>
<recoverDelay>0</recoverDelay>
</interface>

Table 3-713describes elements in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 547


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-713 Elements


Element Description

ifName Specifies an interface name.

ttlCheckFlag Specifies whether a device is enabled to


check the TTL value in received VRRP
packets. If the TTL value is not 255, the
packets are discarded. By default, a
device is enabled to check the TTL value
in received VRRP packets.

sendModeAll Specifies that VRRP packets are sent to


all sub-VLANs of a super VLAN.

sendSubVlanId Specifies a sub-VLAN to which VRRP


packets are sent. The default value is 0,
indicating that VRRP packets are sent to
an active sub-VLAN with the smallest
ID. This element is configured for a super
VLAN interface only.

recoverDelay Specifies the recovery delay, in seconds.


After a recovery delay is configured, a
VRRP backup group responds to an
interface Up event after the configured
recovery delay. The default recovery
delay is 0s. Configuring a recovery delay
helps suppress interface status flapping.

Table 3-714describes status codes in responses.

Table 3-714 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 548


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Modify VRRP Interface Configurations


Operation URI Description

PUT /vrrp/interfaces/interface Modify VRRP interface


configurations, including the
TTL value and recovery
delay.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<ifName>10GE1/0/1</ifName>
<sendModeAll>false</sendModeAll>
<recoverDelay>2</recoverDelay>
</interface>

Table 3-715describes elements in requests.

Table 3-715 Elements


Element Description

ifName Specifies an interface name.

ttlCheckFlag Specifies whether a device is enabled to


check the TTL value in received VRRP
packets. If the TTL value is not 255, the
packets are discarded. By default, a
device is enabled to check the TTL value
in received VRRP packets.

sendModeAll Specifies that VRRP packets are sent to


all sub-VLANs of a super VLAN.

recoverDelay Specifies the recovery delay, in seconds.


After a recovery delay is configured, a
VRRP backup group responds to an
interface Up event after the configured
recovery delay. The default recovery
delay is 0s. Configuring a recovery delay
helps suppress interface status flapping.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-716describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 549


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-716 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Query VRRP Interface Packet Statistics


Operation URI Description

GET /vrrp/interfaces/interface Query VRRP interface


packet statistics, including
the number of packets with
an incorrect IP protocol
number and the number of
packets with an incorrect
destination IP address.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<ifName>10GE1/0/1</ifName>
<vrrpIfStatistics>
<ipProtocolErrors></ipProtocolErrors>
<destinationIpErrors></destinationIpErrors>
<checksumErrors></checksumErrors>
<versionErrors></versionErrors>
<vrrpIdErrors></vrrpIdErrors>
</vrrpIfStatistics>
</interface>

Table 3-717describes elements in requests.

Table 3-717 Elements


Element Description

ifName Specifies an interface name.

ipProtocolErrors Specifies the number of packets with an


incorrect IP protocol number.

destinationIpErrors Specifies the number of packets with an


incorrect destination IP address.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 550


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

checksumErrors Specifies the number of packets with an


invalid checksum.

versionErrors Specifies the number of packets with an


unknown or unsupported version number.

vrrpIdErrors Specifies the number of packets with an


invalid VRRP backup group ID.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<interface>
<ifName>10GE1/0/1</ifName>
<vrrpIfStatistics>
<ipProtocolErrors>0</ipProtocolErrors>
<destinationIpErrors>0</destinationIpErrors>
<checksumErrors>0</checksumErrors>
<versionErrors>0</versionErrors>
<vrrpIdErrors>0</vrrpIdErrors>
</vrrpIfStatistics>
</interface>

Table 3-718describes elements in responses.

Table 3-718 Elements


Element Description

ifName Specifies an interface name.

ipProtocolErrors Specifies the number of packets with an


incorrect IP protocol number.

destinationIpErrors Specifies the number of packets with an


incorrect destination IP address.

checksumErrors Specifies the number of packets with an


invalid checksum.

versionErrors Specifies the number of packets with an


unknown or unsupported version number.

vrrpIdErrors Specifies the number of packets with an


invalid VRRP backup group ID.

3.24.3 VRRP Backup Group

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 551


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.24.3.1 Configure a VRRP Backup Group

Query a VRRP Backup Group


Operation URI Description

GET /vrrp/vrrpGroups/vrrpGroup Query information about a


VRRP backup group,
including the ID of the
VRRP backup group and the
name of the interface on
which the VRRP backup
group resides.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<vrrpId></vrrpId>
<ifName></ifName>
<vrrpType></vrrpType>
<adminIgnoreIfDown></adminIgnoreIfDown>
<unflowdown></unflowdown>
<adminVrrpId></adminVrrpId>
<adminIfName></adminIfName>
<lbrgVrrpId></lbrgVrrpId>
<state></state>
<priority></priority>
<runPriority></runPriority>
<masterPriority></masterPriority>
<masterIp></masterIp>
<createTime></createTime>
<lchangeTime></lchangeTime>
<advertiseInterval></advertiseInterval>
<runAdvertiseInterval></runAdvertiseInterval>
<preemptMode></preemptMode>
<delayTime></delayTime>
<remainTime></remainTime>
<authenticationMode></authenticationMode>
<isPlain></isPlain>
<authenticationKey></authenticationKey>
<linkBfdDownNum></linkBfdDownNum>
<virtualMac></virtualMac>
<fastResume></fastResume>
<v3SendMode></v3SendMode>
</vrrpGroup>

Table 3-719 describes elements in requests.

Table 3-719 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 552


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

vrrpType Specifies the type of a VRRP backup


group.

adminIgnoreIfDown Specifies that an mVRRP backup group


ignores an interface Down event.

unflowdown Specifies that the Flowdown function is


disabled for a service VRRP backup
group.

adminVrrpId Specifies the ID of a bound mVRRP


backup group.

adminIfName Specifies the name of the interface on


which a bound mVRRP backup group
resides.

lbrgVrrpId Specifies the ID of an LBRG.

state Specifies the status of a VRRP backup


group. When a VRRP backup group
works properly, it has the following
values:
l Master
l Backup
l Initialize

priority Specifies the priority configured for the


router in the VRRP backup group. The
value is an integer ranging from 1 to 254.
A larger value indicates a higher priority.

runPriority Specifies the running priority (that is, the


current priority) of the router in the
VRRP backup group. If the router is an IP
address owner, its running priority is
displayed as 255.

masterPriority Specifies the priority of the master router


in the VRRP backup group.

masterIp Specifies the IP address of the master


router in the VRRP backup group.

createTime Specifies the time when the VRRP


backup group was created.

lchangeTime Specifies the time when the status of the


VRRP backup group last changed.

advertiseInterval Specifies the configured interval at which


VRRP packets are sent, in milliseconds.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 553


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

runAdvertiseInterval Specifies the running interval at which


VRRP packets are sent, in milliseconds.

preemptMode Specifies a preemption mode.

delayTime Specifies a preemption delay, in seconds.

remainTime Specifies the remaining preemption delay,


in seconds.

authenticationMode Specifies an authentication mode in


which the master and backup routers in
the VRRP backup group exchange VRRP
packets.
l Non-authentication
l Simple authentication
l MD5 authentication
Default value: non-authentication

isPlain Specifies whether the authentication key


of the VRRP backup group is displayed
as a plaintext. By default, the
authentication key of the VRRP backup
group is displayed as a ciphertext.

authenticationKey Specifies the authentication key.

linkBfdDownNum Specifies the maximum number of link


BFD sessions that trigger VRRP backup
group status changes.

virtualMac Specifies the virtual MAC address of the


VRRP backup group.

fastResume Specifies the fast switching mode of an


mVRRP backup group.

v3SendMode Specifies the mode in which VRRP


packets are sent.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<ifName>10GE1/0/1</ifName>
<vrrpId>1</vrrpId>
<state>master</state>
<priority>100</priority>
<runPriority>100</runPriority>
<masterPriority>100</masterPriority>
<advertiseInterval>1000</advertiseInterval>
<runAdvertiseInterval>1000</runAdvertiseInterval>
<preemptMode>true</preemptMode>
<delayTime>0</delayTime>
<virtualMac>0000-5e00-0101</virtualMac>
<authenticationMode>none</authenticationMode>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 554


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<authenticationKey/>
<vrrpType>normal</vrrpType>
<adminVrrpId/>
<lbrgVrrpId/>
<adminIfName></adminIfName>
<adminIgnoreIfDown>false</adminIgnoreIfDown>
<linkBfdDownNum>0</linkBfdDownNum>
<isPlain>false</isPlain>
<unflowdown>false</unflowdown>
<masterIp>1.1.1.1</masterIp>
<remainTime>0</remainTime>
<createTime>2014-11-13T10:15:39</createTime>
<lchangeTime>2014-11-13T10:15:45</lchangeTime>
<fastResume>false</fastResume>
<v3SendMode>v2-only</v3SendMode>
</vrrpGroup>

Table 3-720 describes elements in responses.

Table 3-720 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

vrrpType Specifies the type of a VRRP backup


group.

adminIgnoreIfDown Specifies that an mVRRP backup group


ignores an interface Down event.

unflowdown Specifies that the Flowdown function is


disabled for a service VRRP backup
group.

adminVrrpId Specifies the ID of a bound mVRRP


backup group.

adminIfName Specifies the name of the interface on


which a bound mVRRP backup group
resides.

lbrgVrrpId Specifies the ID of an LBRG.

state Specifies the status of a VRRP backup


group. When a VRRP backup group
works properly, it has the following
values:
l Master
l Backup
l Initialize

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 555


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

priority Specifies the priority configured for the


router in the VRRP backup group. The
value is an integer ranging from 1 to 254.
A larger value indicates a higher priority.

runPriority Specifies the running priority (that is, the


current priority) of the router in the
VRRP backup group. If the router is an IP
address owner, its running priority is
displayed as 255.

masterPriority Specifies the priority of the master router


in the VRRP backup group.

masterIp Specifies the IP address of the master


router in the VRRP backup group.

createTime Specifies the time when the VRRP


backup group was created.

lchangeTime Specifies the time when the status of the


VRRP backup group last changed.

advertiseInterval Specifies the configured interval at which


VRRP packets are sent, in milliseconds.

runAdvertiseInterval Specifies the running interval at which


VRRP packets are sent, in milliseconds.

preemptMode Specifies a preemption mode.

delayTime Specifies a preemption delay, in seconds.

remainTime Specifies the remaining preemption delay,


in seconds.

authenticationMode Specifies an authentication mode in


which the master and backup routers in
the VRRP backup group exchange VRRP
packets.
l Non-authentication
l Simple authentication
l MD5 authentication
Default value: non-authentication

isPlain Specifies whether the authentication key


of the VRRP backup group is displayed
as a plaintext. By default, the
authentication key of the VRRP backup
group is displayed as a ciphertext.

authenticationKey Specifies the authentication key.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 556


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

linkBfdDownNum Specifies the maximum number of link


BFD sessions that trigger VRRP backup
group status changes.

virtualMac Specifies the virtual MAC address of the


VRRP backup group.

fastResume Specifies the fast switching mode of an


mVRRP backup group.

v3SendMode Specifies the mode in which VRRP


packets are sent.

Create a VRRP Backup Group


Operation URI Description

POST /vrrp/vrrpGroups/vrrpGroup Create a VRRP backup


group, including the ID of
the VRRP backup group and
the name of the interface on
which the VRRP backup
group resides.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup operation="create" >
<vrrpId>2</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrpType>normal</vrrpType>
<priority>100</priority>
<advertiseInterval>1000</advertiseInterval>
<preemptMode>true</preemptMode>
<delayTime>0</delayTime>
<authenticationMode>none</authenticationMode>
<linkBfdDownNum>1</linkBfdDownNum>
<v3SendMode>v2v3-both</v3SendMode>
<virtualIps>
<virtualIp operation="merge" >
<virtualIpAddress>2.2.2.100</virtualIpAddress>
</virtualIp>
</virtualIps>
</vrrpGroup>

Table 3-721 describes elements in requests.

Table 3-721 Elements

Element Description

vrrpId Specifies the ID of a VRRP backup


group.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 557


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

ifName Specifies the name of the interface on


which a VRRP backup group resides.

vrrpType Specifies the type of a VRRP backup


group.

priority Specifies a priority for a router in a


VRRP backup group. The value is an
integer ranging from 1 to 254. A larger
value indicates a higher priority.

advertiseInterval Specifies an interval at which VRRP


packets are sent, in milliseconds.

preemptMode Specifies a preemption mode.

delayTime Specifies a preemption delay, in seconds.

authenticationMode Specifies an authentication mode in


which the master and backup routers in
the VRRP backup group exchange VRRP
packets.
l Non-authentication
l Simple authentication
l MD5 authentication
Default value: non-authentication

linkBfdDownNum Specifies the maximum number of link


BFD sessions that trigger VRRP backup
group status changes.

v3SendMode Specifies the mode in which VRRP


packets are sent.

virtualIpAddress Specifies a virtual IP address.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-722 describes status codes in responses.

Table 3-722 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 558


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Modify a VRRP Backup Group


Operation URI Description

PUT /vrrp/vrrpGroups/vrrpGroup Modify information about a


VRRP backup group,
including the type of the
VRRP backup group and
configured priority.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup operation="merge" >
<vrrpId>2</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrpType>admin</vrrpType>
<adminIgnoreIfDown>true</adminIgnoreIfDown>
<priority>130</priority>
<advertiseInterval>3000</advertiseInterval>
<delayTime>3</delayTime>
<linkBfdDownNum>1</linkBfdDownNum>
<v3SendMode>v3-only</v3SendMode>
</vrrpGroup>

Table 3-723 describes elements in requests.

Table 3-723 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

vrrpType Specifies the type of a VRRP backup


group.

adminIgnoreIfDown Specifies that an mVRRP backup group


ignores an interface Down event.

priority Specifies a priority for a router in a


VRRP backup group. The value is an
integer ranging from 1 to 254. A larger
value indicates a higher priority.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 559


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

advertiseInterval Specifies an interval at which VRRP


packets are sent, in milliseconds.

delayTime Specifies a preemption delay, in seconds.

linkBfdDownNum Specifies the maximum number of link


BFD sessions that trigger VRRP backup
group status changes.

v3SendMode Specifies the mode in which VRRP


packets are sent.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-724 describes status codes in responses.

Table 3-724 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Delete a VRRP Backup Group


Operation URI Description

DELETE /vrrp/vrrpGroups/vrrpGroup Delete a VRRP backup


group.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup operation="delete">
<vrrpId>2</vrrpId>
<ifName>10GE1/0/1</ifName>
</vrrpGroup>

Table 3-725 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 560


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-725 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-726 describes status codes in responses.

Table 3-726 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.24.3.2 Virtual IP Address Configurations for a VRRP Backup Group

Query the Virtual IP Address of a VRRP Backup Group


Operation URI Description

GET /vrrp/vrrpGroups/vrrpGroup Query configurations for a


VRRP backup group to
track an interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<virtualIps>
<virtualIp>
<virtualIpAddress></virtualIpAddress>
</virtualIp>
</virtualIps>
</vrrpGroup>

Table 3-727 Describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 561


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-727 Describes elements in requests.


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

virtualIpAddress Virtual Ip address.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<vrrpId>1</vrrpId>
<virtualIps>
<virtualIp>
<virtualIpAddress>1.1.1.100</virtualIpAddress>
</virtualIp>
</virtualIps>
</vrrpGroup>

Table 3-728 Describes status codes in responses.

Table 3-728 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

virtualIpAddress Virtual Ip address.

Assign a Virtual IP Address to a VRRP Backup Group


Operation URI Description

POST /vrrp/vrrpGroups/vrrpGroup Configure a VRRP backup


group to track an interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup operation="merge" >
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<virtualIps>
<virtualIp operation="create" >
<virtualIpAddress>1.1.1.100</virtualIpAddress>
</virtualIp>
</virtualIps>
</vrrpGroup>

Table 3-729 Describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 562


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-729 Describes elements in requests.

Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

virtualIpAddress Virtual Ip address.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-730 Describes status codes in responses.

Table 3-730 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Delete the Virtual IP Address of a VRRP Backup Group


Operation URI Description

PUT /vrrp/vrrpGroups/vrrpGroup Delete configurations for a


VRRP backup group to
track an interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<virtualIps>
<virtualIp operation="delete">
<virtualIpAddress>1.1.1.100</virtualIpAddress>
</virtualIp>
</virtualIps>
</vrrpGroup>

Table 3-731 Describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 563


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-731 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

virtualIpAddress Virtual Ip address.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-732 Describes status codes in responses.

Table 3-732 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.24.3.3 Configurations for a VRRP Backup Group to Track an Interface

Query Configurations for a VRRP Backup Group to Track an Interface


Operation URI Description

GET /vrrp/vrrpGroups/vrrpGroup Query configurations for a


VRRP backup group to
track an interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrpTrackIntfs>
<vrrpTrackIntf>
<trackIfName></trackIfName>
<trackMode></trackMode>
<priorityChange></priorityChange>
</vrrpTrackIntf>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 564


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

</vrrpTrackIntfs>
</vrrpGroup>

Table 3-733 describes elements in requests.

Table 3-733 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

trackIfName Specifies the name of an interface tracked


by a VRRP backup group.

trackMode Specifies the tracking mode.

priorityChange Specifies the number by which the


priority is increased or decreased.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<vrrpId>1</vrrpId>
<vrrpTrackIntfs>
<vrrpTrackIntf>
<trackMode>reduce</trackMode>
<priorityChange>10</priorityChange>
<trackIfName>10GE1/0/2</trackIfName>
</vrrpTrackIntf>
</vrrpTrackIntfs>
</vrrpGroup>

Table 3-734 describes elements in responses.

Table 3-734 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

trackIfName Specifies the name of an interface tracked


by a VRRP backup group.

trackMode Specifies the tracking mode.

priorityChange Specifies the number by which the


priority is increased or decreased.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 565


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Configure a VRRP Backup Group to Track an Interface


Operation URI Description

POST /vrrp/vrrpGroups/vrrpGroup Configure a VRRP backup


group to track an interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup operation="merge">
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrpTrackIntfs>
<vrrpTrackIntf operation="create">
<trackIfName>10GE1/0/2</trackIfName>
<trackMode>reduce</trackMode>
<priorityChange>10</priorityChange>
</vrrpTrackIntf>
</vrrpTrackIntfs>
</vrrpGroup>

Table 3-735 describes elements in requests.

Table 3-735 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

trackIfName Specifies the name of an interface tracked


by a VRRP backup group.

trackMode Specifies the tracking mode.

priorityChange Specifies the number by which the


priority is increased or decreased.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-736 describes status codes in responses.

Table 3-736 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 566


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Modify Configurations for a VRRP Backup Group to Track an Interface


Operation URL Description

PUT /vrrp/vrrpGroups/vrrpGroup Modify configurations for a


VRRP backup group to
track an interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup operation="merge">
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrpTrackIntfs>
<vrrpTrackIntf operation="merge">
<trackIfName>10GE1/0/2</trackIfName>
<trackMode>reduce</trackMode>
<priorityChange>10</priorityChange>
</vrrpTrackIntf>
</vrrpTrackIntfs>
</vrrpGroup>

Table 3-737 describes elements in requests.

Table 3-737 Elements

Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

trackIfName Specifies the name of an interface tracked


by a VRRP backup group.

trackMode Specifies the tracking mode.

priorityChange Specifies the number by which the


priority is increased or decreased.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-738 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 567


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-738 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Delete Configurations for a VRRP Backup Group to Track an Interface


Operation URI Description

PUT /vrrp/vrrpGroups/vrrpGroup Delete configurations for a


VRRP backup group to
track an interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrpTrackIntfs>
<vrrpTrackIntf operation="delete">
<trackIfName>10GE1/0/2</trackIfName>
</vrrpTrackIntf>
</vrrpTrackIntfs>
</vrrpGroup>

Table 3-739 describes elements in requests.

Table 3-739 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

trackIfName Specifies the name of an interface tracked


by a VRRP backup group.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-740 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 568


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-740 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.24.3.4 Querying a Service VRRP Backup Group


Operation URI Description

GET /vrrp/vrrpGroups/vrrpGroup Query information about a


service VRRP backup group
bound to an mVRRP backup
group.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<memberVrrps>
<memberVrrp>
<vrrpId></vrrpId>
<ifName></ifName>
<state></state>
</memberVrrp>
</memberVrrps>
</vrrpGroup>

Table 3-741 describes elements in requests.

Table 3-741 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

state Specifies the status of a VRRP backup


group.

l Response example (XML format)

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 569


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<?xml version="1.0" encoding="UTF-8"?>


<vrrpGroup>
<vrrpId>1</vrrpId>
<memberVrrps>
<memberVrrp>
<ifName>10GE1/0/2</ifName>
<vrrpId>2</vrrpId>
<state>initialize</state>
</memberVrrp>
</memberVrrps>
</vrrpGroup>

Table 3-742 describes elements in responses.

Table 3-742 Elements

Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

state Specifies the status of a VRRP backup


group.

3.24.3.5 Querying a Member VRRP Backup Group Bound to an LBRG


Operation URI Description

GET /vrrp/vrrpGroups/vrrpGroup Query information about a


member VRRP backup
group bound to an LBRG.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<lbrgmemVrrps>
<lbrgmemVrrp>
<vrrpId></vrrpId>
<state></state>
</lbrgmemVrrp>
</lbrgmemVrrps>
</vrrpGroup>

Table 3-743 describes elements in requests.

Table 3-743 Elements

Element Description

vrrpId Specifies the ID of a VRRP backup


group.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 570


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

ifName Specifies the name of the interface on


which a VRRP backup group resides.

state Specifies the status of a VRRP backup


group.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<vrrpId>1</vrrpId>
<lbrgmemVrrps>
<lbrgmemVrrp>
<vrrpId>2</vrrpId>
<state>initialize</state>
</lbrgmemVrrp>
</lbrgmemVrrps>
</vrrpGroup>

Table 3-744 describes elements in responses.

Table 3-744 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

state Specifies the status of a VRRP backup


group.

3.24.3.6 Configurations for a VRRP Backup Group to Track an IP Route

Query Configurations for a VRRP Backup Group to Track an IP Route


Operation URI Description

GET /vrrp/vrrpGroups/vrrpGroup Query configurations for a


VRRP backup group to
track an IP route.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrpTrackIpRoutings>
<vrrpTrackIpRouting>
<vpnName></vpnName>
<ipAddress></ipAddress>
<ipMask></ipMask>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 571


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<priorityChange></priorityChange>
</vrrpTrackIpRouting>
</vrrpTrackIpRoutings>
</vrrpGroup>

Table 3-745 describes elements in requests.

Table 3-745 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

vpnName Specifies the name of the VPN instance


to which a tracked IP route belongs.

ipAddress Specifies the IP address of a tracked IP


route.

ipMask Specifies the IP address mask of a tracked


IP route.

priorityChange Specifies the number by which the


priority is increased or decreased.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<vrrpId>1</vrrpId>
<vrrpTrackIpRoutings>
<vrrpTrackIpRouting>
<ipAddress>1.1.1.100</ipAddress>
<ipMask>255.0.0.0</ipMask>
<vpnName>_public_</vpnName>
<priorityChange>20</priorityChange>
</vrrpTrackIpRouting>
</vrrpTrackIpRoutings>
</vrrpGroup>

Table 3-746 describes elements in responses.

Table 3-746 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

vpnName Specifies the name of the VPN instance


to which a tracked IP route belongs.

ipAddress Specifies the IP address of a tracked IP


route.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 572


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

ipMask Specifies the IP address mask of a tracked


IP route.

priorityChange Specifies the number by which the


priority is increased or decreased.

Configure a VRRP Backup Group to Track an IP Route


Operation URI Description

POST /vrrp/vrrpGroups/vrrpGroup Configure a VRRP backup


group to track an IP route.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup operation="merge">
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrpTrackIpRoutings>
<vrrpTrackIpRouting operation="create">
<vpnName>_public_</vpnName>
<ipAddress>1.1.1.100</ipAddress>
<ipMask>255.0.0.0</ipMask>
<priorityChange>20</priorityChange>
</vrrpTrackIpRouting>
</vrrpTrackIpRoutings>
</vrrpGroup>

Table 3-747 describes elements in requests.

Table 3-747 Elements

Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

vpnName Specifies the name of the VPN instance


to which a tracked IP route belongs.

ipAddress Specifies the IP address of a tracked IP


route.

ipMask Specifies the IP address mask of a tracked


IP route.

priorityChange Specifies the number by which the


priority is increased or decreased.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 573


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-748 describes status codes in responses.

Table 3-748 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Modify Configurations for a VRRP Backup Group to Track an IP Route


Operation URI Description

PUT /vrrp/vrrpGroups/vrrpGroup Modify configurations for a


VRRP backup group to
track an IP route.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrpTrackIpRoutings>
<vrrpTrackIpRouting operation="merge">
<vpnName>_public_</vpnName>
<ipAddress>1.1.1.100</ipAddress>
<ipMask>255.0.0.0</ipMask>
<priorityChange>30</priorityChange>
</vrrpTrackIpRouting>
</vrrpTrackIpRoutings>
</vrrpGroup>

Table 3-749 describes elements in requests.

Table 3-749 Elements

Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 574


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

vpnName Specifies the name of the VPN instance


to which a tracked IP route belongs.

ipAddress Specifies the IP address of a tracked IP


route.

ipMask Specifies the IP address mask of a tracked


IP route.

priorityChange Specifies the number by which the


priority is increased or decreased.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-750 describes status codes in responses.

Table 3-750 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Delete Configurations for a VRRP Backup Group to Track an IP Route


Operation URI Description

PUT /vrrp/vrrpGroups/vrrpGroup Delete configurations for a


VRRP backup group to
track an IP route.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrpTrackIpRoutings>
<vrrpTrackIpRouting operation="delete">
<vpnName>_public_</vpnName>
<ipAddress>1.1.1.100</ipAddress>
<ipMask>255.0.0.0</ipMask>
</vrrpTrackIpRouting>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 575


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

</vrrpTrackIpRoutings>
</vrrpGroup>

Table 3-751 describes elements in requests.

Table 3-751 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

vpnName Specifies the name of the VPN instance


to which a tracked IP route belongs.

ipAddress Specifies the IP address of a tracked IP


route.

ipMask Specifies the IP address mask of a tracked


IP route.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-752 describes status codes in responses.

Table 3-752 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 576


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.24.3.7 Configurations for a VRRP Backup Group to Track a Dynamic BFD


Session

Configurations for a VRRP Backup Group to Track a Dynamic BFD Session


Operation URI Description

GET /vrrp/vrrpGroups/vrrpGroup Query configurations for a


VRRP backup group to
track a dynamic BFD
session.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrpBfds>
<vrrpBfd>
<destAddr></destAddr>
<minTxInterval></minTxInterval>
<minRxInterval></minRxInterval>
<detectMultiplier></detectMultiplier>
</vrrpBfd>
</vrrpBfds>
</vrrpGroup>

Table 3-753 describes elements in requests.

Table 3-753 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

destAddr Specifies the destination IP address of a


tracked dynamic BFD session.

minTxInterval Specifies the minimum interval at which


the local device sends BFD control
packets.

minRxInterval Specifies the minimum interval at which


the local device receives BFD control
packets.

detectMultiplier Specifies the detection multiplier of a


tracked dynamic BFD session.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 577


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<vrrpId>1</vrrpId>
<vrrpBfds>
<vrrpBfd>
<destAddr>100.1.1.2</destAddr>
<minTxInterval>300</minTxInterval>
<minRxInterval>300</minRxInterval>
<detectMultiplier>3</detectMultiplier>
</vrrpBfd>
</vrrpBfds>
</vrrpGroup>

Table 3-754 describes elements in responses.

Table 3-754 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

destAddr Specifies the destination IP address of a


tracked dynamic BFD session.

minTxInterval Specifies the minimum interval at which


the local device sends BFD control
packets.

minRxInterval Specifies the minimum interval at which


the local device receives BFD control
packets.

detectMultiplier Specifies the detection multiplier of a


tracked dynamic BFD session.

Configure for a VRRP Backup Group to Track a Dynamic BFD Session


Operation URI Description

POST /vrrp/vrrpGroups/vrrpGroup Configure a VRRP backup


group to track a dynamic
BFD session.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup operation="merge">
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrpBfds>
<vrrpBfd operation="create">
<destAddr>100.1.1.2</destAddr>
<minTxInterval>300</minTxInterval>
<minRxInterval>300</minRxInterval>
<detectMultiplier>3</detectMultiplier>
</vrrpBfd>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 578


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

</vrrpBfds>
</vrrpGroup>

Table 3-755 describes elements in requests.

Table 3-755 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

destAddr Specifies the destination IP address of a


tracked dynamic BFD session.

minTxInterval Specifies the minimum interval at which


the local device sends BFD control
packets.

minRxInterval Specifies the minimum interval at which


the local device receives BFD control
packets.

detectMultiplier Specifies the detection multiplier of a


tracked dynamic BFD session.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-756 describes status codes in responses.

Table 3-756 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 579


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Modify Configurations for a VRRP Backup Group to Track a Dynamic BFD


Session
Operation URI Description

PUT /vrrp/vrrpGroups/vrrpGroup Modify configurations for a


VRRP backup group to
track a dynamic BFD
session.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrpBfds>
<vrrpBfd operation="merge">
<destAddr>100.1.1.2</destAddr>
<minTxInterval>400</minTxInterval>
<minRxInterval>400</minRxInterval>
<detectMultiplier>4</detectMultiplier>
</vrrpBfd>
</vrrpBfds>
</vrrpGroup>

Table 3-757 describes elements in requests.

Table 3-757 Elements

Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

destAddr Specifies the destination IP address of a


tracked dynamic BFD session.

minTxInterval Specifies the minimum interval at which


the local device sends BFD control
packets.

minRxInterval Specifies the minimum interval at which


the local device receives BFD control
packets.

detectMultiplier Specifies the detection multiplier of a


tracked dynamic BFD session.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-758 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 580


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-758 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Delete Configurations for a VRRP Backup Group to Track a Dynamic BFD


Session
Operation URI Description

PUT /vrrp/vrrpGroups/vrrpGroup Delete configurations for a


VRRP backup group to
track a dynamic BFD
session.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrpBfds>
<vrrpBfd operation="delete">
<destAddr>100.1.1.2</destAddr>
</vrrpBfd>
</vrrpBfds>
</vrrpGroup>

Table 3-759 describes elements in requests.

Table 3-759 Elements

Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

destAddr Specifies the destination IP address of a


tracked dynamic BFD session.

l Response example (XML format)

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 581


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<?xml version="1.0" encoding="UTF-8"?>


<ok/>

Table 3-760 describes status codes in responses.

Table 3-760 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.24.3.8 Configurations for a VRRP Backup Group to Track NQA

Query Configurations for a VRRP Backup Group to Track NQA


Operation URI Description

GET /vrrp/vrrpGroups/vrrpGroup Query configurations for a


VRRP backup group to
track NQA.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrpTrackNqas>
<vrrpTrackNqa>
<adminName></adminName>
<testName></testName>
<priorityChange></priorityChange>
</vrrpTrackNqa>
</vrrpTrackNqas>
</vrrpGroup>

Table 3-761 describes elements in requests.

Table 3-761 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 582


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

adminName Specifies the name of a tracked NQA


management group.

testName Specifies the name of a tracked NQA test


instance.

priorityChange Specifies the number by which the


priority is increased or decreased.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<vrrpId>1</vrrpId>
<vrrpTrackNqas>
<vrrpTrackNqa>
<adminName>admin</adminName>
<testName>test1</testName>
<priorityChange>20</priorityChange>
</vrrpTrackNqa>
</vrrpTrackNqas>
</vrrpGroup>

Table 3-762 describes elements in responses.

Table 3-762 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

adminName Specifies the name of a tracked NQA


management group.

testName Specifies the name of a tracked NQA test


instance.

priorityChange Specifies the number by which the


priority is increased or decreased.

Configure a VRRP Backup Group to Track NQA


Operation URI Description

POST /vrrp/vrrpGroups/vrrpGroup Configure a VRRP backup


group to track NQA.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup operation="merge">

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 583


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrpTrackNqas>
<vrrpTrackNqa operation="create">
<adminName>admin</adminName>
<testName>test1</testName>
<priorityChange>20</priorityChange>
</vrrpTrackNqa>
</vrrpTrackNqas>
</vrrpGroup>

Table 3-763 describes elements in requests.

Table 3-763 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

adminName Specifies the name of a tracked NQA


management group.

testName Specifies the name of a tracked NQA test


instance.

priorityChange Specifies the number by which the


priority is increased or decreased.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-764 describes status codes in responses.

Table 3-764 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 584


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Modify Configurations for a VRRP Backup Group to Track NQA


Operation URI Description

PUT /vrrp/vrrpGroups/vrrpGroup Modify configurations for a


VRRP backup group to
track NQA.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrpTrackNqas>
<vrrpTrackNqa operation="merge">
<adminName>admin</adminName>
<testName>test1</testName>
<priorityChange>20</priorityChange>
</vrrpTrackNqa>
</vrrpTrackNqas>
</vrrpGroup>

Table 3-765 describes elements in requests.

Table 3-765 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

adminName Specifies the name of a tracked NQA


management group.

testName Specifies the name of a tracked NQA test


instance.

priorityChange Specifies the number by which the


priority is increased or decreased.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-766 describes status codes in responses.

Table 3-766 Status codes


Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 585


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Delete Configurations for a VRRP Backup Group to Track NQA


Operation URI Description

PUT /vrrp/vrrpGroups/vrrpGroup Delete configurations for a


VRRP backup group to
track NQA.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrpTrackNqas>
<vrrpTrackNqa operation="delete">
<adminName>admin</adminName>
<testName>test1</testName>
</vrrpTrackNqa>
</vrrpTrackNqas>
</vrrpGroup>

Table 3-767 describes elements in requests.

Table 3-767 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

adminName Specifies the name of a tracked NQA


management group.

testName Specifies the name of a tracked NQA test


instance.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-768 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 586


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-768 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.24.3.9 Querying the Status Change Track of a VRRP Backup Group


Operation URI Description

GET /vrrp/vrrpGroups/vrrpGroup Query the status change


track of a VRRP backup
group.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<stateChanges>
<stateChange>
<index></index>
<sourceState></sourceState>
<destState></destState>
<changeReason></changeReason>
<changeTime></changeTime>
</stateChange>
</stateChanges>
</vrrpGroup>

Table 3-769 describes elements in requests.

Table 3-769 Elements

Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

index Specifies the sequence number.

sourceState Specifies the source status.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 587


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

destState Specifies the destination status.

changeReason Specifies the status change reason.

changeTime Specifies the status change time.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<vrrpId>1</vrrpId>
<stateChanges>
<stateChange>
<sourceState>Backup</sourceState>
<destState>Master</destState>
<changeReason>Protocol timer expired</changeReason>
<changeTime>2014-11-13T19:35:25</changeTime>
<index>1</index>
</stateChange>
</stateChanges>
</vrrpGroup>

Table 3-770 describes elements in responses.

Table 3-770 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

index Specifies the sequence number.

sourceState Specifies the source status.

destState Specifies the destination status.

changeReason Specifies the status change reason.

changeTime Specifies the status change time.

3.24.3.10 Query VRRP Packet Statistics


Operation URI Description

GET /vrrp/vrrpGroups/vrrpGroup Query VRRP packet


statistics.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<vrrpId>1</vrrpId>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 588


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<ifName>10GE1/0/1</ifName>
<vrrpStatistics>
<brcomeMaster></brcomeMaster>
<sendAdvertisement></sendAdvertisement>
<receiveAdvertisement></receiveAdvertisement>
<advertiseIntervalErrors></advertiseIntervalErrors>
<authenticationFailures></authenticationFailures>
<ipTtlErrors></ipTtlErrors>
<receivePriorityZero></receivePriorityZero>
<sendPriorityZero></sendPriorityZero>
<invalidTypePackets></invalidTypePackets>
<addressListErrors></addressListErrors>
<invalidAuthenticationType></invalidAuthenticationType>
<authenticationTypeMismatch></authenticationTypeMismatch>
<packetLengthErrors></packetLengthErrors>
<receiveSelfSend></receiveSelfSend>
</vrrpStatistics>
</vrrpGroup>

Table 3-771 describes elements in requests.

Table 3-771 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group resides.

brcomeMaster Specifies the number of times that a


router switches to the Master state.

sendAdvertisement Specifies the number of sent VRRP


advertisement packets.

receiveAdvertisement Specifies the number of received VRRP


advertisement packets.

advertiseIntervalErrors Specifies the number of VRRP


Advertisement packets with an incorrect
interval.

authenticationFailures Specifies the number of VRRP


Advertisement packets that fail to be
authenticated.

ipTtlErrors Specifies the number of VRRP


Advertisement packets with a TTL value
that is not equal to 255.

receivePriorityZero Specifies the number of received VRRP


Advertisement packets with a priority of
0.

sendPriorityZero Specifies the number of sent VRRP


Advertisement packets with a priority of
0.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 589


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

invalidTypePackets Specifies the number of VRRP


Advertisement packets with an invalid
Type field.

addressListErrors Specifies the number of VRRP


Advertisement packets with an incorrect
address list.

invalidAuthenticationType Specifies the number of VRRP


Advertisement packets with an invalid
authentication type.

authenticationTypeMismatch Specifies the number of VRRP


Advertisement packets with a
mismatching authentication type.

packetLengthErrors Specifies the number of VRRP


Advertisement packets with incorrect
length.

receiveSelfSend Specifies the number of VRRP


Advertisement packets received from
itself.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<ifName>10GE1/0/1</ifName>
<vrrpId>1</vrrpId>
<vrrpStatistics>
<brcomeMaster>2</brcomeMaster>
<sendAdvertisement>42317</sendAdvertisement>
<receiveAdvertisement>42315</receiveAdvertisement>
<advertiseIntervalErrors>0</advertiseIntervalErrors>
<packetLengthErrors>0</packetLengthErrors>
<ipTtlErrors>0</ipTtlErrors>
<invalidTypePackets>0</invalidTypePackets>
<addressListErrors>0</addressListErrors>
<authenticationTypeMismatch>0</authenticationTypeMismatch>
<invalidAuthenticationType>0</invalidAuthenticationType>
<authenticationFailures>0</authenticationFailures>
<receivePriorityZero>0</receivePriorityZero>
<sendPriorityZero>2</sendPriorityZero>
<receiveSelfSend>42315</receiveSelfSend>
</vrrpStatistics>
</vrrpGroup>

Table 3-772 describes elements in responses.

Table 3-772 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 590


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

ifName Specifies the name of the interface on


which a VRRP backup group resides.

brcomeMaster Specifies the number of times that a


router switches to the Master state.

sendAdvertisement Specifies the number of sent VRRP


advertisement packets.

receiveAdvertisement Specifies the number of received VRRP


advertisement packets.

advertiseIntervalErrors Specifies the number of VRRP


Advertisement packets with an incorrect
interval.

authenticationFailures Specifies the number of VRRP


Advertisement packets that fail to be
authenticated.

ipTtlErrors Specifies the number of VRRP


Advertisement packets with a TTL value
that is not equal to 255.

receivePriorityZero Specifies the number of received VRRP


Advertisement packets with a priority of
0.

sendPriorityZero Specifies the number of sent VRRP


Advertisement packets with a priority of
0.

invalidTypePackets Specifies the number of VRRP


Advertisement packets with an invalid
Type field.

addressListErrors Specifies the number of VRRP


Advertisement packets with an incorrect
address list.

invalidAuthenticationType Specifies the number of VRRP


Advertisement packets with an invalid
authentication type.

authenticationTypeMismatch Specifies the number of VRRP


Advertisement packets with a
mismatching authentication type.

packetLengthErrors Specifies the number of VRRP


Advertisement packets with incorrect
length.

receiveSelfSend Specifies the number of VRRP


Advertisement packets received from
itself.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 591


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.24.3.11 Configurations for a VRRP Backup Group to Track a BFD Session

Query Information About a VRRP Backup Group Tracking a BFD Session


Operation URI Description

GET /vrrp/vrrpGroups/vrrpGroup Query information about a


VRRP backup group
tracking a BFD session.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrpTrackBfds>
<vrrpTrackBfd>
<bfdSessionName>trackbfd</bfdSessionName>
<bfdSessionId></bfdSessionId>
<bfdType>normal</bfdType>
<trackMode></trackMode>
<priorityChange></priorityChange>
</vrrpTrackBfd>
</vrrpTrackBfds>
</vrrpGroup>

Table 1 describes elements in requests.

Table 3-773 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group is
configured.

bfdSessionName Specifies the name of a tracked BFD


session.

bfdSessionId Specifies the ID of a tracked BFD


session.

bfdType Specifies the type of a tracked BFD


session..

trackMode Specifies a mode in which a BFD session


is tracked.

priorityChange Specifies a value by which the priority is


increased or decreased.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 592


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup>
<vrrpId>1</vrrpId>
<vrrpTrackBfds>
<vrrpTrackBfd>
<bfdSessionId>1</bfdSessionId>
<trackMode>reduce</trackMode>
<priorityChange>10</priorityChange>
<bfdType>normal</bfdType>
<bfdSessionName>trackbfd</bfdSessionName>
</vrrpTrackBfd>
</vrrpTrackBfds>
</vrrpGroup>

Table 2 describes elements in responses.

Table 3-774 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group is
configured.

bfdSessionName Specifies the name of a tracked BFD


session.

bfdSessionId Specifies the ID of a tracked BFD


session.

bfdType Specifies the type of a tracked BFD


session.

trackMode Specifies a mode in which a BFD session


is tracked.

priorityChange Specifies a value by which the priority is


increased or decreased.

Configure a VRRP Backup Group to Track a BFD Session


Operation URI Description

POST /vrrp/vrrpGroups/vrrpGroup Configure a VRRP backup


group to track a BFD
session.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup operation="merge">
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrpTrackBfds>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 593


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<vrrpTrackBfd operation="create">
<bfdSessionName>trackbfd</bfdSessionName>
<bfdType>normal</bfdType>
<trackMode>reduce</trackMode>
<priorityChange>10</priorityChange>
</vrrpTrackBfd>
</vrrpTrackBfds>
</vrrpGroup>

Table 3 describes elements in requests.

Table 3-775 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group is
configured.

bfdSessionName Specifies the name of a tracked BFD


session.

bfdType Specifies the type of a tracked BFD


session.

trackMode Specifies a mode in which a BFD session


is tracked.

priorityChange Specifies a value by which the priority is


increased or decreased.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 4 describes status codes in responses.

Table 3-776 Status codes


Status Code Description

200 OK The operation is successful.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 594


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Modify Information About a VRRP Backup Group Tracking a BFD Session


Operation URI Description

PUT /vrrp/vrrpGroups/vrrpGroup Modify information about a


VRRP backup group
tracking a BFD session.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup operation="merge">
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrpTrackBfds>
<vrrpTrackBfd operation="merge">
<bfdSessionName>trackbfd</bfdSessionName>
<bfdType>normal</bfdType>
<trackMode>increase</trackMode>
<priorityChange>20</priorityChange>
</vrrpTrackBfd>
</vrrpTrackBfds>
</vrrpGroup>

Table 5 describes elements in requests.

Table 3-777 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group is
configured.

bfdSessionName Specifies the name of a tracked BFD


session.

bfdType Specifies the type of a tracked BFD


session.

trackMode Specifies a mode in which a BFD session


is tracked.

priorityChange Specifies a value by which the priority is


increased or decreased.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 6 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 595


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-778 Status codes


Status Code Description

200 OK The operation is successful.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Delete Information About a VRRP Backup Group Tracking a BFD Session


Operation URI Description

PUT /vrrp/vrrpGroups/vrrpGroup Delete information about a


VRRP backup group
tracking a BFD session.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrpGroup operation="merge">
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrpTrackBfds>
<vrrpTrackBfd operation="delete">
<bfdSessionName>trackbfd</bfdSessionName>
<bfdType>normal</bfdType>
</vrrpTrackBfd>
</vrrpTrackBfds>
</vrrpGroup>

Table 7 describes elements in requests.

Table 3-779 Elements


Element Description

vrrpId Specifies the ID of a VRRP backup


group.

ifName Specifies the name of the interface on


which a VRRP backup group is
configured.

bfdSessionName Specifies the name of a tracked BFD


session.

bfdType Specifies the type of a tracked BFD


session.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 596


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 8 describes status codes in responses.

Table 3-780 Status codes


Status Code Description

200 OK The operation is successful.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.24.4 Query VRRP Error Packets


Operation URI Description

GET /vrrp/errorPackets/ Query information about


errorPacket VRRP error packets,
including the interface name
and error reason.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<errorPacket>
<index></index>
<ifName></ifName>
<receiveTime></receiveTime>
<reason></reason>
<buffer></buffer>
</errorPacket>

Table 3-781 describes elements in requests.

Table 3-781 Elements


Element Description

index Specifies the sequence number.

ifName Specifies the interface name.

receiveTime Specifies the receive time.

reason Specifies the error reason.

buffer Specifies the packet data.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 597


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<errorPacket>
<ifName>10GE1/0/1</ifName>
<receiveTime>2014-11-13T16:44:37</receiveTime>
<reason>Vrid error</reason>
<buffer> 45c00008 1f030000 ff70b798 02020202 e0000012

31020000 012ccdd1 02020264 00000000 00000000

00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 0000000


</buffer>
<index>1</index>
</errorPacket>

Table 3-782 describes elements in responses.

Table 3-782 Elements

Element Description

index Specifies the sequence number.

ifName Specifies the interface name.

receiveTime Specifies the receive time.

reason Specifies the error reason.

buffer Specifies the packet data.

3.24.5 VRRP6 Interface Configurations

Query VRRP6 Interface Configurations


Operation URI Description

GET /vrrp/vrrp6Interfaces/ Query VRRP6 interface


vrrp6Interface configurations.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Interface>
<ifName></ifName>
<hopLimitCheckFlag></hopLimitCheckFlag>
<sendModeAll></sendModeAll>
<sendSubVlanId></sendSubVlanId>
<recoverDelay></recoverDelay>
</vrrp6Interface>

Table 3-783 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 598


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-783 Elements


Element Description

ifName Specifies the interface name.

hopLimitCheckFlag Specifies that the hop limit is checked.

sendModeAll Specifies that packets are sent to all sub-


VLANs.

sendSubVlanId Specifies that packets are sent to a


specified sub-VLAN.

recoverDelay Specifies the recovery delay, in seconds.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Interface>
<ifName>10GE1/0/1</ifName>
<hopLimitCheckFlag>true</hopLimitCheckFlag>
<sendSubVlanId>0</sendSubVlanId>
<sendModeAll>false</sendModeAll>
<recoverDelay>0</recoverDelay>
</vrrp6Interface>

Table 3-784 describes elements in responses.

Table 3-784 Elements


Element Description

ifName Specifies the interface name.

hopLimitCheckFlag Specifies that the hop limit is checked.

sendModeAll Specifies that packets are sent to all sub-


VLANs.

sendSubVlanId Specifies that packets are sent to a


specified sub-VLAN.

recoverDelay Specifies the recovery delay, in seconds.

Modify VRRP6 Interface Configurations


Operation URI Description

PUT /vrrp/vrrp6Interfaces/ Modify VRRP6 interface


vrrp6Interface configurations.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Interface operation="merge">
<ifName>10GE1/0/1</ifName>
<hopLimitCheckFlag>false</hopLimitCheckFlag>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 599


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<recoverDelay>2</recoverDelay>
</vrrp6Interface>

Table 3-785 describes elements in requests.

Table 3-785 Elements


Element Description

ifName Specifies the interface name.

hopLimitCheckFlag Specifies that the hop limit is checked.

recoverDelay Specifies the recovery delay, in seconds.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-786 describes status codes in responses.

Table 3-786 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Query VRRP6 Interface Packet Statistics


Operation URI Description

GET /vrrp/vrrp6Interfaces/ Query VRRP6 interface


vrrp6Interface packet statistics.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Interface>
<ifName>10GE1/0/1</ifName>
<vrrp6IfStatistics>
<ipProtocolErrors></ipProtocolErrors>
<destinationIpErrors></destinationIpErrors>
<checksumErrors></checksumErrors>
<versionErrors></versionErrors>
<vrrpIdErrors></vrrpIdErrors>
</vrrp6IfStatistics>
</vrrp6Interface>

Table 3-787 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 600


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-787 Elements


Element Description

ifName Specifies an interface name.

ipProtocolErrors Specifies the number of packets with an


incorrect IP protocol number.

destinationIpErrors Specifies the number of packets with an


incorrect destination IP address.

checksumErrors Specifies the number of packets with an


invalid checksum.

versionErrors Specifies the number of packets with an


unknown or unsupported version number.

vrrpIdErrors Specifies the number of packets with an


invalid VRRP backup group ID.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Interface>
<ifName>10GE1/0/1</ifName>
<vrrp6IfStatistics>
<ipProtocolErrors>0</ipProtocolErrors>
<destinationIpErrors>0</destinationIpErrors>
<checksumErrors>0</checksumErrors>
<versionErrors>0</versionErrors>
<vrrpIdErrors>0</vrrpIdErrors>
</vrrp6IfStatistics>
</vrrp6Interface>

Table 3-788 describes elements in responses.

Table 3-788 Elements


Element Description

ifName Specifies an interface name.

ipProtocolErrors Specifies the number of packets with an


incorrect IP protocol number.

destinationIpErrors Specifies the number of packets with an


incorrect destination IP address.

checksumErrors Specifies the number of packets with an


invalid checksum.

versionErrors Specifies the number of packets with an


unknown or unsupported version number.

vrrpIdErrors Specifies the number of packets with an


invalid VRRP backup group ID.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 601


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.24.6 VRRP6 Backup Group

3.24.6.1 VRRP6 Backup Group Configurations

Query a VRRP6 Backup Group


Operation URI Description

GET /vrrp/vrrp6Groups/ Query information about a


vrrp6Group VRRP6 backup group.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group>
<vrrpId></vrrpId>
<ifName></ifName>
<vrrp6Type></vrrp6Type>
<adminIgnoreIfDown></adminIgnoreIfDown>
<unflowdown></unflowdown>
<adminVrrpId></adminVrrpId>
<adminIfName></adminIfName>
<lbrgVrrpId></lbrgVrrpId>
<state></state>
<priority></priority>
<runPriority></runPriority>
<masterPriority></masterPriority>
<masterIp></masterIp>
<createTime></createTime>
<lchangeTime></lchangeTime>
<advertiseInterval></advertiseInterval>
<runAdvertiseInterval></runAdvertiseInterval>
<preemptMode></preemptMode>
<delayTime></delayTime>
<remainTime></remainTime>
<virtualMac></virtualMac>
</vrrp6Group>

Table 3-789 describes elements in requests.

Table 3-789 Elements


Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

vrrp6Type Specifies the type of a VRRP6 backup


group.

adminIgnoreIfDown Specifies that an mVRRP6 backup group


ignores an interface Down event.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 602


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

unflowdown Specifies that the Flowdown function is


disabled for a service VRRP6 backup
group.

adminVrrpId Specifies the ID of a bound mVRRP6


backup group.

adminIfName Specifies the name of the interface on


which a bound mVRRP6 backup group
resides.

lbrgVrrpId Specifies the ID of a VRRP6 LBRG.

state Specifies the status of a VRRP6 backup


group.

priority Specifies the configured priority of the


VRRP6 backup group.

runPriority Specifies the running priority of the


VRRP6 backup group.

masterPriority Specifies the priority of the master router


in the VRRP6 backup group.

masterIp Specifies the IP address of the master


router in the VRRP6 backup group.

createTime Specifies the time when the VRRP6


backup group was created.

lchangeTime Specifies the time when the status of the


VRRP6 backup group last changed.

advertiseInterval Specifies the configured interval at which


VRRP6 packets are sent, in milliseconds.

runAdvertiseInterval Specifies the running interval at which


VRRP6 packets are sent, in milliseconds.

preemptMode Specifies a preemption mode.

delayTime Specifies a preemption delay, in seconds.

remainTime Specifies the remaining preemption delay.

virtualMac Specifies the virtual MAC address of the


VRRP6 backup group.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group>
<ifName>10GE1/0/1</ifName>
<vrrpId>1</vrrpId>
<state>initialize</state>
<priority>100</priority>
<runPriority>100</runPriority>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 603


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<masterPriority>0</masterPriority>
<advertiseInterval>1000</advertiseInterval>
<runAdvertiseInterval>1000</runAdvertiseInterval>
<preemptMode>true</preemptMode>
<delayTime>0</delayTime>
<virtualMac>0000-5e00-0201</virtualMac>
<vrrp6Type>normal</vrrp6Type>
<adminVrrpId/>
<lbrgVrrpId/>
<adminIfName></adminIfName>
<adminIgnoreIfDown>false</adminIgnoreIfDown>
<unflowdown>false</unflowdown>
<masterIp>::</masterIp>
<remainTime>0</remainTime>
<createTime>2014-11-14T11:00:23</createTime>
<lchangeTime/>
</vrrp6Group>

Table 3-790 describes elements in responses.

Table 3-790 Elements


Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

vrrp6Type Specifies the type of a VRRP6 backup


group.

adminIgnoreIfDown Specifies that an mVRRP6 backup group


ignores an interface Down event.

unflowdown Specifies that the Flowdown function is


disabled for a service VRRP6 backup
group.

adminVrrpId Specifies the ID of a bound mVRRP6


backup group.

adminIfName Specifies the name of the interface on


which a bound mVRRP6 backup group
resides.

lbrgVrrpId Specifies the ID of a VRRP6 LBRG.

state Specifies the status of a VRRP6 backup


group.

priority Specifies the configured priority of the


VRRP6 backup group.

runPriority Specifies the running priority of the


VRRP6 backup group.

masterPriority Specifies the priority of the master router


in the VRRP6 backup group.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 604


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

masterIp Specifies the IP address of the master


router in the VRRP6 backup group.

createTime Specifies the time when the VRRP6


backup group was created.

lchangeTime Specifies the time when the status of the


VRRP6 backup group last changed.

advertiseInterval Specifies the configured interval at which


VRRP6 packets are sent, in milliseconds.

runAdvertiseInterval Specifies the running interval at which


VRRP6 packets are sent, in milliseconds.

preemptMode Specifies a preemption mode.

delayTime Specifies a preemption delay, in seconds.

remainTime Specifies the remaining preemption delay.

virtualMac Specifies the virtual MAC address of the


VRRP6 backup group.

Create a VRRP6 Backup Group


Operation URI Description

POST /vrrp/vrrp6Groups/ Create a VRRP6 backup


vrrp6Group group.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group operation="create">
<vrrpId>3</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrp6Type>normal</vrrp6Type>
<priority>100</priority>
<advertiseInterval>1000</advertiseInterval>
<preemptMode>true</preemptMode>
<delayTime>0</delayTime>
</vrrp6Group>

Table 3-791 describes elements in requests.

Table 3-791 Elements


Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 605


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

vrrp6Type Specifies the type of a VRRP6 backup


group.

priority Specifies a priority for a VRRP6 backup


group.

advertiseInterval Specifies an interval at which VRRP6


packets are sent, in milliseconds.

preemptMode Specifies a preemption mode.

delayTime Specifies a preemption delay, in seconds.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-792 describes elements in responses.

Table 3-792 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Modify a VRRP6 Backup Group


Operation URI Description

PUT /vrrp/vrrp6Groups/ Modify a VRRP6 backup


vrrp6Group group.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group operation="merge">
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrp6Type>admin</vrrp6Type>
<adminIgnoreIfDown>true</adminIgnoreIfDown>
<priority>120</priority>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 606


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<advertiseInterval>2000</advertiseInterval>
<delayTime>10</delayTime>
</vrrp6Group>

Table 3-793 describes elements in requests.

Table 3-793 Elements


Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

vrrp6Type Specifies the type of a VRRP6 backup


group.

adminIgnoreIfDown Specifies that an mVRRP6 backup group


ignores an interface Down event.

priority Specifies a priority for a VRRP6 backup


group.

advertiseInterval Specifies an interval at which VRRP6


packets are sent, in milliseconds.

preemptMode Specifies a preemption mode.

delayTime Specifies a preemption delay, in seconds.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-794 describes status codes in responses.

Table 3-794 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 607


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Delete a VRRP6 Backup Group


Operation URI Description

DELETE /vrrp/vrrp6Groups/ Delete a VRRP6 backup


vrrp6Group group.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group operation="delete">
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
</vrrp6Group>

Table 3-795 describes elements in requests.

Table 3-795 Elements


Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-796 describes status codes in responses.

Table 3-796 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 608


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.24.6.2 Virtual IP Address Configurations for a VRRP6 Backup Group

Query the Virtual IP Address of a VRRP6 Backup Group


Operation URI Description

GET /vrrp/vrrp6Groups/ Query the virtual IP address


vrrp6Group of a VRRP6 backup group.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<virtualIps>
<virtualIp>
<virtualIpAddress></virtualIpAddress>
</virtualIp>
</virtualIps>
</vrrp6Group>

Table 3-797 describes elements in requests.

Table 3-797 Elements


Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

virtualIpAddress Specifies the virtual IP address of a


VRRP6 backup group.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group>
<ifName>10GE1/0/1</ifName>
<vrrpId>1</vrrpId>
<virtualIps>
<virtualIp>
<virtualIpAddress>100:1::1:100</virtualIpAddress>
</virtualIp>
<virtualIp>
<virtualIpAddress>FE80::1</virtualIpAddress>
</virtualIp>
</virtualIps>
</vrrp6Group>

Table 3-798 describes elements in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 609


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-798 Elements


Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

virtualIpAddress Specifies the virtual IP address of a


VRRP6 backup group.

Assign a Virtual IP Address to a VRRP6 Backup Group


Operation URI Description

POST /vrrp/vrrp6Groups/ Assign a virtual IP address


vrrp6Group to a VRRP6 backup group.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group operation="merge">
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<virtualIps>
<virtualIp operation="create">
<virtualIpAddress>100:1::1:101</virtualIpAddress>
</virtualIp>
</virtualIps>
</vrrp6Group>

Table 3-799 describes elements in requests.

Table 3-799 Elements


Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

virtualIpAddress Specifies the virtual IP address of a


VRRP6 backup group.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-800 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 610


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-800 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Delete the Virtual IP Address of a VRRP6 Backup Group


Operation URI Description

PUT /vrrp/vrrp6Groups/ Delete the virtual IP address


vrrp6Group of a VRRP6 backup group.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<virtualIps>
<virtualIp operation="delete">
<virtualIpAddress>100:1::1:101</virtualIpAddress>
</virtualIp>
</virtualIps>
</vrrp6Group>

Table 3-801 describes elements in requests.

Table 3-801 Elements

Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

virtualIpAddress Specifies the virtual IP address of a


VRRP6 backup group.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-802 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 611


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-802 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.24.6.3 Configurations for a VRRP6 Backup Group to Track an Interface

Query Configurations for a VRRP6 Backup Group to Track an Interface


Operation URI Description

GET /vrrp/vrrp6Groups/ Query configurations for a


vrrp6Group VRRP6 backup group to
track an interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrp6TrackIntfs>
<vrrp6TrackIntf>
<trackIfName></trackIfName>
<trackMode></trackMode>
<priorityChange></priorityChange>
</vrrp6TrackIntf>
</vrrp6TrackIntfs>
</vrrp6Group>

Table 3-803 describes elements in requests.

Table 3-803 Elements

Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

trackIfName Specifies the name of a tracked interface.

trackMode Specifies the tracking mode.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 612


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

priorityChange Specifies the number by which the


priority is increased or decreased.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrp6TrackIntfs>
<vrrp6TrackIntf>
<trackIfName>10GE1/0/2</trackIfName>
<trackMode>reduce</trackMode>
<priorityChange>10</priorityChange>
</vrrp6TrackIntf>
</vrrp6TrackIntfs>
</vrrp6Group>

Table 3-804 describes elements in responses.

Table 3-804 Elements


Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

trackIfName Specifies the name of a tracked interface.

trackMode Specifies the tracking mode.

priorityChange Specifies the number by which the


priority is increased or decreased.

Configure a VRRP6 Backup Group to Track an Interface


Operation URI Description

POST /vrrp/vrrp6Groups/ Configure a VRRP6 backup


vrrp6Group group to track an interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group operation="merge">
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrp6TrackIntfs>
<vrrp6TrackIntf operation="create">
<trackIfName>10GE1/0/2</trackIfName>
<trackMode>reduce</trackMode>
<priorityChange>10</priorityChange>
</vrrp6TrackIntf>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 613


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

</vrrp6TrackIntfs>
</vrrp6Group>

Table 3-805 describes elements in requests.

Table 3-805 Elements


Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

trackIfName Specifies the name of a tracked interface.

trackMode Specifies the tracking mode.

priorityChange Specifies the number by which the


priority is increased or decreased.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-806 describes status codes in responses.

Table 3-806 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Modify Configurations for a VRRP6 Backup Group to Track an Interface


Operation URI Description

PUT /vrrp/vrrp6Groups/ Modify configurations for a


vrrp6Group VRRP6 backup group to
track an interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 614


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrp6TrackIntfs>
<vrrp6TrackIntf operation="merge">
<trackIfName>10GE1/0/2</trackIfName>
<trackMode>reduce</trackMode>
<priorityChange>20</priorityChange>
</vrrp6TrackIntf>
</vrrp6TrackIntfs>
</vrrp6Group>

Table 3-807 describes elements in requests.

Table 3-807 Elements


Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

trackIfName Specifies the name of a tracked interface.

trackMode Specifies the tracking mode.

priorityChange Specifies the number by which the


priority is increased or decreased.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-808 describes status codes in responses.

Table 3-808 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 615


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Delete Configurations for a VRRP6 Backup Group to Track an Interface


Operation URI Description

PUT /vrrp/vrrp6Groups/ Delete configurations for a


vrrp6Group VRRP6 backup group to
track an interface.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrp6TrackIntfs>
<vrrp6TrackIntf operation="delete">
<trackIfName>10GE1/0/2</trackIfName>
</vrrp6TrackIntf>
</vrrp6TrackIntfs>
</vrrp6Group>

Table 3-809 describes elements in requests.

Table 3-809 Elements

Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

trackIfName Specifies the name of a tracked interface.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-810 describes status codes in responses.

Table 3-810 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 616


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.24.6.4 Querying a Service VRRP6 Backup Group


Operation URI Description

GET /vrrp/vrrp6Groups/ Query a service VRRP6


vrrp6Group backup group.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<memberVrrp6s>
<memberVrrp6>
<vrrpId></vrrpId>
<ifName></ifName>
<state></state>
</memberVrrp6>
</memberVrrp6s>
</vrrp6Group>

Table 3-811 describes elements in requests.

Table 3-811 Elements


Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

state Specifies the status of a VRRP6 backup


group.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<memberVrrp6s>
<memberVrrp6>
<vrrpId>3</vrrpId>
<ifName>10GE1/0/2</ifName>
<state>master</state>
</memberVrrp6>
</memberVrrp6s>
</vrrp6Group>

Table 3-812 describes elements in responses.

Table 3-812 Elements


Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 617


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

state Specifies the status of a VRRP6 backup


group.

3.24.6.5 Querying a Member VRRP6 Backup Group Bound to an VRRP6 LBRG


Operation URI Description

GET /vrrp/vrrp6Groups/ Query information about a


vrrp6Group member VRRP6 backup
group bound to an VRRP6
LBRG.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<lbrgmemVrrp6s>
<lbrgmemVrrp6>
<vrrpId></vrrpId>
<state></state>
</lbrgmemVrrp6>
</lbrgmemVrrp6s>
</vrrp6Group>

Table 3-813 describes elements in requests.

Table 3-813 Elements


Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

state Specifies the status of a VRRP6 backup


group.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<lbrgmemVrrp6s>
<lbrgmemVrrp6>
<vrrpId>3</vrrpId>
<state>master</state>
</lbrgmemVrrp6>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 618


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

</lbrgmemVrrp6s>
</vrrp6Group>

Table 3-814 describes elements in responses.

Table 3-814 Elements


Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

state Specifies the status of a VRRP6 backup


group.

3.24.6.6 Configurations for a VRRP6 Backup Group to Track a BFD Session

Query Configurations for a VRRP6 Backup Group to Track a BFD Session


Operation URI Description

GET /vrrp/vrrp6Groups/ Query configurations for a


vrrp6Group VRRP6 backup group to
track a BFD session.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrp6TrackBfds>
<vrrp6TrackBfd>
<bfdSessionName></bfdSessionName>
<bfdSessionId></bfdSessionId>
<bfdType></bfdType>
<trackMode></trackMode>
<priorityChange></priorityChange>
</vrrp6TrackBfd>
</vrrp6TrackBfds>
</vrrp6Group>

Table 3-815 describes elements in requests.

Table 3-815 Elements


Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 619


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

bfdSessionName Specifies the name of a tracked BFD


session.

bfdSessionId Specifies the ID of a tracked BFD


session.

bfdType Specifies the type of a tracked BFD


session.

trackMode Specifies the mode in which a BFD


session is tracked.

priorityChange Specifies the number by which the


priority is increased or decreased.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group>
<ifName>10GE1/0/1</ifName>
<vrrpId>1</vrrpId>
<vrrp6TrackBfds>
<vrrp6TrackBfd>
<bfdSessionId>1</bfdSessionId>
<trackMode>reduce</trackMode>
<priorityChange>10</priorityChange>
<bfdType>normal</bfdType>
<bfdSessionName>trackbfd</bfdSessionName>
</vrrp6TrackBfd>
</vrrp6TrackBfds>
</vrrp6Group>

Table 3-816 describes elements in responses.

Table 3-816 Elements

Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

bfdSessionName Specifies the name of a tracked BFD


session.

bfdSessionId Specifies the ID of a tracked BFD


session.

bfdType Specifies the type of a tracked BFD


session.

trackMode Specifies the mode in which a BFD


session is tracked.

priorityChange Specifies the number by which the


priority is increased or decreased.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 620


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Configure a VRRP6 Backup Group to Track a BFD Session


Operation URI Description

POST /vrrp/vrrp6Groups/ Configure a VRRP6 backup


vrrp6Group group to track a BFD
session.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group operation="merge">
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrp6TrackBfds>
<vrrp6TrackBfd operation="create">
<bfdSessionName>trackbfd</bfdSessionName>
<bfdType>normal</bfdType>
<trackMode>reduce</trackMode>
<priorityChange>10</priorityChange>
</vrrp6TrackBfd>
</vrrp6TrackBfds>
</vrrp6Group>

Table 3-817 describes elements in requests.

Table 3-817 Elements


Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

bfdSessionName Specifies the name of a tracked BFD


session.

bfdType Specifies the type of a tracked BFD


session.

trackMode Specifies the mode in which a BFD


session is tracked.

priorityChange Specifies the number by which the


priority is increased or decreased.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-818 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 621


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-818 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Modify Configurations for a VRRP6 Backup Group to Track a BFD Session


Operation URI Description

PUT /vrrp/vrrp6Groups/ Modify configurations for a


vrrp6Group VRRP6 backup group to
track a BFD session.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrp6TrackBfds>
<vrrp6TrackBfd operation="merge">
<bfdSessionName>trackbfd</bfdSessionName>
<bfdType>normal</bfdType>
<trackMode>reduce</trackMode>
<priorityChange>10</priorityChange>
</vrrp6TrackBfd>
</vrrp6TrackBfds>
</vrrp6Group>

Table 3-819 describes elements in requests.

Table 3-819 Elements

Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

bfdSessionName Specifies the name of a tracked BFD


session.

bfdType Specifies the type of a tracked BFD


session.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 622


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

trackMode Specifies the mode in which a BFD


session is tracked.

priorityChange Specifies the number by which the


priority is increased or decreased.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-820 describes status codes in responses.

Table 3-820 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Delete Configurations for a VRRP6 Backup Group to Track a BFD Session


Operation URI Description

PUT /vrrp/vrrp6Groups/ Delete configurations for a


vrrp6Group VRRP6 backup group to
track a BFD session.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrp6TrackBfds>
<vrrp6TrackBfd operation="delete">
<bfdSessionName>trackbfd</bfdSessionName>
<bfdType>normal</bfdType>
</vrrp6TrackBfd>
</vrrp6TrackBfds>
</vrrp6Group>

Table 3-821 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 623


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-821 Elements


Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

bfdSessionName Specifies the name of a tracked BFD


session.

bfdType Specifies the type of a tracked BFD


session.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-822 describes status codes in responses.

Table 3-822 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.24.6.7 Querying the Status Change Track of a VRRP6 Backup Group


Operation URI Description

GET /vrrp/vrrp6Groups/ Query the status change


vrrp6Group track of a VRRP6 backup
group.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<stateChanges>
<stateChange>
<index></index>
<sourceState></sourceState>
<destState></destState>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 624


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<changeReason></changeReason>
<changeTime></changeTime>
</stateChange>
</stateChanges>
</vrrp6Group>

Table 3-823 describes elements in requests.

Table 3-823 Elements


Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

index Specifies the sequence number.

sourceState Specifies the source status.

destState Specifies the destination status.

changeReason Specifies the status change reason.

changeTime Specifies the status change time.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group>
<ifName>10GE1/0/1</ifName>
<vrrpId>1</vrrpId>
<stateChanges>
<stateChange>
<sourceState>Backup</sourceState>
<destState>Master</destState>
<changeReason>Protocol timer expired</changeReason>
<changeTime>2014-11-14T13:45:32</changeTime>
<index>1</index>
</stateChange>
<stateChange>
<sourceState>Initialize</sourceState>
<destState>Backup</destState>
<changeReason>Interface up</changeReason>
<changeTime>2014-11-14T13:45:29</changeTime>
<index>2</index>
</stateChange>
</stateChanges>
</vrrp6Group>

Table 3-824 describes elements in responses.

Table 3-824 Elements


Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 625


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

index Specifies the sequence number.

sourceState Specifies the source status.

destState Specifies the destination status.

changeReason Specifies the status change reason.

changeTime Specifies the status change time.

3.24.6.8 Querying VRRP6 Packet Statistics


Operation URI Description

GET /vrrp/vrrp6Groups/ Query VRRP6 packet


vrrp6Group statistics.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group>
<vrrpId>1</vrrpId>
<ifName>10GE1/0/1</ifName>
<vrrp6Statistics>
<becomeMaster></becomeMaster>
<sendAdvertisement></sendAdvertisement>
<receiveAdvertisement></receiveAdvertisement>
<advertiseIntervalErrors></advertiseIntervalErrors>
<authenticationFailures></authenticationFailures>
<ipTtlErrors></ipTtlErrors>
<receivePriorityZero></receivePriorityZero>
<sendPriorityZero></sendPriorityZero>
<invalidTypePackets></invalidTypePackets>
<addressListErrors></addressListErrors>
<invalidAuthenticationType></invalidAuthenticationType>
<authenticationTypeMismatch></authenticationTypeMismatch>
<packetLengthErrors></packetLengthErrors>
<receiveSelfSend></receiveSelfSend>
</vrrp6Statistics>
</vrrp6Group>

Table 3-825 describes elements in requests.

Table 3-825 Elements

Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

brcomeMaster Specifies the number of times that a


router switches to the Master state.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 626


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

sendAdvertisement Specifies the number of sent VRRP6


advertisement packets.

receiveAdvertisement Specifies the number of received VRRP6


advertisement packets.

advertiseIntervalErrors Specifies the number of VRRP6


Advertisement packets with an incorrect
interval.

authenticationFailures Specifies the number of VRRP6


Advertisement packets that fail to be
authenticated.

ipTtlErrors Specifies the number of VRRP6


Advertisement packets with a TTL value
that is not equal to 255.

receivePriorityZero Specifies the number of received VRRP6


Advertisement packets with a priority of
0.

sendPriorityZero Specifies the number of sent VRRP6


Advertisement packets with a priority of
0.

invalidTypePackets Specifies the number of VRRP6


Advertisement packets with an invalid
Type field.

addressListErrors Specifies the number of VRRP6


Advertisement packets with an incorrect
address list.

invalidAuthenticationType Specifies the number of VRRP6


Advertisement packets with an invalid
authentication type.

authenticationTypeMismatch Specifies the number of VRRP6


Advertisement packets with a
mismatching authentication type.

packetLengthErrors Specifies the number of VRRP6


Advertisement packets with incorrect
length.

receiveSelfSend Specifies the number of VRRP6


Advertisement packets received from
itself.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vrrp6Group>
<ifName>10GE1/0/1</ifName>
<vrrpId>1</vrrpId>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 627


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<vrrp6Statistics>
<becomeMaster>1</becomeMaster>
<sendAdvertisement>3904</sendAdvertisement>
<receiveAdvertisement>3904</receiveAdvertisement>
<advertiseIntervalErrors>0</advertiseIntervalErrors>
<packetLengthErrors>0</packetLengthErrors>
<ipTtlErrors>0</ipTtlErrors>
<invalidTypePackets>0</invalidTypePackets>
<addressListErrors>0</addressListErrors>
<authenticationTypeMismatch>0</authenticationTypeMismatch>
<invalidAuthenticationType>0</invalidAuthenticationType>
<authenticationFailures>0</authenticationFailures>
<receivePriorityZero>0</receivePriorityZero>
<sendPriorityZero>0</sendPriorityZero>
<receiveSelfSend>3904</receiveSelfSend>
</vrrp6Statistics>
</vrrp6Group>

Table 3-826 describes elements in responses.

Table 3-826 Elements


Element Description

vrrpId Specifies the ID of a VRRP6 backup


group.

ifName Specifies the name of the interface on


which a VRRP6 backup group resides.

brcomeMaster Specifies the number of times that a


router switches to the Master state.

sendAdvertisement Specifies the number of sent VRRP6


advertisement packets.

receiveAdvertisement Specifies the number of received VRRP6


advertisement packets.

advertiseIntervalErrors Specifies the number of VRRP6


Advertisement packets with an incorrect
interval.

authenticationFailures Specifies the number of VRRP6


Advertisement packets that fail to be
authenticated.

ipTtlErrors Specifies the number of VRRP6


Advertisement packets with a TTL value
that is not equal to 255.

receivePriorityZero Specifies the number of received VRRP6


Advertisement packets with a priority of
0.

sendPriorityZero Specifies the number of sent VRRP6


Advertisement packets with a priority of
0.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 628


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

invalidTypePackets Specifies the number of VRRP6


Advertisement packets with an invalid
Type field.

addressListErrors Specifies the number of VRRP6


Advertisement packets with an incorrect
address list.

invalidAuthenticationType Specifies the number of VRRP6


Advertisement packets with an invalid
authentication type.

authenticationTypeMismatch Specifies the number of VRRP6


Advertisement packets with a
mismatching authentication type.

packetLengthErrors Specifies the number of VRRP6


Advertisement packets with incorrect
length.

receiveSelfSend Specifies the number of VRRP6


Advertisement packets received from
itself.

3.24.6.9 Querying VRRP6 Error Packets


Operation URI Description

GET /vrrp/vrrp6ErrorPackets/ Query VRRP6 error packets.


vrrp6ErrorPacket

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<vrrp6ErrorPacket>
<index></index>
<ifName></ifName>
<receiveTime></receiveTime>
<reason></reason>
<buffer></buffer>
</vrrp6ErrorPacket>

Table 3-827 describes elements in requests.

Table 3-827 Elements


Element Description

index Specifies the sequence number.

ifName Specifies an interface name.

receiveTime Specifies the receive time.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 629


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

reason Specifies the error reason.

buffer Specifies the packet data.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<vrrp6ErrorPacket>
<ifName>10GE1/0/1</ifName>
<receiveTime>2014-11-14T16:22:06</receiveTime>
<reason>Checksum error</reason>
<buffer>6c000000 001870ff fe800000 00000000
3a13d0ff&#13;
fe210300 ff020000 00000000 00000000 00000012&#13;
31016401 006461c3 fe800000 00000000 00000000&#13;
00000002 00000000 00000000 00000000 00000000&#13;
00000000 00000000 00000000 00000000 00000000&#13;
00000000 00000000 00000000 00000000 00000000&#13;
00000000 00000000 00000000 00000000 00000000&#13;
00000000 00000000 00000000 00000000 00000000&#13;
00000000 00000000 00000000 00000000 00000000&#13;
00000000 00000000 00000000 00000000 00000000&#13;
00000000 00000000 00000000 00000000 00000000&#13;
00000000 00000000 00000000 00000000 00000000&#13;
00000000 00000000 00000000 00000000 00000000&#13;
00000000 00000000 00000000 00000000 00000000&#13;
00000000 00000000 00000000 00000000 00000000&#13;
00000000 00000000 00000000 00000000 00000000
</buffer>
<index>1</index>
</vrrp6ErrorPacket>

Table 3-828 describes elements in responses.

Table 3-828 Elements

Element Description

ifName Specifies an interface name.

ipProtocolErrors Specifies the number of packets with an


incorrect IP protocol number.

destinationIpErrors Specifies the number of packets with an


incorrect destination IP address.

checksumErrors Specifies the number of packets with an


invalid checksum.

versionErrors Specifies the number of packets with an


unknown or unsupported version number.

vrrpIdErrors Specifies the number of packets with an


invalid VRRP backup group ID.

3.25 IP Protocol Stack

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 630


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.25.1 Routes
Create a Static Route
Operation URI Description

POST /staticrt/staticrtbase/srRoutes Create a static route.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<srRoutes>
<srRoute>
<vrfName>_public_</vrfName>
<afType>ipv4unicast</afType>
<topologyName>base</topologyName>
<prefix>10.111.111.77</prefix>
<maskLength>24</maskLength>
<ifName>Ether3/0/0</ifName>
<destVrfName>_public_</destVrfName>
<nexthop>0.0.0.0</nexthop>
<description></description>
<preference></preference>
<tag></tag>
<bfdEnable>false</bfdEnable>
<sessionName></sessionName>
<trackNqaAdminName></trackNqaAdminName>
<trackNqaTestName></trackNqaTestName>
<isInheritCost>false</isInheritCost>
<isPermanent>false</isPermanent>
<trackEfmIfName>Invalid0</trackEfmIfName>
<isRelayHostRoute>false</isRelayHostRoute>
</srRoute>
</srRoutes>

Table 3-829 describes elements in requests.

Table 3-829 Elements in requests


Element Description

vrfName Specifies a VPN instance name.

afType Specifies an address family type.

topologyName Specifies a topology name.

prefix Specifies a destination network address.

maskLength Specifies a mask length.

ifName Specifies an outbound interface.

destVrfName Specifies the VPN instance name of the next


hop.

nexthop Specifies a next hop address.

description Specifies the description information.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 631


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

preference Specifies a priority.

tag Specifies the tag attribute.

bfdEnable Enables dynamic BFD.

sessionName Specifies a static BFD session name.

trackNqaAdminName Specifies the administrator name of an NQA


test instance.

trackNqaTestName Specifies an NQA test instance name.

isInheritCost Indicates that the cost of an iterated route is


inherited.

isPermanent Specifies whether a route is active


permanently.

trackEfmIfName Specifies an EFM interface name.

isRelayHostRoute Specifies whether a route is iterated to a


host route.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-830 describes status codes in responses.

Table 3-830 Description of status codes in responses

Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

Delete a Static Route


Operation URI Description

DELETE /staticrt/staticrtbase/srRoutes Delete a static route.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 632


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<srRoutes>
<srRoute>
<vrfName>_public_</vrfName>
<afType>ipv4unicast</afType>
<topologyName>base</topologyName>
<prefix>10.111.111.77</prefix>
<maskLength>24</maskLength>
<ifName>Ethernet3/0/1</ifName>
<destVrfName>_public_</destVrfName>
<nexthop>1.1.1.1</nexthop>
</srRoute>
</srRoutes>

Table 3-831 describes elements in requests.

Table 3-831 Elements in requests

Element Description

vrfName Specifies a VPN instance name.

afType Specifies an address family type.

topologyName Specifies a topology name.

prefix Specifies a destination network address.

maskLength Specifies a mask length.

ifName Specifies an outbound interface.

destVrfName Specifies the VPN instance name of the next


hop.

nexthop Specifies a next hop address.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-832 describes status codes in responses.

Table 3-832 Description of status codes in responses

Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 633


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Query Basic Route Information


Operation URI Description

GET /rm/rmbase/uniAfs/uniAf Query basic route


information.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<uniAf>
<vrfName></vrfName>
<afType>ipv4unicast</afType>
<topologys>
<topology>
<topologyName></topologyName>
<routes>
<route>
<prefix></prefix>
<maskLength></maskLength>
<protocolId></protocolId>
<preference></preference>
<cost></cost>
<flags></flags>
<nextHop></nextHop>
<ifName></ifName>
<relayNexthop></relayNexthop>
<processId></processId>
<frrType></frrType>
<directNexthop></directNexthop>
</route>
</routes>
</topology>
</topologys>
</uniAf>

Table 3-833 describes elements in requests.

Table 3-833 Elements in requests


Element Description

vrfName Specifies a VPN instance name.

afType Specifies an address family type.

topologyName Specifies a topology name.

prefix Specifies a destination network address.

maskLength Specifies a mask length.

protocolId Specifies a routing protocol.

preference Specifies a priority.

cost Specifies a route cost.

flags Specifies the route flag.

nextHop Specifies a next hop address.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 634


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

ifName Specifies an outbound interface.

relayNexthop Specifies the address of the route to which a


route is iterated.

processId Specifies the process ID of a routing


protocol.

frrType Specifies the FRR type.

directNexthop Specifies the address of the directly


connected next hop.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<uniAf>
<vrfName>_public_</vrfName>
<afType>ipv4unicast</afType>
<topologys>
<topology>
<topologyName>base</topologyName>
<routes>
<route>
<maskLength>32</maskLength>
<protocolId>Direct</protocolId>
<processId>0</processId>
<preference>0</preference>
<cost>0</cost>
<ifName>InLoopBack0</ifName>
<flags>D</flags>
<frrType>Primary</frrType>
<prefix>255.255.255.255</prefix>
<relayNexthop>0.0.0.0</relayNexthop>
<nextHop>127.0.0.1</nextHop>
<directNexthop>127.0.0.1</directNexthop>
</route>
</routes>
</topology>
</topologys>
</uniAf>

Table 3-834 describes elements in responses.

Table 3-834 Elements in responses

Element Description

vrfName Specifies a VPN instance name.

afType Specifies an address family type.

topologyName Specifies a topology name.

prefix Specifies a destination network address.

maskLength Specifies a mask length.

protocolId Specifies a routing protocol.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 635


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

preference Specifies a priority.

cost Specifies a route cost.

flags Specifies the route flag.

nextHop Specifies a next hop address.

ifName Specifies an outbound interface.

relayNexthop Specifies the address of the route to which a


route is iterated.

processId Specifies the process ID of a routing


protocol.

frrType Specifies the FRR type.

directNexthop Specifies the address of the directly


connected next hop.

Table 3-835 describes status codes in responses.

Table 3-835 Description of status codes in responses


Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

Create a Route Policy


Operation URI Description

edit-config:create /rtp/routePolicys Create a route policy.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<routePolicy>
<name>aa</name>
<routePolicyNodes>
<routePolicyNode operation="create">
<nodeSequence>10</nodeSequence>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 636


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<matchMode>permit</matchMode>
<description>aa</description>
</routePolicyNode>
</routePolicyNodes>
</routePolicy>

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<routePolicy>
<name>aa</name>
<routePolicyNodes>
<routePolicyNode>
<nodeSequence></nodeSequence>
<matchMode></matchMode>
<description></description>
</routePolicyNode>
</routePolicyNodes>
</routePolicy>

Table 3-836 describes elements in responses.

Table 3-836 Elements in responses


Element Description Value Range Mandatory/
Optional

name Specifies a policy The value is a string Mandatory


name. of 1 to 40 characters.

nodeSequence Specifies a node ID. The value is an Mandatory


integer ranging from
1 to 4294967295.
By default, the
number is increased
by 10 based on the
configuration
sequence. The initial
number is 10.
Note:
A maximum of
65535 indexes can
be configured for
each IP prefix list.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 637


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

matchMode This parameter Specifies a matching Optional


indicates the mode.
matching mode. permit: indicates
that an IP prefix list
is in permit mode. In
permit mode, if an
IP address is within
the defined range,
the address matches
the policy. If the IP
address is beyond
the defined range,
the IP address will
be matched against
the next node.

description Specifies the The value is a string Optional


description of a of 0 to 80 characters.
route policy.

Create an IP-prefix
Operation URI Description

edit-config:create /rtp/prefixFilters/prefixFilter Create an ip-prefix.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<prefixFilter operation="create">
<name>prefix</name>
<prefixFilterNodes>
<prefixfilternode operation="merge">
<nodesequence>10</nodesequence>
<matchmode>permit</matchmode>
<address>192.168.1.10</address>
<masklength>0</masklength>
</prefixfilternode>
</prefixFilterNodes>
</prefixFilter>

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<prefixFilter>
<name>prefix</name>
<prefixFilterNodes>
<prefixFilterNode>
<nodeSequence>10</nodeSequence>
<matchMode>permit</matchMode>
<address>192.168.1.10</address>
<maskLength>0</maskLength>
</prefixFilterNode>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 638


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

</prefixFilterNodes>
</prefixFilter>

Table 3-837 describes elements in responses.

Table 3-837 Elements in responses

Element Description Value Range Mandatory/


Optional

name Specifies the name The name is a string Mandatory


of an IP prefix. of 1 to 169 case-
sensitive characters,
with spaces and
question marks (?)
not supported.
The value must be
unique.

nodeSequence Specifies a node ID. The value is an Mandatory


integer ranging from
1 to 4294967295.
By default, the
number is increased
by 10 based on the
configuration
sequence. The initial
number is 10.
Note:
A maximum of
65535 indexes can
be configured for
each IP prefix list.

matchMode This parameter Specifies a matching Optional


indicates the mode.
matching mode. permit: indicates
that an IP prefix list
is in permit mode. In
permit mode, if an
IP address is within
the defined range,
the address matches
the policy. If the IP
address is beyond
the defined range,
the IP address will
be matched against
the next node.

address Specifies the IP The value is in Optional


address. dotted decimal
notation.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 639


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description Value Range Mandatory/


Optional

maskLength Specifies the mask The value is an Optional


length. integer ranging from
0 to 32.

matchNetwork Specifies to match Value: Optional


the network address. l true: Specifies to
match the
network address.
l false: Specifies
not to match the
network address.

greaterEqual The minimum value The value of greater- Optional


of the mask length. equal-value is
subject to the
following rule:
mask-length <=
greater-equal-value
<= less-equal-value
<= 32

lessEqual The maximum value The value of less- Optional


of the mask length. equal-value is
subject to the
following rule:
mask-length <=
greater-equal-value
<= less-equal-value
<= 32

3.25.2 DNS
Parsing the Domain Name
Operation URI Description

GET /dns/dnsNameResolution Obtains the IP address of a


host.

l Request example:
<?xml version='1.0' encoding='UTF-8'?>
<dnsNameResolution operation="merge">
<host>hostname.domain.com</host>
<addrType>1</addrType>
</dnsNameResolution>

Table 3-838 shows the description of elements in request.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 640


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-838 The description of elements in request


Element Description

host Name of the host to be parsed


(mandatory)

addrType Type of a host address. 1 indicates an


IPv4 address. (mandatory)

l Response example (XML format):


<?xml version='1.0' encoding='UTF-8'?>
<dnsNameResolution operation="merge">
<host>hostname.domain.com</host>
<addrType>1</addrType>
<ipv4Addr>10.0.0.2</ipv4Addr>
</dnsNameResolution>

Table 3-839 shows the description of elements in response.

Table 3-839 The description of elements in response


Element Description

host Name of the host to be parsed


(mandatory)

addrType Type of a host address. 1 indicates an


IPv4 address.

ipv4Addr IPv4 address corresponding to the domain


name

Table 3-840 shows the description of status codes in response.

Table 3-840 The description of status codes in response


Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented


because the request is incorrect in syntax
or the information attribute in the request
is incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 641


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Configuring an IPv4 DNS Server


Operation URI Description

POST /dns/dnsIpv4Servers Configures an IPv4 DNS


server.

DELETE /dns/dnsIpv4Servers Deletes an IPv4 DNS server.

l Request example:
<?xml version='1.0' encoding='UTF-8'?>
<dnsIpv4Servers operation="create">
<dnsIpv4Server>
<seqNo>1</seqNo>
<ipv4Addr>1.1.1.1</ipv4Addr>
</dnsIpv4Server>
</dnsIpv4Servers>

Table 3-841 shows the description of elements in request.

Table 3-841 The description of elements in request

Element Description

seqNo (Mandatory) DNS server sequence


number

ipv4Addr (Mandatory) IPv4 address of the DNS


server

l Response example (XML format):


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-842 shows the description of status codes in response.

Table 3-842 The description of status codes in response

Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented


because the request is incorrect in syntax
or the information attribute in the request
is incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 642


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Enabling DNS
Operation URI Description

PUT /dns/dnsGlobalCfgs/ Enables or disables DNS:


dnsGlobalCfg l true: DNS is enabled.
l false: DNS is disabled.

l Request example:
<?xml version='1.0' encoding='UTF-8'?>
<dnsGlobalCfg operation="merge">
<dnsEnable>true</dnsEnable>
</dnsGlobalCfg>

Table 3-843 shows the description of elements in request.

Table 3-843 The description of elements in request


Element Description

dnsEnable (Mandatory) Whether DNS is enabled

l Response example (XML format):


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-844 shows the description of status codes in response.

Table 3-844 The description of status codes in response


Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented


because the request is incorrect in syntax
or the information attribute in the request
is incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.25.3 Socket

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 643


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.25.3.1 Query Abnormal TCP Packets


Operation URI Description

GET /socket/SockTcpVers/ Query statistics abnormal


SockTcpVer TCP packets.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<SockTcpVer>
<type/>
<cksumErr/>
<fmtErr/>
<noPort/>
<mD5Err/>
<kCErr/>
</SockTcpVer>

Table 3-845 describes elements in requests.

Table 3-845 Elements


Element Description

type Specifies the protocol type. The value can


be BGP, LDP, TELNET, FTP, MSDP,
SSH, or Others. This element is
mandatory.

cksumErr Indicates statistics about packets with


checksum errors.

fmtErr Indicates statistics about packets in wrong


formats.

noPort Indicates statistics about packets whose


destination ports cannot be found.

mD5Err Indicates statistics about packets failing


MD5 authentication.

kCErr Indicates statistics about packets failing


keychain authentication.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<data>
<socket xmlns="http://www.huawei.com/netconf/vrp" format-version="1.0"
content-version="1.0">
<SockTcpVers>
<SockTcpVer>
<cksumErr>0</cksumErr>
<fmtErr>0</fmtErr>
<noPort>0</noPort>
<mD5Err>0</mD5Err>
<kCErr>0</kCErr>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 644


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<type>BGP</type>
</SockTcpVer>
<SockTcpVer>
<cksumErr>0</cksumErr>
<fmtErr>0</fmtErr>
<noPort>0</noPort>
<mD5Err>0</mD5Err>
<kCErr>0</kCErr>
<type>FTP</type>
</SockTcpVer>
<SockTcpVer>
<cksumErr>0</cksumErr>
<fmtErr>0</fmtErr>
<noPort>0</noPort>
<mD5Err>0</mD5Err>
<kCErr>0</kCErr>
<type>LDP</type>
</SockTcpVer>
<SockTcpVer>
<cksumErr>0</cksumErr>
<fmtErr>0</fmtErr>
<noPort>0</noPort>
<mD5Err>0</mD5Err>
<kCErr>0</kCErr>
<type>MSDP</type>
</SockTcpVer>
<SockTcpVer>
<cksumErr>0</cksumErr>
<fmtErr>0</fmtErr>
<noPort>0</noPort>
<mD5Err>0</mD5Err>
<kCErr>0</kCErr>
<type>TELNET</type>
</SockTcpVer>
<SockTcpVer>
<cksumErr>0</cksumErr>
<fmtErr>0</fmtErr>
<noPort>0</noPort>
<mD5Err>0</mD5Err>
<kCErr>0</kCErr>
<type>SSH</type>
</SockTcpVer>
<SockTcpVer>
<cksumErr>0</cksumErr>
<fmtErr>0</fmtErr>
<noPort>0</noPort>
<mD5Err>0</mD5Err>
<kCErr>0</kCErr>
<type>Others</type>
</SockTcpVer>
</SockTcpVers>
</socket>
</data>
</rpc-reply>

Table 3-846 describes elements in responses.

Table 3-846 Elements


Element Description

type Specifies the protocol type. The value can


be BGP, LDP, TELNET, FTP, MSDP,
SSH, or Others. This element is
mandatory.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 645


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

cksumErr Indicates statistics about packets with


checksum errors.

fmtErr Indicates statistics about packets in wrong


formats.

noPort Indicates statistics about packets whose


destination ports cannot be found.

mD5Err Indicates statistics about packets failing


MD5 authentication.

kCErr Indicates statistics about packets failing


keychain authentication.

3.25.3.2 Query the TCP Connection Status


Operation URI Description

GET /socket/SockTcpStatusess/ Query the TCP connection


SockTcpStatuses status.

l Request example
Request example
<?xml version="1.0" encoding="UTF-8"?>
<SockTcpStatuses>
<soFd/>
<pid/>
<type/>
<inpLAddr/>
<inpLPort/>
<inpFAddr/>
<inpFPort/>
<tcpState/>
</SockTcpStatuses>

Table 6-1 describes elements in requests.

Table 3-847 Elements in requests

Element Description

soFd Specifies a socket ID.

pid Specifies a CID.

type Specifies a protocol type.

inpLAddr Specifies a source address.

inpLPort Specifies a source port number.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 646


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

inpFAddr Specifies a destination address.

inpFPort Specifies a destination port number.

tcpState Specifies a TCP connection state.


LISTEN: The connection is listened to.
SYN_SENT: The device has sent a
synchronize (SYN) message and is waiting
for a matching SYN from the other device.
SYN_RECEIVED: The device has received
an SYN (connection request). It is now
waiting for an ACK to its SYN to complete
connection setup.
ESTABLISHED: The connection is set up.
CLOSE_WAIT: The device has received a
close request from the other device and is
waiting for an acknowledgement.
FIN_WAIT_1: The device is waiting for an
acknowledgement for an FIN it has sent or
is waiting for a connection termination
request from the other device.
CLOSING: The connection is being closed.
LAST_ACK: The device is waiting for a
final ACK to a close request.
FIN_WAIT_2: The device has received an
ACK for its request to terminate the
connection and is now waiting for a
matching FIN from the other device.
TIME_WAIT: The device has now received
a FIN from the other device and
acknowledged it, and sent its own FIN and
received an ACK for it.
CLOSED: The connection is closed.

l Response example (XML format)


Response example
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<data>
<socket xmlns="http://www.huawei.com/netconf/vrp" format-version="1.0"
content-version="1.0">
<SockTcpStatusess>
<SockTcpStatuses>
<type>IPv4</type>
<inpFAddr>0.0.0.0</inpFAddr>
<inpLAddr>0.0.0.0</inpLAddr>
<inpFPort>0</inpFPort>
<inpLPort>23</inpLPort>
<tcpState>LISTEN</tcpState>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 647


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<soFd>1</soFd>
<pid>0x80c82720</pid>
</SockTcpStatuses>
<SockTcpStatuses>
</socket>
</data>
</rpc-reply>

Table 3-848 describes elements in responses.

Table 3-848 Elements in responses


Element Description

soFd Specifies a socket ID.

pid Specifies a CID.

type Specifies a protocol type.

inpLAddr Specifies a source address.

inpLPort Specifies a source port number.

inpFAddr Specifies a destination address.

inpFPort Specifies a destination port number.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 648


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

tcpState Specifies a TCP connection state.


LISTEN: The connection is listened to.
SYN_SENT: The device has sent a
synchronize (SYN) message and is waiting
for a matching SYN from the other device.
SYN_RECEIVED: The device has received
an SYN (connection request). It is now
waiting for an ACK to its SYN to complete
connection setup.
ESTABLISHED: The connection is set up.
CLOSE_WAIT: The device has received a
close request from the other device and is
waiting for an acknowledgement.
FIN_WAIT_1: The device is waiting for an
acknowledgement for an FIN it has sent or
is waiting for a connection termination
request from the other device.
CLOSING: The connection is being closed.
LAST_ACK: The device is waiting for a
final ACK to a close request.
FIN_WAIT_2: The device has received an
ACK for its request to terminate the
connection and is now waiting for a
matching FIN from the other device.
TIME_WAIT: The device has now received
a FIN from the other device and
acknowledged it, and sent its own FIN and
received an ACK for it.
CLOSED: The connection is closed.

3.25.4 BGP

3.25.4.1 Query BGP Peer Information

Query BGP Peer Information in a VPN Instance


Operation URI Description

GET /bgp/bgpcomm/bgpVrfs/ Query BGP peer


bgpVrf/ information in a VPN
instance.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 649


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<bgpVrf>
<vrfName></vrfName>
<bgpPeers>
<bgpPeer>
<peerAddr></peerAddr>
<groupName></groupName>
<remoteAs></remoteAs>
</bgpPeer>
</bgpPeers>
</bgpVrf>

Table 3-849 describes elements in requests.

Table 3-849 Elements


Element Description

vrfName Specifies the name of a VPN instance.


This parameter is optional.

peerAddr Specifies the IP address of a BGP peer.


This parameter is optional.

groupName Specifies the name of a BGP peer group.


This parameter is optional.

remoteAs Specifies the AS number of a BGP peer.


This parameter is optional.

l Response example (XML format)


<?xml version='1.0' encoding='UTF-8'?>
<bgpVrf>
<vrfName>_public_</vrfName>
<bgpPeers>
<bgpPeer>
<peerAddr>1.1.1.1</peerAddr>
<remoteAs>100</remoteAs>
<groupName></groupName>
</bgpPeer>
</bgpPeers>
</bgpVrf>

Table 3-850 describes elements in responses.

Table 3-850 Elements


Element Description

vrfName Specifies a VPN instance name.

peerAddr Specifies the IP address of a BGP peer.

remoteAs Specifies the AS number of a BGP peer.

groupName Specifies the name of a BGP peer group.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 650


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-851 describes status codes in responses.

Table 3-851 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Query BGP Peer Information in a VPN Instance Address Family


Operation URI Description

GET /bgp/bgpcomm/bgpVrfs/ Query BGP peer


bgpVrf/ information in a VPN
instance address family.

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<bgpVrf>
<vrfName></vrfName>
<bgpVrfAFs>
<bgpVrfAF>
<afType></afType>
<peerAFs>
<peerAF>
<remoteAddress></remoteAddress>
<peerGroupName></peerGroupName>
</peerAF>
</peerAFs>
</bgpVrfAF>
</bgpVrfAFs>
</bgpVrf>

Table 3-852 describes elements in requests.

Table 3-852 Elements


Element Description

vrfName Specifies the name of a VPN instance.


This parameter is optional.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 651


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

afType Specifies the name of a VPN instance


address family, which can be
ipv4uni, ipv4multi, ipv4vpn, ipv4labelu
ni, ipv6uni, ipv6vpn, ipv4flow, l2vpnad
, evpn, or mvpn. The value range varies
with the version.

remoteAddress Specifies the IP address of a BGP peer.


This parameter is optional.

peerGroupName Specifies the name of a BGP peer group.


This parameter is optional.

l Response example (XML format)


<?xml version='1.0' encoding='UTF-8'?>
<bgpVrf>
<vrfName>_public_</vrfName>
<bgpVrfAFs>
<bgpVrfAF>
<afType>ipv4uni</afType>
<peerAFs>
<peerAF>
<remoteAddress>1.1.1.1</remoteAddress>
<peerGroupName></peerGroupName>
</peerAF>
</peerAFs>
</bgpVrfAF>
</bgpVrfAFs>
</bgpVrf>

Table 3-853 describes elements in responses.

Table 3-853 Elements


Element Description

vrfName Specifies a VPN instance name.

afType Specifies the VPN instance address


family. The value can be ipv4uni,
ipv4multi, ipv4vpn, ipv4labeluni,
ipv6uni, ipv6vpn, ipv4flow, l2vpnad,
evpn, or mvpn. The value range varies
with the version.

remoteAddress Specifies the IP address of a BGP peer.

peerGroupName Specifies the name of a BGP peer group.

Table 3-854 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 652


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-854 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.25.4.2 Enable BGP


Operation URI Description

POST /bgp/bgpcomm Enable BGP.

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<bgpcomm>
<bgpSite operation="merge">
<asNumber>100</asNumber>
<bgpEnable>true</bgpEnable>
</bgpSite>
</bgpcomm>

Table 3-855 describes elements in requests.

Table 3-855 Elements


Element Description

asNumber Specifies a local AS number. This


parameter is mandatory.

bgpEnable Enables or disables BGP. This parameter


is mandatory.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-856 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 653


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-856 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.25.4.3 Configure a BGP Address Family


Operation URI Description

POST /bgp/bgpcomm Configure a BGP address


family.

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<bgpcomm>
<bgpVrfs>
<bgpVrf operation="merge">
<vrfName>_public_</vrfName>
<keepaliveTime>30</keepaliveTime>
<holdTime>90</holdTime>
<bgpVrfAFs>
<bgpVrfAF operation="merge">
<afType>ipv4uni</afType>
<maximumLoadBalance>32</maximumLoadBalance>
<asPathNeglect>true</asPathNeglect>
<loadBalancingAsPathIgnore>true</
loadBalancingAsPathIgnore>
<importRoutes>
<importRoute operation="merge">
<importProtocol>direct</importProtocol>
<importProcessId>0</importProcessId>
</importRoute>
</importRoutes>
</bgpVrfAF>
</bgpVrfAFs>
</bgpVrf>
</bgpVrfs>
</bgpcomm>

Table 3-857 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 654


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-857 Elements


Element Description

vrfName Specifies the name of a VPN instance.


This parameter is mandatory.

keepaliveTime Specifies a timeout interval for the


keepalive timer. This parameter is
optional.

holdTime Specifies a timeout interval for the


holdTime timer. This parameter is
optional.

afType Specifies an address familiy type for an


instance. This parameter is mandatory.

maximumLoadBanlance Specifies the maximum number of load


balancing routes for the instance address
family. This parameter is optional.

asPathNeglect Controls whether to ignore the AS_Path


attribute in route selection. This
parameter is optional.

loadBanlancingAsPathIgnore Controls whether to ignore the AS_Path


attribute in the selection of load balancing
routes. This parameter is optional.

importProtocol Specifies the name of a protocol whose


routes are to be imported. This parameter
is mandatory if the importRoute
parameter is specified.

importProcessId Specifies the process ID of a protocol


whose routes are to be imported (this
parameter is valid only for IGPs.) This
parameter is mandatory if the
importRoute parameter is specified.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-858 describes status codes in responses.

Table 3-858 Status codes


Status Code Description

200 OK The operation succeeded.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 655


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.25.4.4 Configure a BGP Peer


Operation URI Description

POST /bgp/bgpcomm Configure a BGP peer.

l Request example
<?xml version='1.0' encoding='UTF-8'?>
<bgpcomm>
<bgpVrfs>
<bgpVrf operation="merge">
<vrfName>_public_</vrfName>
<bgpPeers>
<bgpPeer operation="merge">
<peerAddr>1.1.1.1</peerAddr>
<remoteAs>100</remoteAs>
<description>public</description>
</bgpPeer>
</bgpPeers>
<bgpVrfAFs>
<bgpVrfAF operation="merge">
<afType>ipv4uni</afType>
<peerAFs>
<peerAF operation="merge">
<remoteAddress>1.1.1.1</remoteAddress>
<keepAllRoutes>true</keepAllRoutes>
<allowAsLoopEnable>true</allowAsLoopEnable>
<importRtPolicyName>rtp1</importRtPolicyName>
<exportRtPolicyName>rtp1</exportRtPolicyName>
</peerAF>
</peerAFs>
</bgpVrfAF>
</bgpVrfAFs>
</bgpVrf>
</bgpVrfs>
</bgpcomm>

Table 3-859 describes elements in requests.

Table 3-859 Elements

Element Description

vrfName Specifies the name of a VPN instance.


This parameter is mandatory.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 656


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

peerAddr Specifies the IP address of a BGP peer.


This parameter is mandatory.

remoteAs Specifies a remote AS number. This


parameter is mandatory.

description Specifies the description of a BGP peer.


This parameter is optional.

afType Specifies an address familiy for an


instance. This parameter is mandatory.

remoteAddress Specifies the IP address of a BGP peer.


This parameter is mandatory.

keepAllRoutes Enables or disables the keep-all-routes


capability. This parameter is optional.

allowAsLoopEnable Allows or disallows duplicated AS


numbers. This parameter is optional.

importRtPolicyName Specifies the import policy of the BGP


peer. This parameter is optional.

exportRtPolicyName Specifies the export policy of the BGP


peer. This parameter is optional.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-860 describes status codes in responses.

Table 3-860 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.26 HWTACACS

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 657


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.26.1 Query HWTACACS Global Configuration


Operation URI Description

GET /hwtacacs/hwTacGlobalCfg Query HWTACACS global


configuration.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<hwTacGlobalCfg>
<isEnable/>
<totalTemplateNo/>
<totalSrvNo/>
</hwTacGlobalCfg>

Table 3-861 describes elements in requests.

Table 3-861 Elements


Element Description

isEnable Specifies the HWTACACS service status:


Enabled or Disabled.

totalTemplateNo Specifies the total number of templates


configured.

totalSrvNo Specifies the total number of servers


configured.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<hwTacGlobalCfg>
<isEnable>true</isEnable>
<totalSrvNo>0</totalSrvNo>
<totalTemplateNo>1</totalTemplateNo>
</hwTacGlobalCfg>

Table 3-862 describes elements in responses.

Table 3-862 Elements


Element Description

isEnable Specifies the HWTACACS service status:


Enabled or Disabled.

totalTemplateNo Specifies the total number of templates


configured.

totalSrvNo Specifies the total number of servers


configured.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 658


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-863 describes status codes in responses.

Table 3-863 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.26.2 HWTACACS Server Template Configuration

3.26.2.1 Create HWTACACS Server Templates


Operation URI Description

POST /hwtacacs/hwTacTempCfgs/ Create HWTACACS server


hwTacTempCfg templates.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<hwTacTempCfg>
<templateName>htipl</templateName>
<isDomainInclude>true</isDomainInclude>
<responseTimeout>3</responseTimeout>
<quietTime>10</quietTime>
<sharedKey> Huawei-13579</sharedKey>
<sourceIpAddress>10.1.1.1</sourceIpAddress>
</hwTacTempCfg>

Table 3-864 describes elements in requests.

Table 3-864 Elements

Element Description

templateNa Specifies the name of an HWTACACS server template.


me

isDomainIn Specifies whether to carry the domain name in a user name.


clude

responseTi Specifies a response timeout period. The value ranges from 1 to 300, in
meout seconds.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 659


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

quietTime Specifies a quiet timeout period. The value ranges from 1 to 255, in
minutes.

sharedKey Specifies a shared key. The value is a string of case-sensitive characters


that can be letters or digits. The password can be a string of 1 to 255
characters in plain text or a string of 20 to 392 characters in encrypted
text.

sourceIpAd Specifies the source IP address.


dress

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-865 describes status codes in responses.

Table 3-865 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.26.2.2 Query HWTACACS Server Template Configurations


Operation URI Description

GET /hwtacacs/hwTacTempCfgs/ Query HWTACACS server


hwTacTempCfg template configurations.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<hwTacTempCfg>
<templateName/>
<isDomainInclude/>
<responseTimeout/>
<quietTime/>
<sharedKey/>
<sourceIpAddress/>
<priAuthenSrv/>
<priAuthenPort/>
<curAuthenSrv/>
<secAuthenSrvNo/>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 660


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<curAuthenPort/>
<authenSrvOpenNo/>
<authenSrvClseNo/>
<authenReqNo/>
<authenRspNo/>
<authenUnknownNo/>
<authenTimeoutNo/>
<authenPktDropNo/>
<authenLoginNo/>
<authenSendNo/>
<authenSndPassNo/>
<authenAbortNo/>
<authenConnectNo/>
<authenRspErrNo/>
<authenRspFailNo/>
<authenFollowNo/>
<authenGetdataNo/>
<authenGetpassNo/>
<authenGetusrNo/>
<authenRspPassNo/>
<authenRestartNo/>
<authenPndreqNo/>
<authenRndTrpTim/>
<authenMalformNo/>
</hwTacTempCfg>

Table 3-866 describes elements in requests.

Table 3-866 Elements


Element Description

templateName Specifies the name of an HWTACACS


server template.

isDomainInclude Specifies whether to carry the domain


name in a user name.

responseTimeout Specifies a response timeout period. The


value ranges from 1 to 300, in seconds.

quietTime Specifies a quiet timeout period. The


value ranges from 1 to 255, in minutes.

sharedKey Specifies a shared key. The value is a


string of case-sensitive characters that can
be letters or digits. The password can be a
string of 1 to 255 characters in plain text
or a string of 20 to 392 characters in
encrypted text.

sourceIpAddress Specifies the source IP address.

priAuthenSrv Specifies the primary authentication


server.

priAuthenPort Specifies the primary authentication port.

curAuthenSrv Specifies the current authentication


server.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 661


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

secAuthenSrvNo Specifies the number of secondary


authentication servers configured.

curAuthenPort Specifies the current authentication port.

authenSrvOpenNo Specifies the number of started


authentication servers.

authenSrvClseNo Specifies the number of stopped


authentication servers.

authenReqNo Specifies the number of authentication


request packets.

authenRspNo Specifies the number of authentication


response packets.

authenUnknownNo Specifies the number of unknown


authentication packets.

authenTimeoutNo Specifies an authentication timeout


interval, in seconds.

authenPktDropNo Specifies the number of authentication


packets dropped.

authenLoginNo Specifies the number of authentication


login attempts.

authenSendNo Specifies the number of authentication


sending times.

authenSndPassNo Specifies the number of times


authentication is passed.

authenAbortNo Specifies the number of times


authentication is aborted.

authenConnectNo Specifies the number of authentication


connections.

authenRspErrNo Specifies the number of authentication


response errors.

authenRspFailNo Specifies the number of authentication


response failures.

authenFollowNo Specifies the number of consecutive


authentication responses.

authenGetdataNo Specifies the authentication query data


count.

authenGetpassNo Specifies the number of authentication


query passing times.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 662


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

authenGetusrNo Specifies the number of authentication


query users.

authenRspPassNo Specifies the number of authentication


response passing times.

authenRestartNo Specifies the number of authentication


restarts.

authenPndreqN Specifies the number of authentication


pending requests.

authenRndTrpTim Specifies the authentication round trip


count.

authenMalformNo Specifies the number of malformed


authentication packets.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<hwTacTempCfg>
<templateName>htipl</templateName>
<isDomainInclude>true</isDomainInclude>
<responseTimeout>5</responseTimeout>
<responseTimeout>3</responseTimeout>
<quietTime>5</quietTime>
<sourceIpAddress>10.1.1.1</sourceIpAddress>
<curAuthenSrv>0.0.0.0</curAuthenSrv>
<curAuthenPort>0</curAuthenPort>
<secAuthenSrvNo>0</secAuthenSrvNo>
<priAuthenSrv>0.0.0.0</priAuthenSrv>
<priAuthenPort>0</priAuthenPort>
<authenSndPassNo>0</authenSndPassNo>
<authenFollowNo>0</authenFollowNo>
<authenSrvOpenNo>0</authenSrvOpenNo>
<authenRspNo>0</authenRspNo>
<authenUnknownNo>0</authenUnknownNo>
<authenRspErrNo>0</authenRspErrNo>
<authenRspPassNo>0</authenRspPassNo>
<authenGetusrNo>0</authenGetusrNo>
<authenGetdataNo>0</authenGetdataNo>
<authenSrvClseNo>0</authenSrvClseNo>
<authenRspFailNo>0</authenRspFailNo>
<authenTimeoutNo>0</authenTimeoutNo>
<authenPndreqNo>0</authenPndreqNo>
<authenMalformNo>0</authenMalformNo>
<authenRndTrpTim>0</authenRndTrpTim>
<authenPktDropNo>0</authenPktDropNo>
<authenAbortNo>0</authenAbortNo>
<authenConnectNo>0</authenConnectNo>
<authenSendNo>0</authenSendNo>
<authenLoginNo>0</authenLoginNo>
<authenReqNo>0</authenReqNo>
<authenRestartNo>0</authenRestartNo>
<authenGetpassNo>0</authenGetpassNo>
</hwTacTempCfg>

Table 3-867 describes elements in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 663


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-867 Elements


Element Description

templateName Specifies the name of an HWTACACS


server template.

isDomainInclude Specifies whether to carry the domain


name in a user name.

responseTimeout Specifies a response timeout period. The


value ranges from 1 to 300, in seconds.

quietTime Specifies a quiet timeout period. The


value ranges from 1 to 255, in minutes.

sharedKey Specifies a shared key. The value is a


string of case-sensitive characters that can
be letters or digits. The password can be a
string of 1 to 255 characters in plain text
or a string of 20 to 392 characters in
encrypted text.

sourceIpAddress Specifies the source IP address.

priAuthenSrv Specifies the primary authentication


server.

priAuthenPort Specifies the primary authentication port.

curAuthenSrv Specifies the current authentication


server.

secAuthenSrvNo Specifies the number of secondary


authentication servers configured.

curAuthenPort Specifies the current authentication port.

authenSrvOpenNo Specifies the number of started


authentication servers.

authenSrvClseNo Specifies the number of stopped


authentication servers.

authenReqNo Specifies the number of authentication


request packets.

authenRspNo Specifies the number of authentication


response packets.

authenUnknownNo Specifies the number of unknown


authentication packets.

authenTimeoutNo Specifies an authentication timeout


interval, in seconds.

authenPktDropNo Specifies the number of authentication


packets dropped.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 664


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

authenLoginNo Specifies the number of authentication


login attempts.

authenSendNo Specifies the number of authentication


sending times.

authenSndPassNo Specifies the number of times


authentication is passed.

authenAbortNo Specifies the number of times


authentication is aborted.

authenConnectNo Specifies the number of authentication


connections.

authenRspErrNo Specifies the number of authentication


response errors.

authenRspFailNo Specifies the number of authentication


response failures.

authenFollowNo Specifies the number of consecutive


authentication responses.

authenGetdataNo Specifies the authentication query data


count.

authenGetpassNo Specifies the number of authentication


query passing times.

authenGetusrNo Specifies the number of authentication


query users.

authenRspPassNo Specifies the number of authentication


response passing times.

authenRestartNo Specifies the number of authentication


restarts.

authenPndreqN Specifies the number of authentication


pending requests.

authenRndTrpTim Specifies the authentication round trip


count.

authenMalformNo Specifies the number of malformed


authentication packets.

Table 3-868 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 665


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-868 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.26.2.3 Modify HWTACACS Server Templates


Operation URI Description

PUT /hwtacacs/hwTacTempCfgs/ Modify HWTACACS server


hwTacTempCfg templates.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<hwTacTempCfg>
<templateName>htipl</templateName>
<isDomainInclude>true</isDomainInclude>
<responseTimeout>3</responseTimeout>
<quietTime>10</quietTime>
<sharedKey>Huawei-12345</sharedKey>
<sourceIpAddress>10.1.1.1</sourceIpAddress>
</hwTacTempCfg>

Table 3-869 describes elements in requests.

Table 3-869 Elements


Element Description

templateNa Specifies the name of an HWTACACS server template. (Mandatory)


me

isDomainIn Specifies whether to carry the domain name in a user name.


clude

responseTi Specifies a response timeout period. The value ranges from 1 to 300, in
meout seconds.

quietTime Specifies a quiet timeout period. The value ranges from 1 to 255, in
minutes.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 666


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

sharedKey Specifies a shared key. The value is a string of case-sensitive characters


that can be letters or digits. The password can be a string of 1 to 255
characters in plain text or a string of 20 to 392 characters in encrypted
text.

sourceIpAd Specifies the source IP address.


dress

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-870 describes status codes in responses.

Table 3-870 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.26.2.4 Delete HWTACACS Server Templates


Operation URI Description

DELETE /hwtacacs/hwTacTempCfgs/ Delete configured


hwTacTempCfg HWTACACS server
templates.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<hwTacTempCfg>
<templateName>htipl3</templateName>
</hwTacTempCfg>

Table 3-871 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 667


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-871 Elements


Element Description

templateNa Specifies the name of an HWTACACS server template.


me

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-872 describes status codes in responses.

Table 3-872 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.26.3 HWTACACS Server Configuration

3.26.3.1 Create HWTACACS Server Objects


Operation URI Description

POST /hwtacacs/hwTacTempCfgs/ Create HWTACACS server


hwTacTempCfg/ objects.
hwTacSrvCfgs/ NOTE
hwTacSrvCfg Server objects must be
managed based on the
corresponding template object.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<hwTacSrvCfg>
<serverIpAddress> 10.1.1.2</serverIpAddress>
<serverPort>1010</serverPort>
<serverType>Authentication</serverType>
<isSecondaryServer>true</isSecondaryServer>
<isMuxModeEnable>true</isMuxModeEnable>
<sharedKey>keyabc</sharedKey>
<vpnName>abcd</vpnName>
<isPublicNet>false</isPublicNet>
</hwTacSrvCfg>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 668


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-873 describes elements in requests.

Table 3-873 Elements


Element Description

serverIpAdd Specifies the IP address of a server. (Mandatory)


ress

serverPort Specifies a server port. The value is an integer ranging from 1 to


65535.

serverType Specifies the server type. (Mandatory)

isSecondary Specifies whether the server is a secondary server. (Mandatory)


Server

isMuxMode Specifies whether to use the multiplexing mode.


Enable

sharedKey Specifies a shared key.

vpnName Specifies a VPN instance name. The value is a string of 1 to 31


characters. (Mandatory)

isPublicNet Specifies whether to connect to the public network. (Mandatory)

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-874 describes status codes in responses.

Table 3-874 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 669


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.26.3.2 Query HWTACACS Server Configurations


Operation URI Description

GET /hwtacacs/hwTacTempCfgs/ Query HWTACACS server


hwTacTempCfg/ configurations.
hwTacSrvCfgs/ NOTE
hwTacSrvCfg Server objects must be
managed based on the
corresponding template object.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<hwTacSrvCfg>
<serverIpAddress/>
<serverPort/>
<serverType/>
<isSecondaryServer/>
<isMuxModeEnable/>
<serverCurrentState/>
<isCurrentSrv/>
<sharedKey/>
<vpnName/>
<isPublicNet/>
<authenSrvOpenNo/>
<authenSrvClseNo/>
<authenReqNo/>
<authenRspNo/>
</hwTacSrvCfg>

Table 3-875 describes elements in requests.

Table 3-875 Elements

Element Description

serverIpAddress Specifies the IP address of a server.

serverPort Specifies a server port.

serverType Specifies the server type: Authentication,


Authorization, Accounting, and
Common.

isSecondaryServer Specifies whether the server is a


secondary server.

isMuxModeEnable Specifies whether to use the multiplexing


mode.

serverCurrentState Specifies the current server status:


Active, Down

isCurrentSrv Specifies whether a server is the current


server.

sharedKey Specifies a shared key.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 670


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

vpnName Specifies a VPN instance name.

isPublicNet Specifies whether to connect to the public


network.

authenSrvOpenNo Specifies the number of started


authentication servers.

authenSrvClseNo Specifies the number of stopped


authentication servers.

authenReqNo Specifies the number of authentication


request packets.

authenRspNo Specifies the number of authentication


response packets.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<hwTacSrvCfg>
<serverIpAddress>10.1.1.2</serverIpAddress>
<serverType>Authentication</serverType>
<isSecondaryServer>true</isSecondaryServer>
<serverPort>1010</serverPort>
<isMuxModeEnable>true</isMuxModeEnable>
<serverCurrentState>Up</serverCurrentState>
<isCurrentSrv>true</isCurrentSrv>
<authenReqNo>0</authenReqNo>
<authenRspNo>0</authenRspNo>
<authenSrvOpenNo>0</authenSrvOpenNo>
<authenSrvClseNo>0</authenSrvClseNo>
<sharedKey></sharedKey>
<vpnName>_public_</vpnName>
<isPublicNet>false</isPublicNet>
</hwTacSrvCfg>

Table 3-876 describes elements in responses.

Table 3-876 Elements


Element Description

serverIpAddress Specifies the IP address of a server.

serverPort Specifies a server port.

serverType Specifies the server type: Authentication,


Authorization, Accounting, and
Common.

isSecondaryServer Specifies whether the server is a


secondary server.

isMuxModeEnable Specifies whether to use the multiplexing


mode.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 671


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

serverCurrentState Specifies the current server status:


Active, Down

isCurrentSrv Specifies whether a server is the current


server.

sharedKey Specifies a shared key.

vpnName Specifies a VPN instance name.

isPublicNet Specifies whether to connect to the public


network.

authenSrvOpenNo Specifies the number of started


authentication servers.

authenSrvClseNo Specifies the number of stopped


authentication servers.

authenReqNo Specifies the number of authentication


request packets.

authenRspNo Specifies the number of authentication


response packets.

Table 3-877 describes status codes in responses.

Table 3-877 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 672


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.26.3.3 Modify HWTACACS Server Objects


Operation URI Description

PUT /hwtacacs/hwTacTempCfgs/ Modify HWTACACS server


hwTacTempCfg/ objects.
hwTacSrvCfgs/ NOTE
hwTacSrvCfg Server objects must be
managed based on the
corresponding template object.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<hwTacSrvCfg>
<serverIpAddress> 10.1.1.2</serverIpAddress>
<serverPort>1010</serverPort>
<serverType>Authentication</serverType>
<isSecondaryServer>true</isSecondaryServer>
<isMuxModeEnable>true</isMuxModeEnable>
<sharedKey>keyabc</sharedKey>
<vpnName>abcd</vpnName>
<isPublicNet>false</isPublicNet>
</hwTacSrvCfg>

Table 3-878 describes elements in requests.

Table 3-878 Elements


Element Description

serverIpAdd Specifies the IP address of a server. (Mandatory)


ress

serverPort Specifies a server port. The value is an integer ranging from 1 to


65535.

serverType Specifies the server type. (Mandatory)

isSecondary Specifies whether the server is a secondary server. (Mandatory)


Server

isMuxMode Specifies whether to use the multiplexing mode.


Enable

sharedKey Specifies a shared key.

vpnName Specifies a VPN instance name. The value is a string of 1 to 31


characters. (Mandatory)

isPublicNet Specifies whether to connect to the public network. (Mandatory)

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-879 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 673


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-879 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.26.3.4 Delete HWTACACS Server Objects


Operation URI Description

DELETE /hwtacacs/hwTacTempCfgs/ Delete configured


hwTacTempCfg/ HWTACACS server objects.
hwTacSrvCfgs/ NOTE
hwTacSrvCfg Server objects must be
managed based on the
corresponding template object.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<hwTacSrvCfg>
<serverIpAddress> 10.1.1.2</serverIpAddress>
<serverType>Authentication</serverType>
<isSecondaryServer>true</isSecondaryServer>
<vpnName>_public_</vpnName>
<isPublicNet>false</isPublicNet>
</hwTacSrvCfg>

Table 3-880 describes elements in requests.

Table 3-880 Elements

Element Description

serverIpAdd Specifies the IP address of a server.


ress

serverType Specifies the server type.

isSecondary Specifies whether the server is a secondary server.


Server

vpnName Specifies a VPN instance name.

isPublicNet Specifies whether to connect to the public network.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 674


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-881 describes status codes in responses.

Table 3-881 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.26.4 HWTACACS IPv6 Server Configuration

3.26.4.1 Create HWTACACS IPv6 Server Objects


Operation URI Description

POST /hwtacacs/hwTacTempCfgs/ Create HWTACACS IPv6


hwTacTempCfg/ server objects.
hwTacIpv6SrvCfgs/ NOTE
hwTacIpv6SrvCfg IPv6 server objects must be
managed based on the
corresponding template object.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<hwTacIpv6SrvCfg>
<serverIpAddress> 2001:db8::1</serverIpAddress>
<serverPort>1010</serverPort>
<serverType>Authentication</serverType>
<isSecondaryServer>false</isSecondaryServer>
<isMuxModeEnable>true</isMuxModeEnable>
<sharedKey>keyabc</sharedKey>
<vpnName> abc</vpnName>
</hwTacIpv6SrvCfg>

Table 3-882 describes elements in requests.

Table 3-882 Elements


Element Description

serverIpAdd Specifies the IPv6 address of a server. (Mandatory)


ress

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 675


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

serverPort Specifies a server port.

serverType Specifies the server type. (Mandatory)

isSecondary Specifies whether the server is a secondary server. (Mandatory)


Server

isMuxMode Specifies whether to use the multiplexing mode.


Enable

sharedKey Specifies a shared key.

vpnName Specifies an IPv6 VPN instance name. The value is a string of 1 to 31


characters. (Mandatory)

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-883 describes status codes in responses.

Table 3-883 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.26.4.2 Query HWTACACS IPv6 Server Configurations


Operation URI Description

GET /hwtacacs/hwTacTempCfgs/ Query HWTACACS IPv6


hwTacTempCfg/ server configurations.
hwTacIpv6SrvCfgs/ NOTE
hwTacIpv6SrvCfg IPv6 server objects must be
managed based on the
corresponding template object.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<hwTacIpv6SrvCfg>
<serverIpAddress/>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 676


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<serverPort/>
<serverType/>
<isSecondaryServer/>
<isMuxModeEnable/>
<serverCurrentState/>
<isCurrentSrv/>
<sharedKey/>
<vpnName/>
<authenSrvOpenNo/>
<authenSrvClseNo/>
<authenReqNo/>
<authenRspNo/>
</hwTacIpv6SrvCfg>

Table 3-884 describes elements in requests.

Table 3-884 Elements


Element Description

serverIpAddress Specifies the IPv6 address of a server.

serverPort Specifies a server port.

serverType Specifies the server type: Authentication,


Authorization, Accounting, and
Common.

isSecondaryServer Specifies whether the server is a


secondary server.

isMuxModeEnable Specifies whether to use the multiplexing


mode.

serverCurrentState Specifies the current server status:


Active, Down.

isCurrentSrv Specifies whether a server is the current


server.

sharedKey Specifies a shared key.

vpnName Specifies an IPv6 VPN instance name.

authenSrvOpenNo Specifies the number of started


authentication servers.

authenSrvClseNo Specifies the number of stopped


authentication servers.

authenReqNo Specifies the number of authentication


request packets.

authenRspNo Specifies the number of authentication


response packets.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<hwTacIpv6SrvCfg>
<serverIpAddress>2001:DB8::1</serverIpAddress>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 677


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<serverType>Authentication</serverType>
<isSecondaryServer>true</isSecondaryServer>
<serverPort>49</serverPort>
<isMuxModeEnable>true</isMuxModeEnable>
<serverCurrentState>Up</serverCurrentState>
<isCurrentSrv>true</isCurrentSrv>
<authenReqNo>0</authenReqNo>
<authenRspNo>0</authenRspNo>
<authenSrvOpenNo>0</authenSrvOpenNo>
<authenSrvClseNo>0</authenSrvClseNo>
<sharedKey></sharedKey>
<vpnName>abc</vpnName>
</hwTacIpv6SrvCfg>
<hwTacIpv6SrvCfg>
<serverIpAddress>2001:DB8::3</serverIpAddress>
<serverType>Authentication</serverType>
<isSecondaryServer>true</isSecondaryServer>
<serverPort>49</serverPort>
<isMuxModeEnable>true</isMuxModeEnable>
<serverCurrentState>Up</serverCurrentState>
<isCurrentSrv>false</isCurrentSrv>
<authenReqNo>0</authenReqNo>
<authenRspNo>0</authenRspNo>
<authenSrvOpenNo>0</authenSrvOpenNo>
<authenSrvClseNo>0</authenSrvClseNo>
<sharedKey></sharedKey>
<vpnName>abc</vpnName>
</hwTacIpv6SrvCfg>

Table 3-885 describes elements in responses.

Table 3-885 Elements


Element Description

serverIpAddress Specifies the IPv6 address of a server.

serverPort Specifies a server port.

serverType Specifies the server type: Authentication,


Authorization, Accounting, and
Common.

isSecondaryServer Specifies whether the server is a


secondary server.

isMuxModeEnable Specifies whether to use the multiplexing


mode.

serverCurrentState Specifies the current server status:


Active, Down.

isCurrentSrv Specifies whether a server is the current


server.

sharedKey Specifies a shared key.

vpnName Specifies an IPv6 VPN instance name.

authenSrvOpenNo Specifies the number of started


authentication servers.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 678


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

authenSrvClseNo Specifies the number of stopped


authentication servers.

authenReqNo Specifies the number of authentication


request packets.

authenRspNo Specifies the number of authentication


response packets.

Table 3-886 describes status codes in responses.

Table 3-886 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.26.4.3 Modify HWTACACS IPv6 Server Objects


Operation URI Description

PUT /hwtacacs/hwTacTempCfgs/ Modify HWTACACS IPv6


hwTacTempCfg/ server objects.
hwTacIpv6SrvCfgs/ NOTE
hwTacIpv6SrvCfg IPv6 server objects must be
managed based on the
corresponding template object.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<hwTacIpv6SrvCfg operation="merge">
<serverIpAddress>2001:db8::1</serverIpAddress>
<serverPort>1010</serverPort>
<serverType>Authentication</serverType>
<isSecondaryServer>false</isSecondaryServer>
<isMuxModeEnable>true</isMuxModeEnable>
<sharedKey>keyabc</sharedKey>
<vpnName> abc</vpnName>
</hwTacIpv6SrvCfg>

Table 3-887 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 679


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-887 Elements


Element Description

serverIpAdd Specifies the IPv6 address of a server. (Mandatory)


ress

serverPort Specifies a server port.

serverType Specifies the server type. (Mandatory)

isSecondary Specifies whether the server is a secondary server. (Mandatory)


Server

isMuxMode Specifies whether to use the multiplexing mode.


Enable

sharedKey Specifies a shared key.

vpnName Specifies an IPv6 VPN instance name. The value is a string of 1 to 31


characters. (Mandatory)

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-888 describes status codes in responses.

Table 3-888 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.26.4.4 Delete HWTACACS IPv6 Server Objects


Operation URI Description

DELETE /hwtacacs/hwTacTempCfgs/ Delete configured


hwTacTempCfg/ HWTACACS IPv6 server
hwTacIpv6SrvCfgs/ objects.
hwTacIpv6SrvCfg NOTE
IPv6 server objects must be
managed based on the
corresponding template object.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 680


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<hwTacIpv6SrvCfg>
<serverIpAddress> 2001:db8::1</serverIpAddress>
<serverType>Authentication</serverType>
<isSecondaryServer>false</isSecondaryServer>
<vpnName>abc</vpnName>
</hwTacIpv6SrvCfg>

Table 3-889 describes elements in requests.

Table 3-889 Elements


Element Description

serverIpAdd Specifies the IPv6 address of a server.


ress

serverType Specifies the server type.

isSecondary Specifies whether the server is a secondary server.


Server

vpnName Specifies an IPv6 VPN instance name.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-890 describes status codes in responses.

Table 3-890 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.26.5 HWTACACS Host Server Configuration

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 681


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.26.5.1 Create HWTACACS Host Server Objects


Operation URI Description

POST /hwtacacs/hwTacTempCfgs/ Create HWTACACS host


hwTacTempCfg/ server objects.
hwTacHostSrvCfgs/ NOTE
hwTacHostSrvCfg Host server objects must be
managed based on the
corresponding template object.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<hwTacHostSrvCfg>
<serverHostName>host1</serverHostName>
<serverType>Authentication</serverType>
<isSecondaryServer>true</isSecondaryServer>
<isPublicNet>true</isPublicNet>
<isMuxModeEnable>true</isMuxModeEnable>
<sharedKey>keyabc</sharedKey>
<vpnName>_public_</vpnName>
<serverPort>1025</serverPort>
</hwTacHostSrvCfg>

Table 3-891 describes elements in requests.

Table 3-891 Elements

Element Description

serverHost Specifies the host name of a server. (Mandatory)


Name

serverType Specifies the server type: Authentication, Authorization, Accounting,


and Common. (Mandatory)

serverPort Specifies a server port. The value is an integer ranging from 1 to


65535.

isSecondary Specifies whether the server is a secondary server. (Mandatory)


Server

isMuxMode Specifies whether to use the multiplexing mode.


Enable

sharedKey Specifies a shared key.

vpnName Specifies a VPN instance name. The value is a string of 1 to 31


characters. (Mandatory)

isPublicNet Specifies whether to connect to the public network. (Mandatory)

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-892 describes status codes in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 682


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-892 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.26.5.2 Query HWTACACS Host Server Configurations


Operation URI Description

GET /hwtacacs/hwTacTempCfgs/ Query HWTACACS host


hwTacTempCfg/ server configurations.
hwTacHostSrvCfgs/ NOTE
hwTacHostSrvCfg Host server objects must be
managed based on the
corresponding template object.

l Request example
<?xml version="1.0" encoding="UTF-8"?> >
<hwTacHostSrvCfg>
<serverPort/>
<serverType/>
<isSecondaryServer/>
<isMuxModeEnable/>
<serverCurrentState/>
<isCurrentSrv/>
<sharedKey/>
<vpnName/>
<authenSrvOpenNo/>
<authenSrvClseNo/>
<authenReqNo/>
<authenRspNo/>
<serverHostName/>
</hwTacHostSrvCfg>

Table 3-893 describes elements in requests.

Table 3-893 Elements


Element Description

serverIpAddress Specifies the IP address of a server.

serverPort Specifies a server port.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 683


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

serverType Specifies the server type: Authentication,


Authorization, Accounting, and
Common.

isSecondaryServer Specifies whether the server is a


secondary server.

isMuxModeEnable Specifies whether to use the multiplexing


mode.

serverCurrentState Specifies the current server status:


Active, Down

isCurrentSrv Specifies whether a server is the current


server.

sharedKey Specifies a shared key.

vpnName Specifies a VPN instance name.

authenSrvOpenNo Specifies the number of started


authentication servers.

authenSrvClseNo Specifies the number of stopped


authentication servers.

authenReqNo Specifies the number of authentication


request packets.

authenRspNo Specifies the number of authentication


response packets.

serverHostName Specifies the host name of a server.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<hwTacHostSrvCfg>
<serverHostName>host1</serverHostName>
<serverType>Authentication</serverType>
<isSecondaryServer>true</isSecondaryServer>
<serverPort>1025</serverPort>
<isMuxModeEnable>true</isMuxModeEnable>
<serverCurrentState>Up</serverCurrentState>
<isCurrentSrv>true</isCurrentSrv>
<authenReqNo>0</authenReqNo>
<authenRspNo>0</authenRspNo>
<authenSrvOpenNo>0</authenSrvOpenNo>
<authenSrvClseNo>0</authenSrvClseNo>
<sharedKey></sharedKey>
<vpnName>_public_</vpnName>
</hwTacHostSrvCfg>

Table 3-894 describes elements in responses.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 684


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-894 Elements


Element Description

serverIpAddress Specifies the IP address of a server.

serverPort Specifies a server port.

serverType Specifies the server type: Authentication,


Authorization, Accounting, and
Common.

isSecondaryServer Specifies whether the server is a


secondary server.

isMuxModeEnable Specifies whether to use the multiplexing


mode.

serverCurrentState Specifies the current server status:


Active, Down

isCurrentSrv Specifies whether a server is the current


server.

sharedKey Specifies a shared key.

vpnName Specifies a VPN instance name.

authenSrvOpenNo Specifies the number of started


authentication servers.

authenSrvClseNo Specifies the number of stopped


authentication servers.

authenReqNo Specifies the number of authentication


request packets.

authenRspNo Specifies the number of authentication


response packets.

serverHostName Specifies the host name of a server.

Table 3-895 describes status codes in responses.

Table 3-895 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 685


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Status Code Description

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.26.5.3 Modify HWTACACS Host Server Objects


Operation URI Description

PUT /hwtacacs/hwTacTempCfgs/ Modify HWTACACS host


hwTacTempCfg/ server objects.
hwTacHostSrvCfgs/ NOTE
hwTacHostSrvCfg Host server objects must be
managed based on the
corresponding template object.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<hwTacHostSrvCfg>
<serverHostName>host1</serverHostName>
<serverType>Authentication</serverType>
<isSecondaryServer>true</isSecondaryServer>
<isPublicNet>true</isPublicNet>
<isMuxModeEnable>true</isMuxModeEnable>
<sharedKey>keyabc</sharedKey>
<vpnName>_public_</vpnName>
<serverPort>1025</serverPort>
</hwTacHostSrvCfg>

describes elements in requests.

Table 3-896 Elements


Element Description

serverHost Specifies the host name of a server. (Mandatory)


Name

serverType Specifies the server type: Authentication, Authorization, Accounting,


and Common. (Mandatory)

serverPort Specifies a server port. The value is an integer ranging from 1 to


65535.

isSecondary Specifies whether the server is a secondary server. (Mandatory)


Server

isMuxMode Specifies whether to use the multiplexing mode.


Enable

sharedKey Specifies a shared key.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 686


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

vpnName Specifies a VPN instance name. The value is a string of 1 to 31


characters. (Mandatory)

isPublicNet Specifies whether to connect to the public network. (Mandatory)

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-897 describes status codes in responses.

Table 3-897 Status codes


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.26.5.4 Delete HWTACACS Host Server Objects


Operation URI Description

DELETE /hwtacacs/hwTacTempCfgs/ Delete configured


hwTacTempCfg/ HWTACACS host server
hwTacHostSrvCfgs/ objects.
hwTacHostSrvCfg NOTE
Host server objects must be
managed based on the
corresponding template object.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<hwTacHostSrvCfg>
<serverHostName>host1</serverHostName>
<serverType>Authentication</serverType>
<isSecondaryServer>true</isSecondaryServer>
<isPublicNet>true</isPublicNet>
<vpnName>_public_</vpnName>
</hwTacHostSrvCfg>

Table 3-898 describes elements in requests.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 687


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-898 Elements

Element Description

serverHost Specifies the host name of a server.


Name

serverType Specifies the server type.

isSecondary Specifies whether the server is a secondary server.


Server

vpnName Specifies a VPN instance name.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-899 describes status codes in responses.

Table 3-899 Status codes

Status Code Description

200 OK The operation succeeded.

400 Bad Request The request operation failed because the


request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error The request operation failed because of


internal errors in services or unidentified
processing errors.

3.27 OPS Applications

3.27.1 Installing Applications


Operation URI Description

POST /ops/installOpsApplication Installing OPS applications.

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<installOpsApplication>
<fileName>a.py</fileName>
</installOpsApplication>

Table 3-900 shows the description of elements in request.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 688


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-900 Description of elements in request


Element Description

fileName Name of the file to be installed.

destination (Optional) Target directory.

l Response example (XML format):


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<ok/>
</rpc-reply>

Table 3-901 shows the description of status codes in response.

Table 3-901 The description of status codes in response


Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.27.2 Uninstalling Applications


Operation URI Description

POST /ops/uninstallOpsApplica- Uninstalling OPS


tion applications.

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<uninstallOpsApplication>
<fileName>a.py</fileName>
</uninstallOpsApplication>

Table 3-902 shows the description of elements in request.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 689


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-902 Description of elements in request


Element Description

fileName Name of the file to be uninstalled. The file


name must contain the directory name if the
file is saved in a directory. For example,
dir/a.py.

l Response example (XML format):


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply>
<ok/>
</rpc-reply>

Table 3-903 shows the description of status codes in response.

Table 3-903 The description of status codes in response


Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.27.3 Querying Installed Applications


Operation URI Description

GET /ops/opsApplications/ Querying installed OPS


opsApplication applications.

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<opsApplication>
<size/>
<fileName/>
</opsApplication>

Table 3-904 shows the description of elements in request.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 690


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-904 Description of elements in request


Element Description

size Size of the installed file, in bits.

fileName Name of the installed file.

l Response example (XML format):


<rpc-reply>
<data>
<ops xmlns="http://www.huawei.com/netconf/vrp" format-version="1.0"
content-version="1.0">
<opsApplications>
<opsApplication>
<fileName>test_rest_api.py</fileName>
<size>22962</size>
</opsApplication>
<opsApplication>
<fileName>ztp_script.py</fileName>
<size>50908</size>
</opsApplication>
</opsApplications>
</ops>
</data>
</rpc-reply>

Table 3-905 shows the description of elements in response.

Table 3-905 Description of elements in response


Element Description

size Size of the installed file, in bits.

fileName Name of the installed file.

Table 3-906 shows the description of status codes in response.

Table 3-906 The description of status codes in response


Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented because


the request is incorrect in syntax or the
information attribute in the request is
incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 691


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.28 Python API


The OPS has Python scripts integrated, allowing you to use the standard Python library and
RESTful APIs to access the device. The OPS also provides Python script APIs, allowing you
to use specific functions of the Embedded Running Environment (ERE).
For example, if a device has generated syslogs and also has a syslog server configured, the
syslogs can be reported to the syslog server.

NOTE

Python APIs provided in the ERE are unavailable external to the device.

Usage Guideline
Before you use Python APIs provided in the ERE, import the OPS and obtain OPS objects in
instance mode.
Example for recording a syslog:
import ops
opsObj = ops.ops()
opsObj.syslog("record a syslog.")

3.28.1 Log Recording


l Function Description
The OPS's embedded running environment provides syslog functions. When scripts are
running on a device, some information is recorded in the device's log.

l Command Prototype
opsObj.syslog(content, severity="informational", logtype="syslog")

l Parameter Description

Table 3-907 Parameters supported by syslog


Method Description

opsObj Specifies an OPS object. It is obtained using ops.ops() in


instance mode.

content Specifies log content, which supports a maximum of 512 bytes.


If the content length exceeds 512 bytes, information fails to be
recorded in the log.

severity Specifies a log level, which can be critical, error, warning,


or informational (in descending order). The default level
is informational.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 692


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Method Description

logtype Specifies a log type, which can be syslog or diagnose.


If syslog is specified, information is recorded in the syslog.
After a syslog server is configured, the syslog is uploaded to the
syslog server. If diagnose is specified, information is recorded
in the diagnostic log. The default value is syslog.

l Description of Return Values


First return value: The value 0 indicates a success; the value 1 indicates a failure.
Second return value: This value describes success or failure reasons.

l Example
test.py
improt ops
opsObj = ops.ops()
opsObj.syslog("Record an informational syslog.")

After the script is run, information is recorded in the syslog.

3.28.2 Subscribe to Command Events


l Function Description
The OPS ERE provides command event subscription.
After you subscribe to command events, if the entered character strings of a command
match the regular expression, the system executes the ops_execute() function in the
Python script.
This API can only be used in the ops_condition() function of the maintenance assistant
script.
l Command Prototype
opsObj.cli.subscribe(tag, pattern, enter=False, sync=True, async_skip=False,
sync_wait=30)
l Parameter Description

Table 3-908 Parameters supported by command event subscription APIs

Method Description

opsObj Specifies an OPS object. It is obtained using ops.ops() in


instance mode.

tag Specifies a condition ID. The value is a string of 1 to 8 case-


sensitive characters that starts with a letter and contains letters,
digits, or underscores (_). Enter quotation marks ("") or
None for the only one condition. tag cannot be set to and, or,
or not.

pattern Specifies a regular expression for matching commands.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 693


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Method Description

enter The value can be True or False.


l True: matches a regular expression immediately after you
press Enter.
l False: matches a regular expression only after the system
completes the keyword.

sync Indicates whether the CLI terminal waits for script execution
after a command event is triggered.
l True: The CLI terminal waits for script execution.
l False: The CLI terminal does not wait for script execution.

async_skip Indicates whether the original command is skipped. (This setting


takes effect only when sync is set to False.) The value can
be True or False.
l True: The original command is not executed.
l False: The original command is executed.

sync_wait Indicates the time when the CLI terminal waits for script
execution. (This setting takes effect only when sync is set
to True.) The value is an integer ranging from 1 to 100.

l Description of Return Values


First return value: The value 0 indicates a success; the value 1 indicates a failure.
Second return value: This value describes success or failure reasons, expressed in
character strings.
l Example
test.py
def ops_condition(_ops):
_ops.cli.subscribe("con11","iproute",True,True,False,30)
_ops.correlate("con11")
def ops_execute(_ops):
print "Hello World"
return 0

After you enter iproute on the CLI terminal, the terminal outputs "Hello World".

3.28.3 Subscribe to Timer Events


l Function Description
The OPS ERE provides timer event subscription.
After you subscribe to timer events and a timer event is triggered, the system executes
the ops_execute() function in the Python script.
This API can only be used in the ops_condition() function of the maintenance assistant
script.
l Command Prototype
# Timer event defined in the Linux cron timer description format
opsObj.timer.cron(tag, crontime)
# Cyclic timer, triggered at a specified interval

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 694


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

opsObj.timer.relative(tag, timelength)
# Timer triggered after a specified number of seconds elapses since zero hour of the year
of 1970
opsObj.timer.absolute(tag, timelength)
# Timer triggered after a specified number of seconds elapses since a timer event is
subscribed
opsObj.timer.countdown(tag, timelength)
l Parameter Description

Table 3-909 Parameters supported by timer event subscription APIs


Method Description

opsObj Specifies an OPS object. It is obtained using ops.ops() in


instance mode.

tag Specifies a condition ID. The value is a string of 1 to 8 case-


sensitive characters that starts with a letter and contains letters,
digits, or underscores (_). Enter quotation marks ("") or
None for the only one condition. tag cannot be set to and, or,
or not.

crontime Specifies a cron timer description. The value is a character


string. For example, if the value is * * * *, the timer is triggered
every second.

timelength Specifies a timer value, in seconds.

l Description of Return Values


First return value: The value 0 indicates a success; the value 1 indicates a failure.
Second return value: This value describes success or failure reasons, expressed in
character strings.
l Example
test.py
def ops_condition(_ops):
_ops.timer.countdown("con11", 5)
_ops.correlate("con11")
def ops_execute(_ops):
_ops.syslog("Record an informational syslog.")
return 0

A timer event is triggered 5s after the timer event is subscribed.

3.28.4 Subscribe to Route Change Event


l Function Description
The OPS ERE provides route change event subscription.
After you subscribe to route change events and a route change event is triggered, the
system executes the ops_execute() function in the Python script.
This API can only be used in the ops_condition() function of the maintenance assistant
script.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 695


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Command Prototype
opsObj.routing.subscribe (tag, network, maskLen, minLen=None, maxLen=None,
neLen=None, type=all, protocol=all)
l Parameter Description

Table 3-910 Parameters supported by route change event APIs


Method Description

opsObj Specifies an OPS object. It is obtained using ops.ops() in


instance mode.

tag Specifies a condition ID. The value is a string of 1 to 8 case-


sensitive characters that starts with a letter and contains letters,
digits, or underscores (_). Enter quotation marks ("") or None for
the only one condition. tag cannot be set to and, or, or not.

network Specifies a route prefix. The value is in the IP address format,


such as 10.0.0.0.

maskLen Specifies a mask length. The value is an integer ranging from 0


to 32.

minLen Specifies the minimum mask length. The value must be greater
than or equal to maskLen.

maxLen Specifies the maximum mask length. The value must be greater
than or equal to minLen.

neLen Specifies a length that cannot be a mask length. The value must
be greater than or equal to minLen and less than or equal
to maxLen.

type Specifies a route change type. The value can be


add, delete, modify, or all. all indicates all route changes.

protocol Specifies a protocol. The default value is all, indicating all


attributes.

l Description of Return Values


First return value: The value 0 indicates a success; the value 1 indicates a failure.
Second return value: This value describes success or failure reasons, expressed in
character strings.
l Example
test.py
def ops_condition(_ops):
ret, reason = _ops.route.subscribe("con0", "10.1.1.1",None,
8,32,15,"all","all")
ret, reason = _ops.correlate("(con0 and con1)")
return ret
def ops_execute(_ops):
a, des= _ops.context.save("test.py", 'Route event trigger')
return 0

When the route 10.1.1.1/24 is added or deleted, a route change event is triggered.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 696


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.28.5 Display Messages on User Terminals


l Function Description
The OPS provides an interface for displaying messages on the CLI terminal when the
Python script is being executed on the front end or the CLI terminal waits for script
execution.
l Command Prototype
opsObj.terminal.write(msg, vty=None)
l Parameter Description

Table 3-911 Parameters supported by APIs displaying messages on user terminals


Method Description

opsObj Specifies an OPS object. It is obtained using ops.ops() in


instance mode.

msg Specifies a character string to be displayed on user terminals.

vty Specifies a user terminal. Currently, messages can only be


displayed on user terminals that wait for script execution or
execute the script on the front end.
You can enter environment('_cli_vty') to obtain the VTY name
or enter None.

l Description of Return Values


First return value: The value 0 indicates a success; the value 1 indicates a failure.
Second return value: This value describes success or failure reasons, expressed in
character strings.
l Example
test.py
import ops
def ops_condition(_ops):
ret, reason = _ops.cli.subscribe("corn1","device",True,True,False,20)
return ret
def ops_execute(_ops):
_ops.terminal.write("Hello world!",None)
return 1

When the front end executes the script, the Python script outputs "Hello World!" to the
CLI terminal.

3.28.6 Read User Inputs on User Terminals


l Function Description
The OPS provides an interface for reading user inputs on the CLI terminal when the
Python script is being executed on the front end or the CLI terminal waits for script
execution.
l Command Prototype
opsOb.terminal.read(maxLen=512, timeout=30, vty=None)
l Parameter Description

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 697


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-912 Parameters supported by APIs for reading user inputs on user terminals
Method Description

opsObj Specifies an OPS object. It is obtained using ops.ops() in


instance mode.

maxLen Specifies the maximum number of characters allowed to be


input. The default value is 512 characters.

timeout Specifies a timeout period for waiting for user inputs. The
default value is 30s.

vty Specifies a user terminal. Currently, user inputs can be read only
on user terminals that wait for script execution or execute the
script on the front end.
You can enter environment('_cli_vty') to obtain the VTY name
or enter None.

l Description of Return Values


None: indicates a user input timeout, a user has entered CTRL+C, or the parameter is
incorrect.
Null character string: indicates that a user has pressed Enter.
l Example
test.py

import ops

def ops_condition(_ops):
ret, reason = _ops.cli.subscribe("corn1","device",True,True,False,20)
return ret

def ops_execute(_ops):
_ops.terminal.write("Enter your passwd:",None)
passwrd,ret = _ops.terminal.read(10,15,None)
print(passwrd)

When the front end executes the script, the character string entered by a user on the CLI
terminal is output.

3.28.7 Open a CLI Channel


l Function Description
The OPS allows the system to use the Python script to open a CLI channel and execute
commands.
l Command Prototype
opsObj.cli.open()
l Parameter Description

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 698


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-913 Parameters supported by APIs for opening CLI channels


Method Description

opsObj Specifies an OPS object. It is obtained using ops.ops() in


instance mode.

l Description of Return Values


First return value: If None is displayed, an error has occurred. Otherwise, command
handles are returned.
Second return value: result description expressed in character strings
l Example
test.py
import ops
import igpcomm
def ops_condition(_ops):
_ops.cli.subscribe("con11","logbuffer1",True,True,False,10)
_ops.correlate("con11")
return ret
def ops_execute(_ops):
handle, err_desp= _ops.cli.open()
choice = {"Continue": "y", "save": "n"}
_ops.cli.execute(handle,"sys")
_ops.cli.execute(handle,"pm",None)
_ops.cli.execute(handle,"undo statistics-task a",choice)
_ops.cli.execute(handle,"commit",None)
ret = _ops.cli.close(handle)
print 'test2 =',ret
return 0

a. When the front end executes the script, the CLI channel is opened, and the CLI
terminal displays the user view.
b. Run the system-view command to enter the system view.
c. Run the pm command to enter the PM view.
d. Run the undo statistics-task a command so the system operates based on
the choice variable value. This command is an interactive command.
e. Run the commit command to commit the configuration.
f. Close the CLI channel.
NOTE

After the CLI channel is opened using the script, commands can be delivered to the device only
when the CLI terminal displays the user view.
The CLI channel authorities are the user authorities of the maintenance assistant created.
A script can be used to create only one CLI channel. If an attempt is made to create a second CLI
channel using this script, the system returns a failure.
A VTY resource is consumed for every channel opened. The display users command shows that a
VTY resource is consumed by an assistant (Assistant: Name). If not more than 3 VTYs are
available, opening a CLI channel fails.

3.28.8 Execute Commands


l Function Description
The OPS allows the system to use the Python script to open a CLI channel and execute
commands.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 699


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Command Prototype
ops.cli.execute(fd, command, choice=None)
l Parameter Description

Table 3-914 Parameters supported by APIs for executing commands

Method Description

opsObj Specifies an OPS object. It is obtained using ops.ops() in


instance mode.

fd Specifies a command handle. It is generated by ops.cli.open().

command Specifies a command to be executed, for example, system-view


im. You do not need to press Enter; the CLI automatically adds
the Enter function. The value can only be one command.

choice Specifies a lexical type, used for auto reply for interactive
commands.choice = {"Continue?": "n", "save": "n"}. A
maximum of eight options are supported. Multiple lines are
entered for multi-line commands, such as header login
information, for example, choice={"": "a\r\nb\r\n\a"}.

l Description of Return Values


First return value: If None is returned, the command fails to be issued to the CLI or
command execution times out. Otherwise, the command output is returned. Each data
package is 32 KB in size, separated at a carriage return.
Second return value: If Next is 0, no more output will be displayed. If Next is 1, more
output will be displayed, and this function is still called for obtaining the next batch of
data, except that you must set command=None and choice=None.
Third return value: result description expressed in character strings
l Example
test.py

import ops
import igpcomm

def ops_condition(_ops):
_ops.cli.subscribe("con11","logbuffer1",True,True,False,10)
_ops.correlate("con11")
return ret

def ops_execute(_ops):
handle, err_desp= _ops.cli.open()
choice = {"Continue": "y", "save": "n"}
_ops.cli.execute(handle,"sys")
_ops.cli.execute(handle,"pm",None)
_ops.cli.execute(handle,"undo statistics-task a",choice)
_ops.cli.execute(handle,"commit",None)
ret = _ops.cli.close(handle)
print 'test2 =',ret
return 0

a. When the front end executes the script, the CLI channel is opened, and the CLI
terminal displays the user view.
b. Run the system-view command to enter the system view.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 700


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

c. Run the pm command to enter the PM view.


d. Run the undo statistics-task a command so the system operates based on
the choice variable value. This command is an interactive command.
e. Run the commit command to commit the configuration.
f. Close the CLI channel.

3.28.9 Close a CLI Channel


l Function Description
The OPS allows the system to use the Python script to open a CLI channel, execute
commands, and close the CLI channel after command execution.
l Command Prototype
ops.cli.close(fd)
l Parameter Description

Table 3-915 Parameters supported by APIs for closing a CLI channel


Method Description

opsObj Specifies an OPS object. It is obtained using ops.ops() in


instance mode.

fd Specifies a command handle. It is generated by ops.cli.open().

l Description of Return Values


First return value: The value 0 indicates a success; the value 1 indicates a failure.
Second return value: result description expressed in character strings
l Example
test.py

import ops
import igpcomm

def ops_condition(_ops):
_ops.cli.subscribe("con11","logbuffer1",True,True,False,10)
_ops.correlate("con11")
return ret

def ops_execute(_ops):
handle, err_desp= _ops.cli.open()
choice = {"Continue": "y", "save": "n"}
_ops.cli.execute(handle,"sys")
_ops.cli.execute(handle,"pm",None)
_ops.cli.execute(handle,"undo statistics-task a",choice)
_ops.cli.execute(handle,"commit",None)
ret = _ops.cli.close(handle)
print 'test2 =',ret
return 0

a. When the front end executes the script, the CLI channel is opened, and the CLI
terminal displays the user view.
b. Run the system-view command to enter the system view.
c. Run the pm command to enter the PM view.
d. Run the undo statistics-task a command so the system operates based on
the choice variable value. This command is an interactive command.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 701


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

e. Run the commit command to commit the configuration.


f. Close the CLI channel.

3.28.10 Save and Restore Script Variables


l Function Description
The OPS ERE allows script variables to be saved and restored.
l Command Prototype
opsObj.context.save(varName, value)
opsObj.context.retrieve(varName)
l Parameter Description

Table 3-916 Parameters supported by APIs for saving and restoring script variables
Method Description

opsObj Specifies an OPS object. It is obtained using ops.ops() in


instance mode.

varName Specifies the name of a variable. The value is a string of a


maximum of 16 characters.

value Specifies the value of a variable. The value can be a string of a


maximum of 1024 characters or an integer ranging from –
2147483648 to 2147483647.

l Example
test.py

import ops
test = ops.ops()
print 'test context save'
a, des= test.context.save("varInt1", 111)
print 'save varInt1 return' , a
a, des= test.context.save("varStr2", 'testString')
print 'save varStr2 return' , a
print 'test context save over'

test.py
import ops
test = ops.ops()
print 'test context retrieve'
a, des = test.context.retrieve("varInt1")
print 'retrieve varInt1 = ', a
a, des = test.context.retrieve("varStr2")
print 'retrieve varStr2 = ', a
print 'test context retrieve over'

l Description of Return Values


NOTE

A maximum of 100 script variables can be stored. A variable with the same name as one that has
been stored will replace this one.
– Return value of opsObj.context.save()
First return value: The value 0 indicates a success; the value 1 indicates a failure.
Second return value: result description expressed in character strings.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 702


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

– Return value of opsObj.context.retrieve


First return value: If None is returned, restoring a specified variable fails.
Otherwise, specified variable values are returned.
Second return value: result description expressed in character strings.

3.28.11 Support Resident Scripts


l Function Description
The OPS ERE supports resident scripts. When a resident script is executed, ops.result()
returns the execution result, and ops.wait() suspends the script. After the script is
triggered again, ops.wait() is returned, and script execution continues.
l Command Prototype
opsObj.result(status)
opsObj.wait()
l Parameter Description

Table 3-917 Parameters supported by resident script APIs


Method Description

opsObj Specifies an OPS object. It is obtained using ops.ops() in


instance mode.

status Specifies a return value, indicating the script processing result


sent to the OPS. The value 0 indicates a success (The original
command is skipped.). Other values are error codes.

l Description of Return Values


None
l Example
test.py

import ops

def ops_condition(_ops):
_ops.cli.subscribe("con11","this",True,True,False,5)
_ops.correlate("con11")
return ret

def ops_execute(_ops):
a, des= _ops.context.save("wait1", 'ac1')
_ops.result(1)
_ops.wait()
a, des= _ops.context.save("wait2", 'ac2')
return 0

NOTE

The opsObj.result() function returns the script processing result to the OPS. The result can also be
returned using return. If neither opsObj.result() nor return is used, the default value 1 is
returned. If both opsObj.result() and return are used, the result returned by opsObj.result() takes
effect. If opsObj.result() is called consecutively, the first result takes effect.
opsObj.wait() indicates that script execution continues after the next event occurs.
The opsObj.result() function returns the script processing result and suspends the script until the
next event occurs. This implements resident script processing.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 703


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.29 HTTP

3.29.1 Configure an HTTP Client


Operation URI Description

GET /https/httpClientCfgs/httpClientCfg Query the HTTP connection


status.

l Request example
<?xml version="1.0" encoding="UTF-8"?>
<httpQueryConnect>
<vrId>0</vrId>
<serverAddr>192.168.1.2</serverAddr>
<serverPort>8080</serverPort>
<method>1</method>
<uri>/lib/a.crl</uri>
<queryHeader>host:192.168.1.1</queryHeader>
<isShortConn>false</isShortConn>
<clientTimeOut>60</clientTimeOut>
<vrfIndex>0</vrfIndex>
</httpQueryConnect>

Table 3-918 describes elements in requests.

Table 3-918 Elements in requests


Element Description

vrId Specifies the ID of a virtual router.

serverPort Specifies a server IP address.

serverPort Specifies a server port number.

method Specifies an OPS operation method.


l 1: GET
l 2: PUT
l 3: POST
l 4: DELETE

uri Specifies a Uniform Resource Identifier.

queryHeade Specifies the header of a query packet.


r

isShortConn Indicates whether a connection is a short connection.


l true: Yes
l false: No

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 704


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

clientTimeO Specifies a client timeout interval, in seconds.


ut

vrfIndex Specifies a VPN index.

l Response example (XML format)


<?xml version="1.0" encoding="UTF-8"?>
<httpQueryConnects>
<httpQueryConnect>
<vrId>0</vrId>
<serverAddr>192.168.1.2</serverAddr>
<serverPort>8080</serverPort>
<method>1</method>
<uri>/lib/b.crl</uri>
<queryHeader>host:192.168.1.1</queryHeader>
<queryBody> </queryBody>
<isShortConn>true</isShortConn>
<clientTimeOut>60</clientTimeOut>
<vrfIndex>0</vrfIndex>
<rspBody></rspBody>
<rspHead>Content-Type: text/html&#13;
Accept-Ranges: bytes&#13;
Server: HFS 2.3 beta</rspHead>
<rspStatus>200</rspStatus>
</httpQueryConnect>
</httpQueryConnects>

Table 3-919 describes elements in responses.

Table 3-919 Elements in responses


Element Description

vrId Specifies the ID of a virtual router.

serverPort Specifies a server IP address.

serverPort Specifies a server port number.

method Specifies an OPS operation method.


l 1: GET
l 2: PUT
l 3: POST
l 4: DELETE

uri Specifies a Uniform Resource Identifier.

queryHeader Specifies the header of a query packet.

queryBody Specifies the body of a query packet.

isShortConn Indicates whether a connection is a short


connection.
l true: Yes
l false: No

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 705


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Element Description

clientTimeOut Specifies a client timeout interval, in


seconds.

vrfIndex Specifies a VPN index.

rspBody Specifies the body of a response packet.

rspHead Specifies the header of a response packet.

rspStatus Specifies a status code in a response.

Table 3-920 Status codes in responses


Status Code Description

200 OK The operation succeeded.

400 Bad Request The request cannot be implemented


because the request is incorrect in syntax
or the information attribute in the request
is incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.30 Stack Management

3.30.1 Querying or Configuring Physical Stack Member Ports

Obtain information about physical stack member ports.


Operation URI Description

GET /stack/stackPhyPorts Obtains information about


physical stack member
ports.

l Example of request:
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get>
<filter type="subtree">
<stack xmlns="http://www.huawei.com/netconf/vrp" content-version="1.0"
format-version="1.0">
<stackPhyPorts>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 706


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<stackPhyPort>
<PortName>10GE1/0/1</PortName>
<ifStackMode></ifStackMode>
</stackPhyPort>
</stackPhyPorts>
</stack>
</filter>
</get>
</rpc>

l Example of response (XML format):


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<data>
<stack xmlns="http://www.huawei.com/netconf/vrp" format-version="1.0"
content-version="1.0">
<stackPhyPorts>
<stackPhyPort>
<PortName>10GE1/0/1</PortName>
<ifStackMode>false</ifStackMode>
</stackPhyPort>
</stackPhyPorts>
</stack>
</data>
</rpc-reply>

Table 3-921 describes the fields in the response.

Table 3-921 Description of fields in the response


Field Description

PortName Name of a physical port.

ifStackMode Whether the physical port is a stack


member port.
l true: yes
l false: no

Configure physical stack member ports.


Operation URI Description

PUT /stack/stackPhyPorts Configures physical stack


member ports.

l Example of request:
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<default-operation>merge</default-operation>
<error-option>rollback-on-error</error-option>
<config>
<stack xmlns="http://www.huawei.com/netconf/vrp" content-version="1.0"
format-version="1.0">
<stackPhyPorts>

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 707


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

<stackPhyPort operation="merge">
<PortName>10GE2/0/1</PortName>
<ifStackMode>false</ifStackMode>
</stackPhyPort>
</stackPhyPorts>
</stack>
</config>
</edit-config>
</rpc>

Table 3-922 describes the fields in the request.

Table 3-922 Description of fields in the request

Field Description

PortName Name of a physical port.

ifStackMode Whether to configure the physical port as


a stack member port.
l true: yes
l false: no

l Example of response (XML format):


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-923 shows the description of status codes in response.

Table 3-923 The description of status codes in response

Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented


because the request is incorrect in syntax
or the information attribute in the request
is incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.30.2 Querying SVF Auto-negotiation Results


Operation URI Description

GET /stack/globalPara/ Obtains SVF auto-


autoNegotiateResult negotiation results. This
operation can be performed
only on switches that can act
as leaf switches.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 708


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Example of request:
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get>
<filter type="subtree">
<stack xmlns="http://www.huawei.com/netconf/vrp" content-version="1.0"
format-version="1.0">
<globalPara>
<autoNegotiateResult/>
</globalPara>
</stack>
</filter>
</get>
</rpc>

l Example of response (XML format):


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<data>
<stack xmlns="http://www.huawei.com/netconf/vrp" format-version="1.0"
content-version="1.0">
<globalPara>
<autoNegotiateResult>Succeed</autoNegotiateResult>
</globalPara>
</stack>
</data>
</rpc-reply>

Table 3-924 describes the fields in the response.

Table 3-924 Description of fields in the response


Field Description

autoNegotiateResult SVF auto-negotiation result:


l Succeed: SVF auto-negotiation has
succeeded.
l Failed: SVF auto-negotiation has
failed.
l NA: The device model does not need
to perform SVF auto-negotiation.

Table 3-925 shows the description of status codes in response.

Table 3-925 The description of status codes in response


Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented


because the request is incorrect in syntax
or the information attribute in the request
is incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 709


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

3.30.3 Querying the SVF Auto-negotiation Port List


Operation URI Description

GET /stack/autoNegotiatePorts Obtains the SVF auto-


negotiation port list. This
operation can be performed
only on switches that can act
as leaf switches.

l Example of request:
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get>
<filter type="subtree">
<stack xmlns="http://www.huawei.com/netconf/vrp" content-version="1.0"
format-version="1.0">
<autoNegotiatePorts>
<autoNegotiatePort>
<portName/>
</autoNegotiatePort>
</autoNegotiatePorts>
</stack>
</filter>
</get>
</rpc>

l Example of response (XML format):


<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<data>
<stack xmlns="http://www.huawei.com/netconf/vrp" format-version="1.0"
content-version="1.0">
<autoNegotiatePorts>
<autoNegotiatePort>
<PortName>10GE1/0/1</PortName>
</autoNegotiatePort>
</autoNegotiatePorts>
</stack>
</data>
</rpc-reply>

Table 3-926 describes the fields in the response.

Table 3-926 Description of fields in the response


Field Description

PortName Name of an SVF auto-negotiation port.

Table 3-927 shows the description of status codes in response.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 710


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-927 The description of status codes in response

Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented


because the request is incorrect in syntax
or the information attribute in the request
is incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.30.4 Starting or Stopping SVF Auto-negotiation


Operation URI Description

PUT /stack/autoNegotiate Requests the device to start


or stop SVF auto-
negotiation. This operation
can be performed only on
switches that can act as leaf
switches.

l Example of request:
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<default-operation>merge</default-operation>
<error-option>rollback-on-error</error-option>
<config>
<stack xmlns="http://www.huawei.com/netconf/vrp" content-version="1.0"
format-version="1.0">
<autoNegotiate>
<ifStackMode>true</ifStackMode>
</autoNegotiate>
</stack>
</config>
</edit-config>
</rpc>

Table 3-928 describes the fields in the request.

Table 3-928 Description of fields in the request

Field Description

ifStackMode l true: starts SVF auto-negotiation.


l false: stops SVF auto-negotiation.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 711


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

l Example of response (XML format):


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-929 shows the description of status codes in response.

Table 3-929 The description of status codes in response


Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented


because the request is incorrect in syntax
or the information attribute in the request
is incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.31 ZTP Management

3.31.1 Displaying the ZTP Deployment Results


Operation URI Description

GET /devm/ztps/ztp Obtain information about


whether the device starts
after ZTP deployment is
successful.

l Example of request:
<?xml version="1.0" encoding="UTF-8"?>
<ztp>
<chassis>1</chassis>
<slot>1</slot>
<ztpStatus/>
</ztp>

l Example of response (XML format):


<?xml version="1.0" encoding="UTF-8"?>
<ztp>
<chassis>1</chassis>
<slot>1</slot>
<ztpStatus>0</ztpStatus>
</ztp>

Table 3-930 describes the fields in the response.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 712


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-930 Description of fields in the response


Field Description

chassis Chassis ID.

slot Slot ID.

ztpStatus Whether the device starts after


deployment through ZTP is complete.
l 0: no
l 1: yes

Table 3-931 shows the description of status codes in response.

Table 3-931 The description of status codes in response


Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented


because the request is incorrect in syntax
or the information attribute in the request
is incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.31.2 Setting the ZTP Deployment Status


Operation URI Description

POST /devm/ztps/ztp Sets the ZTP deployment


success flag.

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<ztp>
<ztpStatus>1</ztpStatus>
</ztp>

l Response example (XML format):


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-932 describes the fields in the response.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 713


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-932 Description of fields in the response


Element Description

ztpStatus ZTP deployment success flag:


l 0: clears the ZTP deployment success
flag.
l 1: sets the ZTP deployment success
flag.

Table 3-933 shows the description of status codes in response.

Table 3-933 The description of status codes in response


Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented


because the request is incorrect in syntax
or the information attribute in the request
is incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

3.31.3 Setting the USB-based Deployment Indicator Color


Operation URI Description

POST /devm/usbLightInfo Sets the USB-based


deployment indicator color.

l Request example:
<?xml version="1.0" encoding="UTF-8"?>
<usbLightInfo>
<position>1</position>
<entUsbLightState>greenLight</entUsbLightState>
</usbLightInfo>

l Response example (XML format):


<?xml version="1.0" encoding="UTF-8"?>
<ok/>

Table 3-934 describes the fields in the response.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 714


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
RESTful API Reference 3 API Tables

Table 3-934 Description of fields in the response


Element Description

position Slot ID of the USB flash drive.

ztpStatus Set the USB-based deployment indicator


color:
l greenBlink: The indicator blinks
green.
l greenLight: The indicator is steady
green.
l redLight: The indicator is steady red.

Table 3-935 shows the description of status codes in response.

Table 3-935 The description of status codes in response


Status Code Description

200 OK The operation succeeds.

400 Bad Request The request cannot be implemented


because the request is incorrect in syntax
or the information attribute in the request
is incorrect.

500 Internal Server Error Internal errors in services cause a request


failure or an unidentified request.

Issue 05 (2019-04-26) Copyright © Huawei Technologies Co., Ltd. 715

You might also like