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).
SSH Client

SSH Client

Global Attributes

Operation

URI

Description

PUT

/sshc/sshClient

Configure first-time authentication for an SSH client.

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

    Table 3-144 describes elements in requests.

    Table 3-144  Elements

    Element

    Description

    firstTimeEnable

    Enables or disables first-time authentication for the SSH client. This element is mandatory.

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

    Table 3-145 describes status codes in responses.

    Table 3-145  Status codes in responses

    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.

Configure the SSH Server and Key

Operation

URI

Description

DELETE

/sshc/sshCliKeyCfgs/sshCliKeyCfg

Delete the SSH server address and RSA key.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?> 
    <sshCliKeyCfg> 
    <serverName>10.0.0.1</serverName> 
    <pubKeyType>RSA</pubKeyType> 
    </sshCliKeyCfg>

    Table 3-146 describes elements in requests.

    Table 3-146  Elements

    Element

    Description

    serverName

    Delete the SSH server address and RSA key.

    pubKeyType

    Specifies the public key type. This element is mandatory.

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

    Table 3-147 describes status codes in responses.

    Table 3-147  Status codes in responses

    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.

SSH Connection

Operation

URI

Description

POST

/sshc/sshcConnects/sshcConnect

Create an SSH connection for purposes such as SFTP file transfer.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?> 
    <sshcConnect> 
        <HostAddrIPv4>10.0.0.1</HostAddrIPv4> 
        <commandType>get</commandType> 
        <userName>username</userName> 
        <password>password</password> 
        <localFileName>cfcard:/VRPV8.cc</localFileName> 
        <remoteFileName>image/VRPV8.cc</remoteFileName> 
        <identityKey>ssh-rsa</identityKey> 
        <transferType>SFTP</transferType> 
    </sshcConnect>

    Table 3-148 describes elements in requests.

    Table 3-148  Elements

    Element

    Description

    HostAddrIPv4

    Specifies the IPv4 address of the SSH server. This element is mandatory.

    commandType

    Specifies the file transfer operation, such as Get or Put. This element is mandatory.

    userName

    Specifies the user name. This element is mandatory.

    password

    Specifies the user password. This element is mandatory.

    localFileName

    Specifies the local file name. This element is mandatory.

    remoteFileName

    Specifies the remote file name. This element is mandatory.

    identityKey

    Specifies the local key type of the SSH connection. This element is mandatory.

    transferType

    Specifies the file transfer type. This element is mandatory.

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

    Table 3-149 describes status codes in responses.

    Table 3-149  Status codes in responses

    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 SFTP Asynchronous Transfer Status

Operation

URI

Description

GET

/sshc/sftpProQuerys/sftpProQuery

Query the SFTP asynchronous transfer status.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?>  
      <sftpProQuery>
        <serverPort>22</serverPort>
        <commandType>get</commandType>
        <localFileName>ccc</localFileName>
        <remoteFileName>aaa</remoteFileName>
        <userName>client001</userName>
      </sftpProQuery>

    Table 3-150 describes elements in requests.

    Table 3-150  Elements

    Elements

    Description

    serverPort

    Specifies the port number of the SSH server. This element is mandatory.

    commandType

    Specifies a file transfer operation, such as GET or PUT. This element is mandatory.

    userName

    Specifies a user name. This element is mandatory.

    localFileName

    Specifies the name of a local file. This element is mandatory.

    remoteFileName

    Specifies the name of a remote file. This element is mandatory.

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

    Table 3-151 describes status codes in responses.

    Table 3-151  Status codes in responses

    Status Code

    Description

    200 OK

    The operation succeeded.

    400 Bad Request

    The request cannot be implemented because the request is incorrect in syntax or the information attribute in the request is incorrect.

    500 Internal Server Error

    Internal errors in services cause a request failure or an unidentified request.

Translation
Download
Updated: 2019-03-21

Document ID: EDOC1000166567

Views: 17294

Downloads: 116

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