List File By Folder

Search the file list under the specified directory.

Request Format

GET http://{apigw-address}/dfs-api/v1.0/search/searchFolderByPage

Request Parameters (URI)

Request parameters (URI)
Name Location (Path/Query) Required or not Data type Description
tenant Query True String Tenant name
loginTenant Query True String Currently logged-in tenant
filePath Query True String File path
pages Query False Int Page number. The default value 1 means the first page. If this parameter is not used in the query, the default value will be used.
pageSize Query False Int Page size. The default value 10 means that each page contains 10 records. If this parameter is not declared in the Query, the default value will be used.

Note

pageSize and pageToken are used to specify the display of returned results. For example, if you want to display the records from No.201 to No.300, you should set pageSize=100 pageToken=3. pageSize=100 is used to paginate the records into 100 records per page, while pageToken=3 means to search the third page, i.e. the records from No. 201 to No. 300.

Response parameters

Response parameters
Name Data type Description
status Int Status code
msg String Response message
submsg String Response sub-message
data Object Response data structure, the structure of which is in the table below
data object structure
Name Data type Description
pages Int Page number
pageSize Int Number of records contained in each page
totalSize Int Total number of actually returned records
data Array List of the file and folder objects under the target path. See the table below for its structure.
Member object structure of the data list
Name Data type Description
name String File name, including its extension
type String File type, which may be “file” or “folder”

Sample

Request Sample

GET //{apigw-address}/dfs-api/v1.0/search/searchFolderByPage?tenant=EDGE&filePath=/path/&pages=1&pageSize=3&loginTenant=EDGE

Return Sample

{
   "status":0,
   "msg":"success",
   "submsg":"",
   "data":{
      "pages":1,
      "pageSize":10,
      "totalSize":4,
      "data":[
         {
            "name":"test1.txt",
            "type":"file"
         },
         {
            "name":"test2.txt",
            "type":"file"
         },
         {
            "name":"/path",
            "type":"folder"
         },
         {
            "name":"/path2",
            "type":"folder"
         }
      ]
   }
}