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).
SNMPv3 User

SNMPv3 User

Create an SNMPv3 User

Operation

URI

Description

POST

/snmp/usmUsers/usmUser

Create an SNMPv3 user.

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

    Table 3-380  Elements

    Element

    Description

    userName

    Specifies an SNMPv3 user name.

    remoteEngineID

    Specifies a remote engine ID.

    engineID

    Specifies a local engine ID.

    groupName

    Specifies the name of an SNMPv3 user group.

    authProtocol

    Specifies an authentication mode.

    authKey

    Specifies an authentication key.

    privProtocol

    Specifies an encryption mode.

    privKey

    Specifies an encryption key.

    aclNumber

    Specifies an ACL number.

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

Query SNMPv3 User Configurations

Operation

URI

Description

GET

/snmp/usmUsers/usmUser

Query SNMPv3 user configurations.

  • Request example
    <?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.

    remoteEngineID

    Specifies a remote engine ID.

    engineID

    Specifies an SNMP engine ID.

    groupName

    Specifies the group to which an SNMPv3 user belongs.

    authProtocol

    Specifies an authentication mode.

    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.

    leftLockTime

    Specifies the remaining time before a user is unlocked.

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

    Table 3-383  Elements

    Element

    Description

    userName

    Specifies an SNMPv3 user name.

    remoteEngineID

    Specifies a remote engine ID.

    engineID

    Specifies an SNMP engine ID.

    groupName

    Specifies the group to which an SNMPv3 user belongs.

    authProtocol

    Specifies an authentication mode.

    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.

    leftLockTime

    Specifies the remaining time before a user is unlocked.

    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.

Modify SNMPv3 User Parameters

Operation

URI

Description

PUT

/snmp/usmUsers/usmUser

Modify SNMPv3 user parameters.

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

    remoteEngineID

    Specifies a remote engine ID.

    engineID

    Specifies an SNMP engine ID.

    groupName

    Specifies the group to which an SNMPv3 user belongs.

    authProtocol

    Specifies an authentication mode.

    authKey

    Specifies an authentication key.

    privProtocol

    Specifies an encryption mode.

    privKey

    Specifies an encryption key.

    aclNumber

    Specifies an ACL number.

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

Delete an SNMPv3 User from a User Group

Operation

URI

Description

DELETE

/snmp/usmUsers/usmUser

Delete an SNMPv3 user from a user group.

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

    remoteEngineID

    Specifies a remote engine ID.

    engineID

    Specifies an SNMP engine ID.

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

Translation
Download
Updated: 2019-05-05

Document ID: EDOC1100004147

Views: 60716

Downloads: 28

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Share
Previous Next