ListDatasetFileMetas

Updated at:

Queries the list of dataset files.

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

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

paidataset:ListDatasetFileMetas

list

*All Resource

*

None None

Request syntax

GET /api/v1/datasets/{DatasetId}/datasetfilemetas HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

DatasetId

string

Yes

The dataset ID. For more information about how to obtain the dataset ID, see ListDatasets.

d-rbvg5*****jhc9ks92

Request parameters

Parameter

Type

Required

Description

Example

DatasetVersion

string

Yes

The dataset version name.

v1

WorkspaceId

string

Yes

The ID of the workspace to which the dataset belongs. For more information about how to obtain the workspace ID, see ListWorkspaces.

105173

QueryType

string

No

The retrieve type. Valid values:

  • MIX: Hybrid retrieve. This is the default value.

  • TAG: Label-only retrieve.

  • VECTOR: AISearch-only retrieve.

Valid values:

  • TAG :

    TAG

  • MIX :

    MIX

  • VECTOR :

    VECTOR

MIX

QueryText

string

No

The text content to search.

A fallen water

TopK

integer

No

The number of search results to return. A maximum of TopK search results are returned.

Note

This parameter takes effect only when QueryType is set to VECTOR or MIX.

100

ScoreThreshold

number

No

The similarity score threshold for filtering. Only results with a score greater than ScoreThreshold are returned.

Note

This parameter takes effect only when QueryType is set to VECTOR or MIX.

0.6

PageSize deprecated

integer

No

The number of entries per page. If MaxResults is also specified, MaxResults prevails.

Note

This parameter will soon be offline. We recommend that you use NextToken and MaxResults for paging in paged query operations.

10

NextToken

string

No

The pagination cursor.

Note

If this parameter is not specified, the first page of data is returned. If this parameter has a return value, it indicates that there is a next page. You can use the returned NextToken as a parameter to request the next page of data until Null is returned, which indicates that all data is retrieved.

90a6ee35-****-4cd4-927e-1f45e1cb8b62_1729644433000

SortBy

string

No

The sorting field for paged query. If this parameter is not specified, the results are sorted by retrieve relevance in descending order during paging. Valid values:

  • FileCreateTime: Sort by file creation time.

  • FileUpdateTime: Sort by file last modification time.

Valid values:

  • FileCreateTime :

    FileCreateTime

  • FileUpdateTime :

    FileUpdateTime

FileCreateTime

Order

string

No

The ascending or descending order for the specified sorting field in a paged query. This parameter is used together with SortBy during paging. Default value: DESC. Valid values:

  • ASC: Ascending order.

  • DESC: Descending order.

Valid values:

  • ASC :

    ASC

  • DESC :

    DESC

DESC

EndFileUpdateTime

string

No

The end time of the file update time range for the query. Specify the time in the ISO 8601 standard in UTC.

2025-01-12T14:36:01.000Z

StartFileUpdateTime

string

No

The start time of the file update time range for the query. Specify the time in the ISO 8601 standard in UTC.

2025-01-12T14:36:01.000Z

QueryImage

string

No

The image information for image-to-image search.

  • Supports passing an OSS URL that allows public network access for the image. Format: oss://{bucket_name}/{object_path}. bucket_name is the bucket name, and object_path is the path of the file in the bucket.

Note

This parameter takes effect only when QueryType is set to VECTOR or MIX.

oss://test-xxx-oss/car/0001.png

ThumbnailMode

string

No

The thumbnail mode for images. Currently, only OSS files support thumbnails. Valid values:

  • Proportional scaling: p_{percentage}. percentage indicates the expected scaling ratio. Valid values: [1, 100]. Example: p_50 indicates that the thumbnail size is 50% of the original file size.

  • Fixed width and adaptive height: w_{width}. width indicates the expected image width. Valid values: [1, 16384]. Example: w_200 indicates that the image width is fixed at 200 pixels and the height is adaptively scaled.

  • Fixed height and adaptive width: h_{height}. height indicates the expected image height. Valid values: [1, 16384]. Example: h_100 indicates that the image height is fixed at 100 pixels and the width is adaptively scaled.

  • Fixed width and height with padding: m_pad,w_{width},h_{height},color_{RGB}. m_pad indicates that the image is scaled to the maximum size within the specified w and h rectangle. RGB specifies the color used to fill the blank space in the center. If this parameter is not specified, white is used by default. width indicates the expected image width, and height indicates the expected image height. Valid values of width and height: [1, 16384]. Example:

  • Fixed width and height with center cropping: m_fill,w_{width},h_{height}. m_fill indicates that the image is proportionally scaled to the minimum size that extends beyond the specified w and h rectangle, and the excess part is center-cropped. width indicates the expected image width, and height indicates the expected image height. Valid values of width and height: [1, 16384]. Example: m_fill,w_100,h_100 indicates that the image width and height are both fixed at 100 pixels for center cropping and scaling.

  • Forced width and height scaling: m_fixed,w_{width},h_{height}. width indicates the expected image width, and height indicates the expected image height. Valid values of width and height: [1, 16384]. Example: m_fixed,w_100,h_100 indicates that the image width and height are both fixed at 100 pixels for forced scaling.

w_100

DatasetFileMetaIds

array

No

The list of metadata IDs to query.

string

No

The metadata ID.

5dc037c8ec0a6fc4e15741328e531bbee036exxxxxxxxx722eff66c38a90e08c

QueryTagsIncludeAll

array

No

The search condition for "including all of the following tags". You can select multiple tags, and the search results must meet all these tags simultaneously. If this parameter is empty, this condition is not applied. Separate multiple tags with commas.

Note

This parameter takes effect only when QueryType is set to TAG or MIX. When QueryType is set to TAG, QueryText is added to this condition.

string

No

The tag name.

Lane line

QueryTagsIncludeAny

array

No

The search condition for "including any of the following tags". You can select multiple tags, and the search results only need to meet one of them. If this parameter is empty, this condition is not applied. Separate multiple tags with commas.

Note

This parameter takes effect only when QueryType is set to TAG or MIX.

string

No

The tag name.

Lane line

QueryTagsExclude

array

No

The search condition for "excluding the following tags". You can select multiple tags, and the search results must not contain these tags. If this parameter is empty, this condition is not applied.

Note

This parameter takes effect only when QueryType is set to TAG or MIX.

string

No

The tag name.

Lane line

QueryFileName

string

No

The file name search condition. Fuzzy search is supported.

car

QueryFileDir

string

No

The file directory search condition. Fuzzy search is supported.

cars/20250221/

QueryFileTypeIncludeAny

array

No

The search condition for "including any of the following file types". You can select multiple file types, and the search results only need to meet one of them. If this parameter is empty, this condition is not applied. Separate multiple file types with commas.

string

No

The file type.

image

QueryContentTypeIncludeAny

array

No

The search condition for "including any of the following file content types". You can select multiple file content types, and the search results only need to meet one of them. If this parameter is empty, this condition is not applied. Separate multiple file content types with commas.

string

No

The file content type.

image/jpeg

StartTagUpdateTime

string

No

The start time of the tag last update time range for the query. Specify the time in the ISO 8601 standard in UTC.

2025-01-12T14:36:01.000Z

EndTagUpdateTime

string

No

The end time of the tag last update time range for the query. Specify the time in the ISO 8601 standard in UTC.

2025-01-12T14:36:01.000Z

MaxResults

integer

No

The maximum number of results to return per query when NextToken is used. Valid values: 1 to 100. Default value: 10.

10

QueryExpression

string

No

The query statement (DSL) is a domain-specific language used to express complex search conditions. It supports grouping, Boolean logic (AND/OR/NOT), range comparison (>, >=, <, <=), property existence (HAS/NOT HAS), token matching (:), and exact matching (=), and is suitable for advanced search scenarios. It is generally used for complex advanced search conditions.

Important To avoid conflicts, do not mix this query statement with other query parameters.

(FileUpdateTime > '2025-02-28T00:00:00Z' AND FileUpdateTime < '2025-05-30T09:27:29Z') AND FileDir:'blue_car' AND NOT FileName="toyota.jpg" AND (( Tags.all='lane line' AND Tags.all='barrier gate') OR NOT Tags.user='rainy days' ) AND HAS SemanticIndexJobId AND Content:'a fallen water horse' AND TopK=100 AND SignMode='PUBLIC'

Status

string

No

The metadata status to query. Valid values:

  • ACTIVE: Query only undeleted data. This is the default value.

  • ALL: Query all data.

  • DELETED: Query only logically deleted data.

Valid values:

  • ALL :

    Queries all data.

  • ACTIVE :

    Queries only undeleted data.

  • DELETED :

    Queries only logically deleted data.

ACTIVE

QueryVideo

string

No

The video file information for video search.

  • Supports passing an OSS URL that allows public network access for the video. Format: oss://{bucket_name}/{object_path}. bucket_name is the bucket name, and object_path is the path of the file in the bucket.

Note

This parameter takes effect only when QueryType is set to VECTOR or MIX.

oss://test-xxx-oss/car/0001.mp4

DSL query syntax

KeywordDescriptionExample
:Token matchingFileName:'lane line'
Finds data whose file name contains the token "lane line" after tokenization.

NOT :Token mismatchNOT FileName : 'lane line'
Finds data whose file name does not contain the token "lane line" after tokenization.

=Exact value matchingFileType='image'
Finds data whose file type is "image" (exact match).

NOT =Exact value exclusionNOT FileType = 'video'
Finds all data whose FileType is not equal to "video".

HASExistsHAS SemanticIndexJobId
Finds all data that has the SemanticIndexJobId property.

NOT HASDoes not existNOT HAS SemanticIndexJobId
Finds all data that does not have the SemanticIndexJobId property.

""Wraps the string type of the valueSingle and double quotes have the same effect.
()Grouping operation(FileName:'black' AND ContentType='image/jpeg') OR (FileName:'white' AND ContentType='image/png')
Finds data where FileName fuzzy matches black and ContentType is image/jpeg, or FileName fuzzy matches white and ContentType is image/png.

>Range query:
Greater than

FileUpdateTime> '2025-01-16T11:52:56.000Z' AND DataSize >= 12345
Finds data whose file last modification time is after 2025-01-16T11:52:56.000Z and file size is greater than or equal to 12345 bytes.

>=Range query:
Greater than or equal to

Same as above.
<Range query:
Less than

FileUpdateTime < '2025-01-16T11:52:56.000Z' AND DataSize <= 12345
Finds data whose file last modification time is before 2025-01-16T11:52:56.000Z and file size is less than or equal to 12345 bytes.

<=Range query:
Less than or equal to

Same as above.
ANDAnd
Case-insensitive

FileType='image' AND ContentType:'image/png'
Finds images whose file type is image and file format is png.

OROr
Case-insensitive

FileType='image' OR FileType='video'
Finds data whose file type is image or video.

Supported DSL query properties

Supports basic file metadata properties, label properties, AISearch properties, and general retrieve properties. All properties must be optional in query conditions.

Property types:

  • KEYWORD: Supports only one or more of equal to, not equal to, exists, and does not exist.

  • TEXT: Supports only one or more of token inclusion, token exclusion, equal to, not equal to, exists, and does not exist.

  • NUMBER: Supports only one or more of range query, equal to, exists, and does not exist.

  • DATE: Supports only one or more of range query, exists, and does not exist.

Basic metadata properties

Property nameInternal typeToken inclusionToken exclusionEqual toNot equal toExists/Does not existRange queryAND logicOR logic
DatasetFileMetaIdKEYWORD--✅✅✅-✅✅
FileNameTEXT✅✅✅✅✅-✅✅
FileDirTEXT✅✅✅✅✅-✅✅
FileTypeKEYWORD--✅✅✅-✅✅
ContentTypeKEYWORD--✅✅✅-✅✅
DataSizeNUMBER--✅-✅✅✅✅
FileUpdateTimeDATE----✅✅✅✅
SyncTimeDATE----✅✅✅✅
TagUpdateTimeDATE----✅✅✅✅
SemanticIndexUpdateTimeDATE----✅✅✅✅
StatusKEYWORD--✅❌❌-✅❌

Tag properties

Property nameInternal typeToken inclusionToken exclusionEqual toNot equal toExists/Does not existRange queryAND logicOR logic
Tags.aiKEYWORD--✅✅✅-✅✅
Tags.userKEYWORD--✅✅✅-✅✅
Tags.allKEYWORD--✅✅✅-✅✅

Vector query properties

Property nameInternal typeToken inclusionToken exclusionEqual toNot equal toExists/Does not existRange queryAND logicOR logic
ContentTEXT✅-❌❌❌-✅❌
TopKNUMBER--✅-❌❌✅❌
ScoreThresholdNUMBER--✅-❌❌✅❌

General query properties

Property nameInternal typeToken inclusionToken exclusionEqual toNot equal toExists/Does not existRange queryAND logicOR logic
QueryTypeKEYWORD--✅❌❌-✅❌
SignModeKEYWORD--✅❌❌-✅❌
ThumbnailModeKEYWORD--✅❌❌-✅❌
SortByKEYWORD--✅❌❌-✅❌
OrderKEYWORD--✅❌❌-✅❌
NextTokenKEYWORD--✅❌❌-✅❌
MaxResultsNUMBER--✅-❌❌✅❌

Response elements

Element

Type

Description

Example

object

The request result.

TotalCount

integer

The total number of returned entries.

123

PageSize deprecated

integer

The number of entries on the current page.

30

NextToken

string

The pagination cursor. If the number of returned results that match the query conditions exceeds the page size, this pagination cursor is returned. To obtain the next page of data, use the returned cursor value as a request parameter until no cursor value is returned, which indicates that all data is retrieved.

90******-f5c5-4cd4-927e-1f45e1cb8b62_1729644433000

DatasetFileMetas

array

The list of dataset file metadata details.

DatasetFileMeta

The dataset file metadata details.

DatasetId

string

The dataset ID.

d-rbvg5*****jhc9ks92

WorkspaceId

string

The workspace ID.

105173

DatasetVersion

string

The dataset version name.

v1

MaxResults

integer

The maximum number of results to return per query when NextToken is used.

10

Examples

Success response

JSON format

{
  "TotalCount": 123,
  "PageSize": 30,
  "NextToken": "90******-f5c5-4cd4-927e-1f45e1cb8b62_1729644433000",
  "DatasetFileMetas": [
    {
      "DatasetFileMetaId": "07914c9534586e4e7aa6e9dbca5009082df******fd8a0d857b33296c59bf6",
      "Uri": "oss://test-bucket/dataset/cat.png",
      "FileName": "cat.png",
      "DownloadUrl": "https://test-bucket.oss-cn-shanghai.aliyuncs.com/dataset/cat.png?Expires=171280****&OSSAccessKeyId=LTAI************&Signature=****jZcXOn7FHMCT1DLE22NuNjs%3D",
      "Score": 0.6,
      "DataSize": 120000,
      "FileFingerPrint": "D41D8CD98F*****E9800998ECF8\n",
      "FileUpdateTime": "2025-01-12T14:36:01Z",
      "Tags": "{\n    \"ai\":\n    [\n        \"Lane line\",\n        \"Water horse\",\n        \"Sunny day\"\n    ],\n    \"user\":\n    [\n        \"Everett\",\n        \"Intelligent driving Dataset 1\",\n        \"Cloudy day\"\n    ],\n    \"user-delete-ai-tags\":\n    [\n        \"Sunny day\"\n    ]\n}",
      "ThumbnailUrl": "https://test-bucket.oss-cn-shanghai.aliyuncs.com/dataset/cat.png?Expires=171280****&OSSAccessKeyId=LTAI************&Signature=****jZcXOn7FHMCT1DLE22NuNjs%3D",
      "MetaAttributes": "{     \"ImageHeight\": 400,     \"ImageWidth\": 800 }",
      "SemanticIndexJobId": "dsjob-klfwtjto****scvt3",
      "SemanticIndexUpdateTime": "2021-01-12T14:36:01.000Z",
      "FileCreateTime": "2021-01-12T14:36:01.000Z",
      "FileType": "image",
      "ContentType": "image/jpeg",
      "Status": "ACTIVE"
    }
  ],
  "DatasetId": "d-rbvg5*****jhc9ks92\n",
  "WorkspaceId": "105173",
  "DatasetVersion": "v1",
  "MaxResults": 10
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.