最近更新时间:2025-01-03 14:01:31
本接口(DescribeFileSystemFileList)用于查询特定文件系统的文件列表。
GET
请求参数包含公共请求参数和接口请求参数。其中,公共请求参数是每个接口都会用到的请求参数,具体参见公共参数及签名机制;接口请求参数是各个接口所特有的,具体参见下方说明:
请求头
名称 | 是否必须 | 值 |
---|---|---|
Accept | 是 | application/json |
请求体
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
FileSystemId | string | 是 | 文件系统的实例ID。 |
Dir | string | 否 | 需要以“/”开头,且"/"需要做encode。默认搜索根目录。 |
FileName | string | 否 | 当前目录下需要搜索的文件前缀。 |
PageNum | number | 否 | 页码。默认为1。 |
PageSize | number | 否 | 分页。默认为10。 |
Action | string | 是 | 该参数为公共参数,取值:DescribeFileSystemFileList。 |
Version | string | 是 | 该参数为公共参数,取值:2024-09-30。 |
名称 | 类型 | 描述 |
---|---|---|
RequestId | string | 唯一请求ID,每次请求都会返回。 |
Data | object[] | 目录或文件数据。 |
— Name | string | 文件名字。 |
— Type | string | 类型。有效值:
|
— Length | number | 文件大小。单位:B。 |
— UpdateTime | string | 文件最后修改时间。格式:2024-11-25 10:39:07。 |
PageSize | number | 页码。 |
PageNum | number | 分页大小。 |
TotalCount | number | 文件系统的文件总数。 |
请求示例
http://kpfs.api.ksyun.com?FileSystemId=301c1d57a1b14aadbb34ffccbf25369e&Dir=%2Fexample-fs%2Fsubdir&FileName=data&PageNum=1&PageSize=5&Action=DescribeFileSystemFileList&Version=2024-09-30
返回示例
{
"RequestId": "ea82d72e-0169-4970-8beb-92d3a10964d7",
"Data": [
{
"Name": "data1",
"Type": "dir",
"Length": 123480334336,
"UpdateTime": "2024-11-07 15:51:57"
},
{
"Name": "data2.txt",
"Type": "file",
"Length": 10485760,
"UpdateTime": "2024-11-07 12:12:16"
},
{
"Name": "data3..txt",
"Type": "file",
"Length": 17,
"UpdateTime": "2024-11-07 12:08:21"
},
{
"Name": "data4..txt",
"Type": "file",
"Length": 17,
"UpdateTime": "2024-11-07 12:08:21"
},
{
"Name": "data5..txt",
"Type": "file",
"Length": 17,
"UpdateTime": "2024-11-07 12:08:21"
}
],
"PageSize":5,
"PageNum":1,
"TotalCount":10000
}
纯净模式