All Products
Document Center


Last Updated: Jul 11, 2019

Event type


Event description

A DeleteMediaComplete event is generated after a media file is deleted. Currently, this event is generated only for the DeleteVideo operation.

Event content

Parameter Type Required Description
EventType String Yes The type of the event. The value is DeleteMediaComplete.
EventTime String Yes The time when the event occurs. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
Status String Yes The processing status. Valid values: success and fail.
MediaType String Yes The type of the media file. Valid values: video, image, and attached.
DeleteType String Yes The type of the resources to be deleted. Valid values: all (indicating all files related to the media file), mezzanine (indicating the mezzanine file), and stream (indicating transcoded stream files).
MediaId String Yes The ID of the media file.
JobIds String No The IDs of the jobs. This parameter is available only when the DeleteType parameter is set to stream.
ErrorCode String No The error code for the deletion failure.
ErrorMessage String No The error message for the deletion failure.

Callback example


  • For an HTTP callback, write the following code as the HTTP POST request body.
  • For an MNS callback, write the following code as the message body.

Callback message for successful deletion

  1. {
  2. "EventType": "DeleteMediaComplete",
  3. "EventTime": "2017-03-20T07:49:17Z",
  4. "Status": "success",
  5. "MediaType": "video",
  6. "DeleteType": "all",
  7. "MediaId": "Example ID"
  8. }

Callback message for failed deletion

  1. {
  2. "EventType": "DeleteMediaComplete",
  3. "EventTime": "2017-03-20T07:49:17Z",
  4. "Status": "fail",
  5. "MediaType": "video",
  6. "DeleteType": "all",
  7. "MediaId": "Example ID",
  8. "ErrorCode": "InvalidVideo.NotFound",
  9. "ErrorMessage": "The video does not exist."
  10. }