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).
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-436 describes elements in requests.

    Table 3-436  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-437 describes status codes in responses.

    Table 3-437  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-438 describes elements in requests.

    Table 3-438  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-439 describes elements in responses.

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

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-441 describes elements in requests.

    Table 3-441  Elements

    Element

    Description

    vlanId

    Specifies a VLAN ID.

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

    Table 3-442 describes status codes in responses.

    Table 3-442  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-443 describes elements in requests.

    Table 3-443  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-444 describes status codes in responses.

    Table 3-444  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-445 describes elements in requests.

    Table 3-445  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-446 describes elements in responses.

    Table 3-446  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-447 describes status codes in responses.

    Table 3-447  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: 22330

Downloads: 118

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