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).
File System

File System

Display the Working Directory

Operation

URI

Description

GET

/vfm/pwds/pwd

Display the current working directory.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?> 
    <pwd> 
         <dictionaryName/> 
    </pwd>
  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?> 
    <pwd> 
        <dictionaryName>cfcard:/</dictionaryName> 
    </pwd>

    Table 3-122 describes elements in responses.

    Table 3-122  Elements

    Element

    Description

    dictionaryName

    Specifies the current working directory of a user.

    Table 3-123 describes status codes in responses.

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

Display File or Directory Information

Operation

URI

Description

GET

/vfm/dirs/dir

Obtain information about the specified file or directory.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?> 
    <dir> 
        <dirName>cfcard:/</dirName>
        <fileName>VRPV8.cc</fileName> 
    </dir>

    Table 3-124 describes elements in requests.

    Table 3-124  Elements

    Element

    Description

    dirName

    Specifies the directory where the file or directory to be displayed resides. This parameter is optional. If you do not specify this parameter, the current directory is used by default.

    fileName

    Specifies the name of the file or directory to be displayed. This element is mandatory.

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?> 
    <dir> 
        <fileName>VRPV8.cc</fileName> 
        <Attr>-rwx</Attr> 
        <DirSize>183,329,667</DirSize> 
        <modifyDatetime>2013-08-17T21:03:22</modifyDatetime> 
    </dir>

    Table 3-125 describes elements in responses.

    Table 3-125  Elements

    Element

    Description

    fileName

    Specifies the name of a file or directory.

    Attr

    Specifies the file or directory permission.

    DirSize

    Specifies the file or directory size.

    modifyDatetime

    Specifies the time when the file or directory is modified.

    Table 3-126 describes status codes in responses.

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

Obtain Disk Usage Information

Operation

URI

Description

GET

/vfm/dfs

Obtain disk usage information.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?> 
    <dfs> 
        <df> 
           <fileSys>flash</fileSys> 
           <inputPath>flash</inputPath> 
        </df> 
    </dfs>

    Table 3-127 describes elements in requests.

    Table 3-127  Elements

    Element

    Description

    fileSys

    Specifies the name of a file system.

    inputPath

    Specifies the path of a file system.

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?> 
    <dfs> 
        <df> 
           <fileSys>lash</fileSys> 
           <inputPath>flash</inputPath> 
           <totalSize>291991552</totalSize> 
           <freeSize>86472156</freeSize> 
           <usedPer>70</usedPer> 
        </df> 
    <dfs>

    Table 3-128 describes elements in responses.

    Table 3-128  Elements in responses

    Element

    Description

    fileSys

    Specifies the name of a file system.

    inputPath

    Specifies the path of a file system.

    totalSize

    Specifies the size of a file system, in KB.

    freeSize

    Specifies the available space of a file system, in KB.

    usedPer

    Specifies the utilization of a file system, in %.

    Table 3-129 describes status codes in responses.

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

Copy Files

Operation

URI

Description

POST

/vfm/copyFile

Copy files.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?> 
    <copyFile> 
        <srcFileName>flash:/VRPV8.cc</srcFileName> 
        <desFileName>slave#flash:/VRPV8.cc</desFileName> 
    </copyFile>

    Table 3-130 describes elements in requests.

    Table 3-130  Elements

    Element

    Description

    srcFileName

    Specifies the name of the source file. This element is mandatory.

    desFileName

    Specifies the name of the destination file. This element is mandatory.

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

    Table 3-131 describes status codes in responses.

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

Delete Files

Operation

URI

Description

POST

/vfm/deleteFileUnRes

Permanently deletes a file.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?> 
    <deleteFileUnRes> 
        <fileName>slave#cfcard:/VRPV8.cc</fileName> 
    </deleteFileUnRes>

    Table 3-132 describes elements in requests.

    Table 3-132  Elements

    Element

    Description

    fileName

    Specifies the name of the file to be deleted. This element is mandatory.

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

    Table 3-133 describes status codes in responses.

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

Compress Files

Operation

URI

Description

POST

/vfm/zipFile

Compress files.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?> 
    <zipFile> 
        <srcFileName>src.txt</srcFileName>
        <desFileName>des.zip</desFileName>
        <password>123456789a</password>
        <overwriteType>yes</overwriteType> 
    </zipFile>

    Table 3-134 describes elements in requests.

    Table 3-134  Elements

    Element

    Description

    srcFileName

    Specifies the name of the source file to be decompressed. The value can be a full path or a relative path.

    desFileName

    Specifies the name of the destination file after decompression. The value can be a full path or a relative path.

    password

    Specifies the password for decompression authentication. The value contains letters, digits, and special characters and does not support Chinese characters.

    overwriteType

    Indicates whether to overwrite the file with the same name as the destination file.

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

    Table 3-135 describes status codes in responses.

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

Decompress Files

Operation

URI

Description

POST

/vfm/unzipFile

Decompress Files.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?> 
    <unzipFile> 
        <srcFileName>src.zip</srcFileName>
        <desFileName>des.txt</desFileName>
        <password>123456789a</password>
        <overwriteType>yes</overwriteType> 
    </unzipFile>

    Table 3-136 describes status codes in responses.

    Table 3-136  Elements

    Element

    Description

    srcFileName

    Specifies the name of the source file to be decompressed. The value can be a full path or a relative path.

    desFileName

    Specifies the name of the destination file after decompression. The value can be a full path or a relative path.

    password

    Specifies the password for decompression authentication. The value contains letters, digits, and special characters and does not support Chinese characters.

    overwriteType

    Indicates whether to overwrite the file with the same name as the destination file.

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

    Table 3-137 describes status codes in responses.

    Table 3-137  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: 30007

Downloads: 127

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