Search File¶
Search the file directory.
Request Format¶
GET http://{apigw-address}/dfs-api/v1.0/search/searchFileByPage
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 |
fileName | Query | True | String | File name |
pages | Query | False | Int | Page number. The default value “1” means the first page. If this parameter is not declared 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¶
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 | Size of each page |
totalSize | Int | Total number of returned records |
data | Object | List consisting of the file detail structures. See the table below for its structure |
Name | Data type | Description |
---|---|---|
fileName | String | File name |
filePath | String | File path |
fileSize | String | File size |
Sample¶
Request sample¶
GET http://{apigw-address}/dfs-api/v1.0/download?tenant=EDGE&fileName=sample.txt&pages=3&pageSize=3&loginTenant=EDGE
Return sample¶
{
"status":0,
"msg":"success",
"submsg":"",
"data":{
"pages":1,
"pageSize":3,
"totalSize":3,
"data":[
{
"fileName":"test.txt",
"filePath":"/2019092011/",
"fileSize":"1.2 KB"
},
{
"fileName":"test.txt",
"filePath":"/2019092012/",
"fileSize":"23 B"
},
{
"fileName":"test.txt",
"filePath":"/2019092013/",
"fileSize":"2 B"
}
]
}
}