Initiates a media asset registration task and assigns a new IMS mediaId to the media asset. Based on the InputURL, the operation asynchronously calls other media asset information services to retrieve file information about the media asset. You can also set basic information such as the title, tags, and description. The operation synchronously returns a mediaId. You can call the GetMediaInfo operation to retrieve detailed media asset information. Currently, only OSS files and VOD media assets are supported as InputURL values.
Operation description
Media asset registration is an asynchronous task that typically takes 2 to 3 seconds to complete. When the registration operation returns a mediaId, the media asset may not have been fully registered. In this case, calling GetMediaInfo may not return the file information of the media asset.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InputURL |
string |
Yes |
The URL of the media asset to be registered in the corresponding system. Once registered, this URL cannot be changed and is attached to the IMS mediaId.
http(s)://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4 oss://example-bucket/example.mp4 (This format assumes by default that the OSS region is the same as the service registration area.)
vod://***20b48fb04483915d4f2cd8ac**** |
http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4 or vod://****20b48fb04483915d4f2cd8ac**** |
| MediaType |
string |
No |
The media type of the media asset. Valid values:
When the value is "text", the businessType must be set to "subtitles" or "font". Specify this field as needed. When the InputURL field is an OSS URL, the media type can also be automatically determined based on the file name extension (only for image, video, and audio file extensions). For the mapping between file extensions and media types, see File formats. |
video |
| BusinessType |
string |
No |
The business type of the media asset. Valid values:
|
opening |
| Title |
string |
No |
The title. If not provided, a default title is automatically generated based on the date.
|
defaultTitle |
| Description |
string |
No |
The content description.
|
defaultDescription |
| MediaTags |
string |
No |
The tags.
|
tag1,tag2 |
| CoverURL |
string |
No |
The cover image URL.
|
http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.png |
| UserData |
string |
No |
The user data. Custom callback URL configuration is supported. For configuration instructions, see Configure a callback upon editing completion.
|
{"NotifyAddress":"http://xx.xx.xxx"} or{"NotifyAddress":"https://xx.xx.xxx"} or{"NotifyAddress":"ice-callback-demo"} |
| Overwrite |
boolean |
No |
Specifies whether to overwrite an existing registered media asset. Default value: false.
|
true |
| ClientToken |
string |
No |
The client token. A 32-character UUID that ensures the idempotence of the request. |
****0311a423d11a5f7dee713535**** |
| RegisterConfig |
string |
No |
The registration configuration. By default, a sprite image is generated for the media asset. To disable this, set the NeedSprite field to false. By default, a snapshot is generated. To disable this, set the NeedSnapshot field to false. To specify the time for the cover image, configure CoverConfig, which contains the following field:
After media asset registration, to import the media asset into a custom search library, configure SearchLibName. For information about how to create and use a custom search library, see Use a custom search library. |
{ "NeedSprite": "false", "CoverConfig": { "StartTime": 1.0 }, "SearchLibName": "test" } |
| CateId |
integer |
No |
The category ID. |
3048 |
| WorkflowId |
string |
No |
The workflow ID. |
******b4fb044839815d4f2cd8****** |
| ReferenceId |
string |
No |
The custom ID. Only lowercase letters, uppercase letters, digits, hyphens (-), and underscores (_) are supported. The length must be 6 to 64 characters. The ID must be unique for each user. |
123-123 |
| SmartTagTemplateId |
string |
No |
The intelligent tagging template. Valid values:
For more information about tagging capabilities, see the documentation. After this field is configured, an intelligent tagging analysis task is automatically initiated upon media asset registration. For billing information, see Billing of Smart Tag Standard Edition. |
S00000101-300080 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
******5A-CAAC-4850-A3AF-B74606****** |
| MediaId |
string |
The IMS media asset ID. |
******b48fb04483915d4f2cd8****** |
Examples
Success response
JSON format
{
"RequestId": "******5A-CAAC-4850-A3AF-B74606******",
"MediaId": "******b48fb04483915d4f2cd8******"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 403 | Forbidden | User not authorized to operate on the specified resource. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.