The MediaBaseChangeComplete event is triggered when media asset basic information is created, updated, or deleted.
Event type
MediaBaseChangeComplete
Event description
This event is generated when you call the CreateUploadVideo, UpdateVideoInfo, UpdateVideoInfos, or DeleteVideo operation.
Event notification content
|
Parameter |
Type |
Required |
Description |
|
EventType |
String |
Yes |
The event type. Set to MediaBaseChangeComplete. |
|
EventTime |
String |
Yes |
The time when the event was generated, in the yyyy-MM-ddTHH:mm:ssZ format (UTC). |
|
Status |
String |
Yes |
The event notification status. Valid values:
|
|
MediaType |
String |
Yes |
The media asset type. Valid values:
|
|
MediaId |
String |
Yes |
The media asset ID. |
|
OperateMode |
String |
Yes |
The operation type. Valid values:
|
|
MediaContent |
String |
Yes |
The changed content, formatted as a JSON string. For the fields that can be changed, see the Basic audio and video information section below. |
Basic audio and video information
|
Field |
Type |
Required |
Description |
|
Title |
String |
No |
The title. The value is a JSON string. Example: |
|
Description |
String |
No |
The description. The value is a JSON string. Example: |
|
CoverURL |
String |
No |
The thumbnail URL. The value is a JSON string. Example: |
|
CateId |
String |
No |
The category ID. The value is a JSON string. Example: |
|
Tags |
String |
No |
The tags. The value is a JSON string. Example: |
-
OldValue: the value before the change.
-
NewValue: the value after the change.
-
When you add new information, the OldValue field is empty. When you delete information, the NewValue field is empty.
Sample callbacks
The following example shows the callback content:
-
For an HTTP callback, the following example is the body of the HTTP POST request.
-
For an MNS callback, the following example is the message body.
{
"EventType":"MediaBaseChangeComplete",
"EventTime":"2019-06-20T02:18:58Z",
"Status":"success",
"MediaId":"3b46b391419aj294m83b459f7435****",
"MediaType":"video",
"OperateMode":"update",
"MediaContent":
{
"Description":"{\"OldValue\":\"OldDesc\", \"NewValue\":\"NewDesc\"}",
"CoverURL":"{\"NewValue\":\"http://example.aliyundoc.com/image/cover/8C46D968F6954348AFC7A88****-6-2.png\"}",
"CateId":"{\"NewValue\":100002****}"
}
}