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

Configuration Guide - Network Management and Monitoring

CloudEngine 8800, 7800, 6800, and 5800 V200R005C10

This document describes the configurations of Network Management and Monitoring, including SNMP, RMON, NETCONF, OpenFlow, LLDP, NQA, Mirroring, Packet Capture, Packet Trace, Path and Connectivity Detection Configuration, NetStream, sFlow, and iPCA.
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).
POST

POST

The POST method is used by the client to create configuration or invoke a remote procedure call (RPC) operation. It carries operation parameters through the message-body of the HTTP message.

The server uses the target resource type to determine how to process the request.
  • If the target resource type is YANG-defined configuration, the POST operation is used to create configuration.
  • If the target resource type is YANG-defined RPC method, the POST operation is used to invoke an RPC operation.
Table 4-10 POST operation methods

Target Resource Type

URI Format

Description

Configuration

/restconf/data/identifier

Creates data and returns the specific state. identifier specifies the data node on which data will be stored.

RPC operation

/restconf/operations/moduleName:rpcName

Invokes a YANG-defined RPC operation.
  • moduleName specifies a module name.
  • rpcName specifies the name of a YANG-defined RPC operation.
Table 4-11 Message example 1

XML Format

JSON Format

Create domainName and accessLimit configurations.
  • Request

    POST /restconf/data/huawei-aaa:aaa/domains HTTP/1.1
    Host: X.X.X.X
    Content-Type: application/yang-data+xml
    
    <domain xmlns="http://www.huawei.com/netconf/vrp/huawei-aaa">
    <domainName>abc</domainName>
    <accessLimit>10</accessLimit>
    </domain>
  • Response

    HTTP/1.1 201 Created
    Content-Type:application/yang-data+xml
    Content-Length:0
Create domainName and accessLimit configurations.
  • Request

    POST /restconf/data/huawei-aaa:aaa/domains HTTP/1.1
    Host: X.X.X.X
    Content-Type: application/yang-data+json
    
    {
          "huawei-aaa:domain" : {
            "domainName" : "jcr123",
            "accessLimit" : "10"
          }
    }
  • Response

    HTTP/1.1 201 Created
    Content-Type:application/yang-data+json
    Content-Length:0
Table 4-12 Message example 2

XML Format

JSON Format

Invoke an RPC operation to force the user named test_user to go offline.
  • Request

    POST /restconf/operations/huawei-aaa:cutUserByUserName HTTP/1.1
    Host: X.X.X.X
    Content-Type: application/yang-data+xml
    
    <input xmlns="http://www.huawei.com/netconf/vrp/huawei-aaa">
    <userName>test_user</userName>
    </input>
  • Response

    HTTP/1.1 204 No Content
    Content-Type:application/yang-data+xml
    Content-Length:0
Invoke an RPC operation to force the user named test_user to go offline.
  • Request

    POST /restconf/operations/huawei-aaa:cutUserByUserName HTTP/1.1
    Host: X.X.X.X
    Content-Type: application/yang-data+json
    
    {
    "huawei-aaa:input" : {
    "userName" : "test_user"
    }
    }
  • Response

    HTTP/1.1 204 No Content
    Content-Type:application/yang-data+json
    Content-Length:0
Translation
Download
Updated: 2019-04-20

Document ID: EDOC1100075365

Views: 37255

Downloads: 125

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