No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

RESTful API Reference

CloudEngine 8800, 7800, 6800, and 5800 V200R002C50

This document describes the OPS APIs supported by the device, including OPS-supported operations, request examples, elements in the requests, response examples, elements in the responses, and response status codes.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Query Interface Information

Query Interface Information

Query Interface Attributes

Operation

URI

Description

GET

/ifm/interfaces

Query information about all interfaces.

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

    Table 3-24 describes elements in requests.

    Table 3-24  Elements

    Element

    Description

    ifPhyType

    Specifies an interface type.

  • 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-25 describes elements in responses.

    Table 3-25  Elements

    Element

    Description

    ifName

    Specifies an interface name.

    Table 3-26 describes status codes in responses.

    Table 3-26  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 an Interface's Dynamic Information

Operation

URI

Description

GET

/ifm/interfaces/interface

Query an interface's dynamic information.

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

    Table 3-27 describes elements in requests.

    Table 3-27  Elements

    Element

    Description

    ifName

    Specifies an interface name.

    ifDynamicInfo

    Specifies an interface's dynamic information.

  • 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-28 describes elements in responses.

    Table 3-28  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.

    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-29 describes status codes in responses.

    Table 3-29  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 an Interface's Trap Generation Threshold

Operation

URI

Description

GET

/ifm/interfaces/interface/ifTrapThreshold

Query an interface's trap generation threshold.

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

    Table 3-30 describes elements in requests.

    Table 3-30  Elements

    Element

    Description

    ifName

    Specifies an interface name.

    ifTrapThreshold

    Specifies an interface's trap generation threshold.

  • 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-31 describes elements in responses.

    Table 3-31  Elements

    Element

    Description

    ifName

    Specifies an interface name.

    ifTrapThreshold

    Specifies an interface's trap generation threshold.

    inputRisingRate

    Specifies an alarm generation threshold for the inbound bandwidth usage.

    inputResumeRate

    Specifies an alarm clearance threshold for the inbound bandwidth usage.

    outputRisingRate

    Specifies an alarm generation threshold for the outbound bandwidth usage.

    outputResumeRate

    Specifies an alarm clearance threshold for the outbound bandwidth usage.

    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.

Query Traffic Statistics on an Interface

Operation

URI

Description

GET

/ifm/interfaces/interface/ifStatistics

Query traffic statistics on an interface.

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

    Table 3-33 describes elements in requests.

    Table 3-33  Elements

    Element

    Description

    ifName

    Specifies an interface name.

    ifStatistics

    Specifies traffic statistics on an interface.

  • 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>
                <sendErrorPacket>0</sendErrorPacket>
                <sendDropPacket>0</sendDropPacket>
              </ifStatistics>
           </interface> 
    </interfaces>

    Table 3-34 describes elements in responses.

    Table 3-34  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.

    receivePacket

    Specifies the number of packets that the interface received.

    sendPacket

    Specifies the number of packets that the interface sent.

    rcvUniPacket

    Specifies the number of unicast packets that the interface received.

    rcvMutiPacket

    Specifies the number of multicast packets that the interface received.

    rcvBroadPacket

    Specifies the number of broadcast packets that the interface received.

    sendUniPacket

    Specifies the number of unicast packets that the interface sent.

    sendMutiPacket

    Specifies the number of multicast packets that the interface sent.

    sendBroadPacket

    Specifies the number of broadcast packets that the interface sent.

    rcvErrorPacket

    Specifies the number of error packets that the interface received.

    rcvDropPacket

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

    sendErrorPacket

    Specifies the number of error packets that the interface sent .

    sendDropPacket

    Specifies the number of dropped packets that the interface sent.

    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.

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.

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

    Table 3-36 describes elements in requests.

    Table 3-36  Elements

    Element

    Description

    ifName

    Specifies an interface name.

    ifClearedStat

    Specifies traffic statistics that can be cleared from an interface.

  • 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>
                <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-37 describes elements in responses.

    Table 3-37  Elements

    Element

    Description

    ifName

    Specifies an interface name.

    ifIndex

    Specifies an interface index.

    ifClearedStat

    Specifies traffic statistics that can be cleared from an interface.

    ifOperStatItvl

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

    inByteRate

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

    inPacketRate

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

    inUseRate

    Specifies the inbound bandwidth usage within the interval.

    outByteRate

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

    outPacketRate

    Specifies the rate at which the interface sends packets within the 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.

    receivePacket

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

    sendPacket

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

    rcvUniPacket

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

    rcvMutiPacket

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

    rcvBroadPacket

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

    sendUniPacket

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

    sendMutiPacket

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

    sendBroadPacket

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

    rcvErrorPacket

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

    rcvDropPacket

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

    sendErrorPacket

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

    sendDropPacket

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

    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.

Query an Interface's ErrorDown Information

Operation

URI

Description

GET

/ifm/interfaces/interface/ifErrorDown

Query an interface's ErrorDown information.

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

    Table 3-39 describes elements in requests.

    Table 3-39  Elements

    Element

    Description

    ifName

    Specifies an interface name.

    ifErrorDown

    Specifies an interface's ErrorDown information.

  • 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-40 describes elements in responses.

    Table 3-40  Elements

    Element

    Description

    ifName

    Specifies an interface name.

    ifErrorDown

    Specifies an interface's ErrorDown information, including the interface name, ErrorDown reason, and total and remaining time for the interface to restore to Up.

    errorDownCause

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

    recoveryTime

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

    remainderTime

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

    Table 3-41 describes status codes in responses.

    Table 3-41  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 an Interface's Global Configurations

Operation

URI

Description

GET

/ifm/globalConfig

Query an interface's global configurations.

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

    Table 3-42 describes elements in requests.

    Table 3-42  Elements

    Element

    Description

    globalConfig

    Specifies an interface's global configurations.

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?>
    <globalConfig>
          <globalStatItvl>300</globalStatItvl>
    </globalConfig>

    Table 3-43 describes elements in responses.

    Table 3-43  Elements

    Element

    Description

    globalConfig

    Specifies an interface's global configurations.

    globalStatItvl

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

    Table 3-44 describes status codes in responses.

    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.

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.

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

    Table 3-45 describes elements in requests.

    Table 3-45  Elements

    Element

    Description

    autoRecoveryTime

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

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?>
    <autoRecoveryTimes>
         <autoRecoveryTime>
              <errorDownType>auto-defend</errorDownType>
              <timeValue>30</timeValue>
         </autoRecoveryTime>
    </autoRecoveryTimes>

    Table 3-46 describes elements in responses.

    Table 3-46  Elements

    Element

    Description

    autoRecoveryTime

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

    errorDownType

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

    timeValue

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

    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.

Translation
Download
Updated: 2019-03-21

Document ID: EDOC1000166567

Views: 28054

Downloads: 123

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next