All Products
Search
Document Center

Intelligent Media Services:SearchMedia

Last Updated:Dec 27, 2024

Queries information about media assets based on the request parameters.

Operation description

If you have questions about how to use the media asset search feature in Intelligent Media Services (IMS), contact technical support in the DingTalk group (ID 30415005038).

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ice:SearchMediaget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
MatchstringNo

The filter conditions. For more information about the parameter syntax .

SortBystringNo

The sort field and order. Separate multiple parameters with commas (,).

utcCreate:Desc, utcModified:Desc
PageNointegerNo

The page number. Default value: 1.

1
PageSizeintegerNo

The number of entries per page. Default value: 10. Maximum value: 50.

20
EntityIdstringNo

The ID of the entity.

2d3bf1e35a1e42b5ab338d701efa7603
ScrollTokenstringNo

The pagination identifier. The value can be up to 32 characters in length. The first time you call this operation for each new search, you do not need to specify this parameter. The value of this parameter is returned each time data records that meet the specified filter condition are found. The value is used to record the current position of queried data. Record the returned parameter value and set this parameter according to the following requirements during the next search: If you need to traverse all data that meets the filter criteria, you must set the ScrollToken parameter. If the value of the PageNo parameter exceeds 200, we recommend that you set this parameter to optimize search performance. You can only page backward. You can page a maximum of 1,000 entries in an operation.

F8C4F642184DBDA5D93907A70AAE****
SearchLibNamestringNo

The search library.

test-1

Response parameters

ParameterTypeDescriptionExample
object

The response schema.

RequestIdstring

The ID of the request.

6F61C357-ACC0-57FB-876E-D58795335E59
Successstring

Indicates whether the request was successful.

True
Codestring

The status code returned.

200
MediaInfoListarray<object>

The media assets that meet the requirements.

MediaInfoobject

The information about the media assets.

MediaIdstring

The ID of the media asset.

3b187b3620c8490886cfc2a9578c3ce6
MediaBasicInfoobject

The basic information about the media asset.

MediaIdstring

The ID of the media asset.

132bd600fc3c71ec99476732a78f6402
InputURLstring

The address of the media asset that is waiting to be registered.

oss://clipres/longvideo/material/voice/prod/20220418/07d7c799f6054dc3bbef250854cf84981650248140427
MediaTypestring

The type of the media asset.

video
BusinessTypestring

The business type of the media asset.

opening
Sourcestring

The source of the media asset.

oss
Titlestring

The title of the media asset.

Descriptionstring

The description of the media asset.

Categorystring

The category of the media asset.

image
MediaTagsstring

The tags of the media asset.

tags,tags2
CoverURLstring

The thumbnail URL of the media asset.

https://dtlive-bj.oss-cn-beijing.aliyuncs.com/cover/e694372e-4f5b-4821-ae09-efd064f27b63_large_cover_url.jpg
UserDatastring

The user data.

userData
Snapshotsstring

The snapshots of the media asset.

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

The state of the media asset.

Normal
TranscodeStatusstring

The transcoding status of the media asset.

Init
CreateTimestring

The time when the media asset was created.

2020-12-01T19:48Z
ModifiedTimestring

The time when the media asset was modified.

2020-12-01T19:48Z
DeletedTimestring

The time when the media asset was deleted.

2020-12-01T19:48Z
SpriteImagesstring

The image sprite of the media asset

[{"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"}]
CateIdlong

The ID of the category.

44
Bizstring

The business to which the media asset belongs.

IMS
UploadSourcestring

The upload source of the media asset.

general
CateNamestring

The name of the category.

ReferenceIdstring

The custom ID of the media asset. The ID is a string that contains 6 to 64 characters. Only letters, digits, hyphens (-), and underscores (_) are supported. Each custom ID is unique.

123-123
FileInfoListarray<object>

The information about the files.

FileInfoobject

The information about the file.

FileBasicInfoobject

The basic information about the file, such as the duration and size.

FileNamestring

The name of the file.

164265080291300080527050.wav
FileStatusstring

The status of the file.

Normal
FileTypestring

The type of the file.

source_file
FileSizestring

The size of the file in bytes.

324784
FileUrlstring

The Object Storage Service (OSS) URL of the file.

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

The region in which the file is stored.

cn-beijing
FormatNamestring

The encapsulation format of the file.

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

The duration of the file.

60.00000
Bitratestring

The bitrate of the file.

1912.13
Widthstring

The width of the file.

1920
Heightstring

The height of the file.

480
CreateTimestring

The time when the file was created.

2022-05-30T02:02:17Z
ModifiedTimestring

The time when the file was last modified.

2021-12-10T12:19Z
AiDataobject

The details of the intelligent AI job.

AiLabelInfoarray<object>

The tags of the intelligent AI job.

AiLabelInfoobject

The tag of the intelligent AI job.

FaceIdstring

The face ID.

5FE19530C7A422197535FE74F5DB2B9F
LabelTypestring

The type of the tag.

Sourcestring

The source.

vision
Categorystring

The category.

LabelNamestring

The name of the entity.

LabelIdstring

The ID of the entity.

10310250338
Occurrencesarray<object>

The clips.

Occurrencesobject

The clip.

Scoredouble

The score.

0.75287705
Imagestring

The optimal face image encoded in Base64.

99C64F6287
TableBatchSeqIdstring

The sequence ID of the vector table.

85010D1
clipIdstring

The ID of the clip.

5FE19530C7A422197535FE74F5DB2B9F
Fromdouble

The start time of the clip.

1.4
Todouble

The end time of the clip.

2.5
FinegrainNamestring

The fine-grained name of the entity.

FinegrainIdstring

The fine-grained ID of the entity.

10310250338
Contentstring

The text content.

Tracksarray<object>

The track sequence.

Tracksobject

The track.

Sizedouble

The size of the bounding box.

50.2
Positionstring

The coordinates of the bounding box.

468.0;67.0;615.0;267.0
Timestampdouble

The timestamp of the track.

1.4
AsrInfoarray<object>

The information about audio files.

AsrInfoobject

The audio information.

Fromdouble

The start time of the clip.

1.4
Todouble

The end time of the clip.

2.5
ClipIdstring

The ID of the clip.

5FE19530C7A422197535FE74F5DB2B9F
Contentstring

The text content.

Timestampdouble

The timestamp of the clip.

1.4
OcrInfoarray<object>

The subtitles.

OcrInfoobject

The information about the subtitle.

Fromdouble

The start time of the clip.

1.4
Todouble

The end time of the clip.

2.5
ClipIdstring

The ID of the clip.

5FE19530C7A422197535FE74F5DB2B9F
Contentstring

The text content.

Timestampdouble

The timestamp of the clip.

1.4
AiRoughDataobject

The description of the AI job.

SaveTypestring

The save type.

TEXT
Statusstring

The data status.

SaveSuccess
AiJobIdstring

The ID of the AI job.

cd35b0b0025f71edbfcb472190a9xxxx
Resultstring

The results of the AI job.

http://xxxx.json
AiCategorystring

TV Series

TV series
ScrollTokenstring

The pagination identifier.

F8C4F642184DBDA5D93907A70AAE****
Totallong

The total number of media assets that meet the conditions.

163

Examples

Sample success responses

JSONformat

{
  "RequestId": "6F61C357-ACC0-57FB-876E-D58795335E59",
  "Success": "True",
  "Code": "200",
  "MediaInfoList": [
    {
      "MediaId": "3b187b3620c8490886cfc2a9578c3ce6",
      "MediaBasicInfo": {
        "MediaId": "132bd600fc3c71ec99476732a78f6402",
        "InputURL": "oss://clipres/longvideo/material/voice/prod/20220418/07d7c799f6054dc3bbef250854cf84981650248140427",
        "MediaType": "video",
        "BusinessType": "opening",
        "Source": "oss",
        "Title": "",
        "Description": "",
        "Category": "image",
        "MediaTags": "tags,tags2\n",
        "CoverURL": "https://dtlive-bj.oss-cn-beijing.aliyuncs.com/cover/e694372e-4f5b-4821-ae09-efd064f27b63_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": "",
        "ReferenceId": "123-123"
      },
      "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-18180984899.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"
          }
        }
      ],
      "AiData": {
        "AiLabelInfo": [
          {
            "FaceId": "5FE19530C7A422197535FE74F5DB2B9F",
            "LabelType": "",
            "Source": "vision",
            "Category": "",
            "LabelName": "",
            "LabelId": "10310250338",
            "Occurrences": [
              {
                "Score": 0.75287705,
                "Image": "99C64F6287",
                "TableBatchSeqId": "85010D1",
                "clipId": "5FE19530C7A422197535FE74F5DB2B9F",
                "From": 1.4,
                "To": 2.5,
                "FinegrainName": "",
                "FinegrainId": "10310250338",
                "Content": "",
                "Tracks": [
                  {
                    "Size": 50.2,
                    "Position": "468.0;67.0;615.0;267.0",
                    "Timestamp": 1.4
                  }
                ]
              }
            ]
          }
        ],
        "AsrInfo": [
          {
            "From": 1.4,
            "To": 2.5,
            "ClipId": "5FE19530C7A422197535FE74F5DB2B9F",
            "Content": "",
            "Timestamp": 1.4
          }
        ],
        "OcrInfo": [
          {
            "From": 1.4,
            "To": 2.5,
            "ClipId": "5FE19530C7A422197535FE74F5DB2B9F",
            "Content": "",
            "Timestamp": 1.4
          }
        ]
      },
      "AiRoughData": {
        "SaveType": "TEXT",
        "Status": "SaveSuccess",
        "AiJobId": "cd35b0b0025f71edbfcb472190a9xxxx",
        "Result": "http://xxxx.json",
        "AiCategory": "TV series\n"
      },
      "IndexStatusList": [
        {
          "IndexType": "mm",
          "IndexStatus": "Success"
        }
      ]
    }
  ],
  "ScrollToken": "F8C4F642184DBDA5D93907A70AAE****",
  "Total": 163
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-08-26The response structure of the API has changedView Change Details
2023-09-26The request parameters of the API has changedView Change Details
2023-06-27The request parameters of the API has changed. The response structure of the API has changedView Change Details
2022-11-29The response structure of the API has changedView Change Details
2022-11-15The response structure of the API has changedView Change Details
2022-07-19Add OperationView Change Details