Media asset search filter syntax

更新时间:
复制 MD 格式

Search media assets by specifying fields, match types, and relation characters in the Match parameter of the SearchMedia operation.

Usage notes

Call the SearchMedia operation and set the Match parameter using the syntax below. Example: title = 'China' and mediaId == 'id' and utcCreate = ('1693367158561','1693367158562').

Match

Description

"title", "mediaId", and "utcCreate"

The search fields.

"=" and "=="

The search types.

"()" and "and"

The relation characters.

Important

URL-encode the Match parameter value. Ensure that equal signs, double quotation marks, single quotation marks, and parentheses are half-width characters.

Search fields

You can search videos, audio, images, and auxiliary media assets. The following table lists available search fields and supported search types (✔️ = supported, ❌ = not supported).

Search field

Data type

Description

Exact match

Fuzzy match

Multi-value query

Range query

title

String

The media asset title.

✔️

description

String

The media asset description.

✔️

tagList

String

The media asset tags.

✔️

mediaId

String

The media asset ID.

✔️

cateId

Long

The category ID.

✔️

status

Integer

The media asset status. Valid values are listed in the Values of the status field table.

✔️

✔️

utcCreate

Long

The creation time of the media asset. Unit: milliseconds.

✔️

utcModified

Long

The last modification time of the media asset. Unit: milliseconds.

✔️

fileInfo.storageLocation

String

The region in which the media asset is stored.

✔️

✔️

ocrInfo.tracks.content

String

The OCR-extracted subtitles.

✔️

aiLabelInfo.category

String

The AI category.

✔️

aiLabelInfo.label_id

String

The label.

✔️

mediaType

String

The media asset type. Default value: video. Valid values:

  • video

  • image

  • audio

Note

You cannot search for images, videos, and audio at the same time.

✔️

✔️

Value of status

Description

0

Initializing.

1

Preparing.

2

Preparation failed.

3

Normal.

10

Uploading.

12

Uploaded.

13

Transcoding.

14

Transcoding failed.

15

In review.

16

Review failed.

17

Deleted.

18

Upload failed.

Search types

The following search types are supported: exact match, fuzzy match, multi-value query, and range query.

Search type

Description

Syntax

Example

Exact match

Returns media assets whose field value exactly matches the specified value.

field == 'value'

mediaId == '39167e4066a071ee8013e7e7c56b****'

Fuzzy match

Returns media assets whose field value partially matches the specified value. Maximum value length: 60 characters.

field = 'value'

title ='I love you, China'

Multi-value query

Returns media assets whose field value matches any of the specified values. Maximum: 3 values.

field in ('value1','value2','value3')

status in ('3','12','18')

Range query

Returns media assets whose field value falls within a specified open or closed interval.

field = ('value1','value2')

utcCreate = ('1693367158561','1693367158562')

Relation characters

Relation character

Description

Syntax

and

Combines two conditions. Returns media assets that match both conditions.

Note

Maximum: 5 conditions.

field1 = 'value' and field2 = 'value'

or

Combines two conditions. Returns media assets that match either condition.

Note

Maximum: 5 conditions.

field1 = 'value1' or field2 = 'value2'

( )

Parentheses used in range queries.

field = ('value1','value2')

' '

Single quotation marks used to enclose values.

field = 'value'

,

Separates multiple values in a multi-value query.

field in ('value1','value2')

( ) [ ]

Defines an open or closed interval for range queries. () excludes endpoints; [] includes endpoints.

field = ['value1','value2']

in

Returns media assets whose field value matches any of the specified values. Maximum: 3 values.

field in ('value1','value2')