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)¶
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 |
pageSize |
Query |
False |
Int |
Page size. The default value |
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¶
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 |
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. |
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"
}
]
}
}