tencent cloud

云点播

ListFiles

Download
聚焦模式
字号
最后更新时间: 2026-05-19 15:02:03

1. API Description

Domain name for API request: vod.intl.tencentcloudapi.com.

This API is used to list stored file entries under a sub-app.

This API is available only in "FileID+Path mode".

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: ListFiles.
Version Yes String Common Params. The value used for this API: 2018-07-17.
Region No String Common Params. This parameter is not required.
SubAppId Yes Integer VOD application ID.
Prefix No String Object key prefix matching, limited to object keys whose names contain the specified prefix in response.
Delimiter No String A character separator used for grouping object keys. All object keys with the same part between the prefix or the start (if no prefix is specified) and the first delimiter are grouped as a prefix node under CommonPrefixes. Grouped object keys no longer appear in the subsequent object list.
MaxKeys No Integer ys Maximum number of entries returned at a time. Default value: 100. Minimum: 1. Maximum: 100.
Marker No String Starting object key marker
Categories.N No Array of String File type. Match any element in the collection:
  • Video: video file
  • Audio: audio file
  • Image: image file
  • 3. Output Parameters

    Parameter Name Type Description
    IsTruncated Boolean Whether the response entry is truncated.
    NextMarker String This node will be returned only when the response entries are truncated (IsTruncated is true). Its value is the last object key in the current response entries. When follow-up entries are required, input the value of this node as the marker parameter in the next request.
    CommonPrefixes Array of String The same part between the prefix or the start (if not specified) and the first delimiter is defined as Common Prefix. The node may return only if the delimiter parameter is specified in the request.
    Contents Array of FileContent Object entry.
    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 List all files under the application

    Input Example

    POST / HTTP/1.1
    Host: vod.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: ListFiles
    <Common request parameters>
    
    {
        "SubAppId": 1500035838
    }
    

    Output Example

    {
        "Response": {
            "CommonPrefixes": [],
            "Contents": [
                {
                    "Category": "Image",
                    "ETag": "\"5851a9f53660df65a9848b52fa7f78b0\"",
                    "FileId": "4424135348382730170",
                    "FileType": "OriginalFiles",
                    "Key": "dir2/image.jpg",
                    "LastModified": "2025-12-09T04:07:58.000Z",
                    "Size": 648712,
                    "StorageClass": "STANDARD"
                },
                {
                    "Category": "Video",
                    "ETag": "\"5352725bc44f2b72973fd97d1cf22161\"",
                    "FileId": "966263618845460745",
                    "FileType": "OriginalFiles",
                    "Key": "dir2/video.mp4",
                    "LastModified": "2025-12-15T04:23:50.000Z",
                    "Size": 118,
                    "StorageClass": "STANDARD"
                },
                {
                    "Category": "Video",
                    "ETag": "\"35a4ffd511d3f909ae4011f336836267-1\"",
                    "FileId": "966263618845458706",
                    "FileType": "OriginalFiles",
                    "Key": "video.mp4",
                    "LastModified": "2025-12-12T07:14:05.000Z",
                    "Size": 3303699,
                    "StorageClass": "STANDARD"
                }
            ],
            "IsTruncated": false,
            "NextMarker": "",
            "RequestId": "c4fe6ede-97dd-418d-aaf3-248e30e9bfd0"
        }
    }
    

    Example2 List files and folders in the root directory of the application

    Input Example

    POST / HTTP/1.1
    Host: vod.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: ListFiles
    <Common request parameters>
    
    {
        "SubAppId": 1500035838,
        "Delimiter": "/"
    }
    

    Output Example

    {
        "Response": {
            "CommonPrefixes": [
                "dir1/",
                "dir2/"
            ],
            "Contents": [
                {
                    "Category": "Video",
                    "ETag": "\"35a4ffd511d3f909ae4011f336836267-1\"",
                    "FileId": "966263618845458706",
                    "FileType": "OriginalFiles",
                    "Key": "video.mp4",
                    "LastModified": "2025-12-12T07:14:05.000Z",
                    "Size": 3303699,
                    "StorageClass": "STANDARD"
                }
            ],
            "IsTruncated": false,
            "NextMarker": "",
            "RequestId": "c4fe6ede-97dd-418d-aaf3-248e30e9bfd0"
        }
    }
    

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    InvalidParameterValue.SubAppId Incorrect parameter value: application id.

    帮助和支持

    本页内容是否解决了您的问题?

    填写满意度调查问卷,共创更好文档体验。

    文档反馈