Media asset basic information update complete

更新时间:
复制 MD 格式

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:

  • success: The operation was successful.

  • fail: The operation failed.

MediaType

String

Yes

The media asset type. Valid values:

  • video: audio and video

  • image: image

  • attached: attached media resource

MediaId

String

Yes

The media asset ID.

OperateMode

String

Yes

The operation type. Valid values:

  • create: New information is created.

  • update: Existing information is updated.

  • delete: Information is deleted.

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: {"OldValue":"OldTitle", "NewValue":"NewTitle"}

Description

String

No

The description. The value is a JSON string. Example: {"OldValue":"OldDesc", "NewValue":"NewDesc"}

CoverURL

String

No

The thumbnail URL. The value is a JSON string. Example: {"OldValue":"OldCoverURL", "NewValue": "NewCoverURL"}

CateId

String

No

The category ID. The value is a JSON string. Example: {"OldValue":123, "NewValue":456}

Tags

String

No

The tags. The value is a JSON string. Example: {"OldValue":"OldTag", "NewValue" :"NewTag"}

Note
  • 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****}"
   }
}