SearchMedia

Updated at:

Retrieves media asset information that matches the specified parameters.

Operation description

For usage inquiries or consultations regarding the intelligent media asset search feature of Intelligent Media Services, search for the DingTalk group ID 30415005038 to join the IMS Multimodal Search Customer Support group and contact us.

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

ice:SearchMedia

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Match

string

No

The filter conditions. For syntax rules, see Media asset search protocol.

title = 'China' and utcCreate = ['1693367158561','1693367158562']

SortBy

string

No

The sort fields and sort orders. Separate multiple values with commas (,).

utcCreate:Desc

PageNo

integer

No

The current page number. Default value: 1.

1

PageSize

integer

No

The number of entries to return on each page. Default value: 10. Maximum value: 50.

20

EntityId

string

No

The entity ID.

2d3bf1e35a1e42b5ab338d701efa****

ScrollToken

string

No

The scroll token, which is a 32-character string. You do not need to specify this parameter when you initiate a search request for the first time. If the search request returns data, the server returns this parameter value to record the position of the current search data. Record the returned value and specify it in subsequent searches based on the following requirements or suggestions: This parameter is required to traverse all data that matches the search conditions. If the value of the PageNo parameter exceeds 200, specify this parameter to optimize search performance. You can only scroll forward, and the maximum scroll distance is 1,000 media assets.

F8C4F642184DBDA5D93907A70AAE****

SearchLibName

string

No

The search library.

test-1

CustomFilters

string

No

The custom filters. The value is a JSON string. Supported fields include the integer field intField1 and the string fields strField1 and strField2. You can select at most one match type for the same field. Filters for different fields use the AND logical operator.

  • Exact match, such as {"intField1":12,"strField1":"abc"}.

  • Multi-value match, such as {"intField1":[12,13],"strField1":["abc","cd"]}.

  • Range match, such as {"intField1":{"gte":12,"lte":13}}.

{"intField1":{"gte":12,"lte":13},"strField2":["cd","de"],"strField1":"abc"}

Response elements

Element

Type

Description

Example

object

The response schema.

RequestId

string

The request ID.

6F61C357-ACC0-57FB-876E-D5879533****

Success

string

Indicates whether the request was successful.

True

Code

string

The return code.

200

MediaInfoList

array<object>

The collection of media assets that meet the requirements.

array<object>

The list of media asset information.

MediaId

string

The media asset ID.

3b187b3620c8490886cfc2a9578c****

MediaBasicInfo

object

The basic information of the media asset.

MediaId

string

The media asset ID.

132bd600fc3c71ec99476732a78f****

InputURL

string

The URL of the media asset to be registered in the corresponding system.

oss://clipres/longvideo/material/voice/prod/20220418/07d7c799f6054dc3bbef250854cf8498165024814****

MediaType

string

The media type of the media asset.

video

BusinessType

string

The business type of the media asset.

opening

Source

string

The source.

oss

Title

string

The title.

Smart landscape-to-portrait conversion

Description

string

The content description.

This video has been transcoded

Category

string

The category.

image

MediaTags

string

The tags.

tags,tags2

CoverURL

string

The cover URL.

https://dtlive-bj.oss-cn-beijing.aliyuncs.com/cover/e694372e-4f5b-4821-ae09-efd064f2****_large_cover_url.jpg

UserData

string

The user data.

userData

Snapshots

string

The snapshots.

[{"bucket":"example-bucket","count":"3","iceJobId":"******f48f0e4154976b2b8c45******","location":"oss-cn-beijing","snapshotRegular":"example.jpg","templateId":"******e6a6440b29eb60bd7c******"}]

Status

string

The resource status.

Normal

TranscodeStatus

string

The transcoding status.

Init

CreateTime

string

The creation time of the media asset. The time follows the ISO 8601 standard and uses UTC (ending with Z).

2020-12-01T19:48Z

ModifiedTime

string

The modification time of the media asset. The time follows the ISO 8601 standard and uses UTC (ending with Z).

2020-12-01T19:48Z

DeletedTime

string

The deletion time of the media asset. The time follows the ISO 8601 standard and uses UTC (ending with Z).

2020-12-01T19:48Z

SpriteImages

string

The sprite images.

[{"bucket":"example-bucket","count":"32","iceJobId":"******83ec44d58b2069def2e******","location":"oss-cn-shanghai","snapshotRegular":"example/example-{Count}.jpg","spriteRegular":"example/example-{TileCount}.jpg","templateId":"******e438b14ff39293eaec25******","tileCount":"1"}]

CateId

integer

The category ID.

44

Biz

string

The business to which the media asset belongs.

IMS

UploadSource

string

The upload source.

general

CateName

string

The category name.

Subcategory1

ReferenceId

string

The custom ID. It must be 6 to 64 characters in length and can contain only lowercase letters, uppercase letters, digits, hyphens, and underscores. It must be unique per user.

123-123

Namespace

string

The namespace.

name-1

VisionDescription

string

The visual description.

Football goal

StreamStatus

string

The stream status.

Active

FileInfoList

array<object>

The file information list.

array<object>

The list of file information.

FileBasicInfo

object

The basic file information, including the duration and size.

FileName

string

The file name.

164265080291300080527050.wav

FileStatus

string

The file status.

Normal

FileType

string

The file type.

source_file

FileSize

string

The file size in bytes.

324784

FileUrl

string

The OSS URL of the file.

https://outin-d3f4681ddfd911ec99a600163e1403e7.oss-cn-shanghai.aliyuncs.com/sv/23d5cdd1-18180984899/23d5cdd1-1818098****.mp4

Region

string

The storage region of the file.

cn-beijing

FormatName

string

The container format.

mov,mp4,m4a,3gp,3g2,mj2

Duration

string

The duration.

60.00000

Bitrate

string

The bitrate.

1912.13

Width

string

The width.

1920

Height

string

The height.

480

CreateTime

string

The creation time. The time follows the ISO 8601 standard and uses UTC (ending with Z).

2022-05-30T02:02:17Z

ModifiedTime

string

The last modification time. The time follows the ISO 8601 standard and uses UTC (ending with Z).

2021-12-10T12:19Z

ImagesInput

string

The image set information.

{}

AiData

object

The detailed AI information.

AiLabelInfo

array<object>

The list of AI label information.

array<object>

The AI label information.

FaceId

string

The face ID.

5FE19530C7A422197535FE74F5DB****

LabelType

string

The label type.

object

Source

string

The source.

vision

Category

string

The category.

Means of transportation

LabelName

string

The entity name.

Car

LabelId

string

The entity ID.

10310250338

Occurrences

array<object>

The list of segments.

array<object>

The segment.

Score

number

The score.

0.75287705

Image

string

The Base64 encoding of the optimal face image.

99C64F6287

TableBatchSeqId

string

The sequence ID of the vector table.

85010D1

clipId

string

The clip ID.

5FE19530C7A422197535FE74F5DB****

From

number

The start time of the segment.

1.4

To

number

The end time of the segment.

2.5

FinegrainName

string

The fine-grained name of the entity.

Car

FinegrainId

string

The fine-grained ID of the entity.

10310250338

Content

string

The text content.

Pipi

Tracks

array<object>

The track sequence.

object

The track.

Size

number

The area of the face bounding box.

50.2

Position

string

The position coordinates of the bounding box.

468.0;67.0;615.0;267.0

Timestamp

number

The timestamp of the track.

1.4

AsrInfo

array<object>

The list of speech information.

object

The speech information.

From

number

The start time of the segment.

1.4

To

number

The end time of the segment.

2.5

ClipId

string

The clip ID.

5FE19530C7A422197535FE74F5DB****

Content

string

The text content.

I am Pippi.

Timestamp

number

The timestamp of the segment.

1.4

OcrInfo

array<object>

The list of subtitle information.

object

The subtitle information.

From

number

The start time of the segment.

1.4

To

number

The end time of the segment.

2.5

ClipId

string

The clip ID.

5FE19530C7A422197535FE74F5DB****

Content

string

The text content.

I am Pippi.

Timestamp

number

The timestamp of the segment.

1.4

AiRoughData

object

The AI summary data.

SaveType

string

The save type.

TEXT

Status

string

The data status.

SaveSuccess

AiJobId

string

The AI job ID.

cd35b0b0025f71edbfcb472190a9****

Result

string

The AI result.

http://xxxx.json

AiCategory

string

The TV series.

Video AI classification

IndexStatusList

array<object>

The list of index statuses.

object

The index status.

IndexType

string

The index type. Valid values:

  • mm: large model

  • face: face

  • aiLabel: intelligent label

mm

IndexStatus

string

The index status. Valid values:

  • Running: running

  • Fail: failed

  • Success: successful

Success

CustomFields

string

The custom filter parameters.

{\"intField1\":12,\"strField1\":\"abc\"}

ScrollToken

string

The pagination token.

F8C4F642184DBDA5D93907A70AAE****

Total

integer

The total number of media assets that meet the conditions.

163

Examples

Success response

JSON format

{
  "RequestId": "6F61C357-ACC0-57FB-876E-D5879533****",
  "Success": "True",
  "Code": "200",
  "MediaInfoList": [
    {
      "MediaId": "3b187b3620c8490886cfc2a9578c****",
      "MediaBasicInfo": {
        "MediaId": "132bd600fc3c71ec99476732a78f****",
        "InputURL": "oss://clipres/longvideo/material/voice/prod/20220418/07d7c799f6054dc3bbef250854cf8498165024814****",
        "MediaType": "video",
        "BusinessType": "opening",
        "Source": "oss",
        "Title": "Smart landscape-to-portrait conversion",
        "Description": "This video has been transcoded",
        "Category": "image",
        "MediaTags": "tags,tags2\n",
        "CoverURL": "https://dtlive-bj.oss-cn-beijing.aliyuncs.com/cover/e694372e-4f5b-4821-ae09-efd064f2****_large_cover_url.jpg",
        "UserData": "userData",
        "Snapshots": "[{\"bucket\":\"example-bucket\",\"count\":\"3\",\"iceJobId\":\"******f48f0e4154976b2b8c45******\",\"location\":\"oss-cn-beijing\",\"snapshotRegular\":\"example.jpg\",\"templateId\":\"******e6a6440b29eb60bd7c******\"}]",
        "Status": "Normal",
        "TranscodeStatus": "Init",
        "CreateTime": "2020-12-01T19:48Z",
        "ModifiedTime": "2020-12-01T19:48Z\n",
        "DeletedTime": "2020-12-01T19:48Z\n",
        "SpriteImages": "[{\"bucket\":\"example-bucket\",\"count\":\"32\",\"iceJobId\":\"******83ec44d58b2069def2e******\",\"location\":\"oss-cn-shanghai\",\"snapshotRegular\":\"example/example-{Count}.jpg\",\"spriteRegular\":\"example/example-{TileCount}.jpg\",\"templateId\":\"******e438b14ff39293eaec25******\",\"tileCount\":\"1\"}]",
        "CateId": 44,
        "Biz": "IMS",
        "UploadSource": "general",
        "CateName": "Subcategory1",
        "ReferenceId": "123-123",
        "Namespace": "name-1",
        "VisionDescription": "Football goal",
        "StreamStatus": "Active"
      },
      "FileInfoList": [
        {
          "FileBasicInfo": {
            "FileName": "164265080291300080527050.wav",
            "FileStatus": "Normal",
            "FileType": "source_file",
            "FileSize": "324784",
            "FileUrl": "https://outin-d3f4681ddfd911ec99a600163e1403e7.oss-cn-shanghai.aliyuncs.com/sv/23d5cdd1-18180984899/23d5cdd1-1818098****.mp4",
            "Region": "cn-beijing",
            "FormatName": "mov,mp4,m4a,3gp,3g2,mj2",
            "Duration": "60.00000\n",
            "Bitrate": "1912.13\n",
            "Width": "1920",
            "Height": "480",
            "CreateTime": "2022-05-30T02:02:17Z",
            "ModifiedTime": "2021-12-10T12:19Z",
            "ImagesInput": "{}"
          }
        }
      ],
      "AiData": {
        "AiLabelInfo": [
          {
            "FaceId": "5FE19530C7A422197535FE74F5DB****",
            "LabelType": "object",
            "Source": "vision",
            "Category": "Means of transportation",
            "LabelName": "Car",
            "LabelId": "10310250338",
            "Occurrences": [
              {
                "Score": 0.75287705,
                "Image": "99C64F6287",
                "TableBatchSeqId": "85010D1",
                "clipId": "5FE19530C7A422197535FE74F5DB****",
                "From": 1.4,
                "To": 2.5,
                "FinegrainName": "Car",
                "FinegrainId": "10310250338",
                "Content": "Pipi",
                "Tracks": [
                  {
                    "Size": 50.2,
                    "Position": "468.0;67.0;615.0;267.0",
                    "Timestamp": 1.4
                  }
                ]
              }
            ]
          }
        ],
        "AsrInfo": [
          {
            "From": 1.4,
            "To": 2.5,
            "ClipId": "5FE19530C7A422197535FE74F5DB****",
            "Content": "I am Pippi.",
            "Timestamp": 1.4
          }
        ],
        "OcrInfo": [
          {
            "From": 1.4,
            "To": 2.5,
            "ClipId": "5FE19530C7A422197535FE74F5DB****",
            "Content": "I am Pippi.",
            "Timestamp": 1.4
          }
        ]
      },
      "AiRoughData": {
        "SaveType": "TEXT",
        "Status": "SaveSuccess",
        "AiJobId": "cd35b0b0025f71edbfcb472190a9****",
        "Result": "http://xxxx.json",
        "AiCategory": "Video AI classification"
      },
      "IndexStatusList": [
        {
          "IndexType": "mm",
          "IndexStatus": "Success"
        }
      ],
      "CustomFields": "{\\\"intField1\\\":12,\\\"strField1\\\":\\\"abc\\\"}"
    }
  ],
  "ScrollToken": "F8C4F642184DBDA5D93907A70AAE****",
  "Total": 163
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.