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 12800 and 12800E V200R003C00

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).
Single VLAN

Single VLAN

Create a Single VLAN

Operation

URI

Description

POST

/vlan/vlans/vlan

Create a single VLAN.

  • 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.

    • common: common VLAN
    • super: super VLAN
    • sub: sub-VLAN

    subVlans

    Specifies a sub-VLAN list.

    superVlan

    Specifies a super VLAN ID.

  • 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.

Query VLAN Information

Operation

URI

Description

GET

/vlan/vlans/vlan

Query VLAN information.

  • 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.

    adminStatus

    Indicates the administrative status of a VLAN.

    • up: enables a VLAN.
    • down: disables a VLAN.

    vlanType

    Specifies a VLAN type.

    • common: common VLAN
    • super: super VLAN
    • sub: sub-VLAN

    subVlans

    Specifies a sub-VLAN list.

    superVlan

    Specifies a super VLAN ID.

  • 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.

    • common: common VLAN
    • super: super VLAN
    • sub: sub-VLAN

    adminStatus

    Indicates the administrative status of a VLAN.

    • up: enables a VLAN.
    • down: disables a VLAN.

    subVlans

    Specifies a sub-VLAN list.

    superVlan

    Specifies a super VLAN ID.

    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.

Delete a Single VLAN

Operation

URI

Description

DELETE

/vlan/vlans/vlan

Delete the created VLAN.

  • 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.

  • 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.

    400 Bad Request

    The request operation failed because the request is incorrect in syntax or the information 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 VLAN Attributes

Operation

URI

Description

PUT

/vlan/vlans/vlan

Modify VLAN attributes.

  • 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>0200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000:0200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000</groupVlans>
            </muxVlan>
        </vlan>

    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.

    • up: enables a VLAN.
    • down: disables a VLAN.

    vlanType

    Specifies a VLAN type.

    • common: common VLAN
    • super: super VLAN
    • sub: sub-VLAN
    • principle: MUX VLAN
    • separate: separate VLAN
    • 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.

  • 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.

    500 Internal Server Error

    The request operation failed because of internal errors in services or unidentified processing errors.

Query VLAN Member Interface Information

Operation

URI

Description

GET

/vlan/vlans/vlan

Query VLAN member interface information.

  • 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:

    • access
    • trunk
    • hybrid
    • dot1q-tunnel

    tagMode

    Indicates whether an interface is in tag or untag mode.

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?>
        <vlan>
            <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:

    • access
    • trunk
    • hybrid
    • 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.

Translation
Download
Updated: 2019-05-05

Document ID: EDOC1100004147

Views: 59908

Downloads: 28

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Share
Previous Next