All Products
Search
Document Center

Drive and Photo Service:ListFile

Last Updated:Mar 31, 2026

Lists the files and folders that are immediate children of a specified folder.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST /v2/file/list HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

share_id

string

No

The share ID. To access files through sharing, include the `x-share-token` header for authentication and specify `share_id`. In this case, `drive_id` is ignored. Otherwise, use an `AccessKey pair` or `access token` for authentication and specify `drive_id`. You must specify either `share_id` or `drive_id`.

7JQX1FswpQ8

drive_id

string

No

The drive ID. You must specify either `drive_id` or `share_id`.

1

parent_file_id

string

Yes

The ID of the parent folder. Set this parameter to `root` to list files in the root directory.

root

limit

integer

No

The maximum number of results to return per request. Valid values: 1 to 100. The actual number of returned results may be less than this value.

50

marker

string

No

The pagination token that indicates the position from which the next set of results begins. If this parameter is not specified, results are returned from the beginning. Leave this parameter empty by default.

NWQ1Yjk4YmI1ZDRlYmU1Y2E0YWE0NmJhYWJmODBhNDQ2NzhlMTRhMg

status

string

No

The file status used to filter results. Valid values: `available` (returns only available files) and `uploading` (returns only files being uploaded). Default value: `available`.

Valid values:

  • available :
  • uploading :

available

order_by

string

No

The field by which to sort results. Valid values: `created_at` (creation time), `updated_at` (last modified time), `size` (file size), and `name` (file name). Default value: `created_at`.

Valid values:

  • updated_at :
  • size :
  • name :
  • created_at :

updated_at

order_direction

string

No

The sort order. Valid values: `ASC` (ascending) and `DESC` (descending). Default value: `ASC`.

Valid values:

  • ASC :
  • DESC :

ASC

category

string

No

The file category used to filter results. Valid values: `app` (installation package), `zip` (compressed file), `image`, `doc` (document), `video`, `audio`, and `others`. By default, files of all categories are returned.

Valid values:

  • app :
    app
  • zip :
    zip
  • image :
    image
  • doc :
    doc
  • video :
    video
  • audio :
    audio
  • others :
    others

image

type

string

No

The item type used to filter results. Valid values: `file` (returns only files) and `folder` (returns only folders). By default, both files and folders are returned.

Valid values:

  • file :
  • folder :

file

fields

string

No

Specifies additional fields to include in the response for each child item. Valid values: * `url`: includes the thumbnail and download URLs. * `exif`: includes Exchangeable Image File Format (EXIF) data. * `cropping_suggestion`: includes cropping suggestions. * `characteristic_hash`: includes the characteristic hash value. * `video_metadata`: includes video metadata such as duration, bitrate, height, and width. * `video_preview_metadata`: includes video transcoding information for each definition. * `investigation_info`: includes investigation information. * `dir_size`: includes statistics for each subfolder. * `user_tags`: includes user-defined tags. Separate multiple fields with commas (,). Example: `url,dir_size,user_tags`.

url,dir_size,user_tags

thumbnail_processes

object

No

The thumbnail configurations specified as key-value pairs. You can define custom keys, and the corresponding thumbnail URLs are returned with those keys. A maximum of five thumbnails can be returned per request.

ImageProcess

No

The processing rules for generating thumbnails of images, videos, and documents.

Response elements

Element

Type

Description

Example

object

Schema of Response

items

array

The list of files and folders.

File

The file or folder information.

next_marker

string

The pagination token for the next page of results. This value is empty if the current page is the last page.

NWQ1Yjk4YmI1ZDRlYmU1Y2E0YWE0NmJhYWJmODBhNDQ2NzhlMTRhMg

Examples

Success response

JSON format

{
  "items": [
    {
      "domain_id": "bj1",
      "drive_id": "1",
      "file_id": "5d79206586bb5dd69fb34c349282718146c55da7",
      "name": "1.mov",
      "type": "file",
      "content_type": "application/json",
      "created_at": "2019-08-20T06:51:27.292Z",
      "updated_at": "2019-08-20T06:51:27.292Z",
      "description": "image file",
      "trashed_at": "2019-08-20T06:51:27.292Z",
      "file_extension": "txt",
      "hidden": false,
      "size": 1024,
      "starred": false,
      "status": "available",
      "labels": [
        "[\"label1:1\", \"label2:2\"]"
      ],
      "upload_id": "C9DCFE5A82644AC7A02DB74C30C934A6",
      "parent_file_id": "3d5b846942cf94fa72324c8a4bda34e81da635a",
      "crc64_hash": "3574582125365864471",
      "content_hash": "EA4942AA8761213890A5C386F88E6464D2C31CA3",
      "content_hash_name": "sha1",
      "download_url": "https://data.aliyunpds.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx",
      "thumbnail": "https://data.aliyunpds.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx",
      "category": "image",
      "local_created_at": "2019-08-20T06:51:27.292Z",
      "local_modified_at": "2019-08-20T06:51:27.292Z",
      "revision_id": "5d5b846942cf94fa72324c14a4bda34e81da635d",
      "thumbnail_urls": {
        "key": "\"128X128\": \"https://url1\", \"800X800\": \"url2\""
      },
      "image_media_metadata": {
        "time": "2006-01-02T15:04:05.000Z07:00",
        "width": 1024,
        "height": 1024,
        "location": "30.185453,120.218522",
        "country": "China\n",
        "province": "Zhejiang\n",
        "city": "Hangzhou\n",
        "district": "Binjiang District\n",
        "township": "Xixing Street\n",
        "address_line": "Jiangling Road, Xixing Street, Binjiang District, Hangzhou, Zhejiang\n",
        "image_tags": [
          {
            "confidence": 0.98,
            "parent_name": "sport",
            "name": "basketball",
            "tag_level": 3,
            "source": "play basketball",
            "centric_score": 0.877
          }
        ],
        "faces": "[{\"FaceId\":\"a9a66a86-73dd-4c95-8b79-1d8a49db5226\",\"GroupId\":\"Cluster-e3b7fb52-22b3-44f2-9746-8c1804bd6af0\",\"FaceConfidence\":0.999,\"Age\":13,\"AgeConfidence\":4,\"Gender\":\"female\",\"GenderConfidence\":1,\"Emotion\":\"none\",\"EmotionConfidence\":0.672,\"FaceAttributes\":{\"Mask\":\"none\",\"MaskConfidence\":0.894,\"Beard\":\"none\",\"BeardConfidence\":0.997,\"Glasses\":\"none\",\"GlassesConfidence\":0.999,\"Mouth\":\"close\",\"MouthConfidence\":0.937,\"Hat\":\"none\",\"HatConfidence\":0.998,\"HeadPose\":{\"Pitch\":10.684,\"Roll\":-10.707,\"Yaw\":-20.094},\"FaceBoundary\":{\"Width\":457,\"Height\":687,\"Top\":1324,\"Left\":1356}}}]",
        "faces_thumbnail": [
          {
            "face_id": "a9a66a86-73dd-4c95-8b79-1d8a49db5226",
            "face_group_id": "Cluster-e3b7fb52-22b3-44f2-9746-8c1804bd6af0",
            "face_thumbnail": "https://pds-domain.region.aliyuncs.com/QieGeH98%2F1001%2F63e5e551ee621482ab934a0687c6cda75fc07864%2F642a8a40c00f1ad379df421694713ee65170f09b?security-token=CAIS%2BgF1q6Ft5B2yfSjIr5bjHPCNnrdR8aSaSW7woVlmVd1Bt5HorDz2IHpPfHdoBe0btvU%2BlWxX6fwZlq5rR4QAXlDfNSyFeX20qFHPWZHInuDox55m4cTXNAr%2BIhr%2F29CoEIedZdjBe%2FCrRknZnytou9XTfimjWFrXWv%2Fgy%2BQQDLItUxK%2FcCBNCfpPOwJms7V6D3bKMuu3OROY6Qi5TmgQ41En1DIlt%2FXuk5DCtkqB12eXkLFF%2B97DRbG%2FdNRpMZtFVNO44fd7bKKp0lQLsUMSqv8q0fEcqGaW4o7CWQJLnzyCMvvJ9OVDFyN0aKEnH7J%2Bq%2FzxhTPrMnpkSlacGoABPMvZ8rSESUEP96Vbf%2Bk0JRg9Qb1MnaIJqWAgo8K6K0UP1CtqL2zrUtugpKKDHOYiKbq2O0S5yLUPVX5vBHqEi%2FFc7i6ZnHCMcXLJs4rKDKwRBEhovUXXlklq2q43OSVtLrXkBy9Xs1ers%2FhJhcxpNA0Vl3EWfJxa2BTylEdnLOQ%3D&x-oss-access-key-id=STS.NUVWJ9shpFfqKHAEY3YRmXTCN&x-oss-expires=1686455451&x-oss-process=image%2Fcrop%2Cx_1128%2Cy_1211%2Cw_914%2Ch_914%2Fformat%2Cjpg&x-oss-signature=jmhOz91Tww1ciMEwadDiioU7d93FDiBNr8s8mHyMqW0%3D&x-oss-signature-version=OSS2"
          }
        ],
        "exif": "{\"Compression\":{\"value\":\"6\"},\"DateTime\":{\"value\":\"2020:08:19 17:11:11\"}}",
        "image_quality": {
          "overall_score": 0.736
        }
      },
      "user_tags": {
        "key": "\"k1\":\"v1\", \"k2\",\"v2\""
      },
      "video_media_metadata": {
        "width": 1920,
        "height": 1080,
        "video_media_video_stream": [
          {
            "duration": "22.88",
            "bitrate": "108420",
            "code_name": "h264",
            "frame_count": "90"
          }
        ],
        "video_media_audio_stream": [
          {
            "duration": "7704.573000",
            "bit_rate": "129280",
            "code_name": "aac"
          }
        ]
      },
      "id_path": "id1/id2",
      "name_path": "root/f1/f2",
      "dir_size_info": {
        "dir_count": 1,
        "file_count": 10
      },
      "action_list": [
        ""
      ],
      "auto_delete_left_sec": 0
    }
  ],
  "next_marker": "NWQ1Yjk4YmI1ZDRlYmU1Y2E0YWE0NmJhYWJmODBhNDQ2NzhlMTRhMg"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.