Topik ini menjelaskan event UploadByURLComplete, termasuk isi notifikasi dan contoh callback-nya.
Tipe Event
UploadByURLComplete
Deskripsi Event
Event UploadByURLComplete dihasilkan setelah video berhasil diunggah melalui pemanggilan operasi UploadMediaByURL.
Isi Notifikasi Event
Parameter | Tipe | Wajib | Deskripsi |
EventTime | String | Ya | Waktu ketika event dihasilkan. Waktu ditampilkan dalam format yyyy-MM-ddTHH:mm:ssZ dan dalam UTC. |
EventType | String | Ya | Tipe event. Nilainya adalah UploadByURLComplete. |
VideoId | String | Ya | ID video. Parameter ini tersedia saat video diunggah. |
JobId | String | Ya | ID pekerjaan unggah. |
SourceURL | String | Tidak | URL file mezzanine. |
Status | String | Tidak | Menunjukkan apakah video berhasil diunggah. Nilai yang valid:
|
ErrorCode | String | Tidak | Kode error. Parameter ini tersedia saat terjadi kesalahan selama proses pengunggahan video. |
ErrorMessage | String | Tidak | Pesan error. Parameter ini tersedia saat terjadi kesalahan selama proses pengunggahan video. |
Contoh Callback
Berikut adalah deskripsinya:
Untuk callback HTTP, contoh berikut menunjukkan body dari permintaan HTTP POST.
Untuk callback MNS, contoh berikut menunjukkan body pesan.
Contoh pesan callback sukses:
{ "Status": "success", "EventTime": "2017-03-20T07:49:17Z", "EventType": "UploadByURLComplete", "VideoId": "43q9fjdun3f****", "JobId": "4c815bjs83j1****", "SourceURL ": "http://example-bucket-****.oss-cn-shanghai.aliyuncs.com/27ffc438-164d55217ef-0005-6884-51a-1****.mp4", "Size":"123456" }Contoh pesan callback error:
{ "Status": "fail", "EventTime": "2017-03-20T07:49:17Z", "EventType": "UploadByURLComplete", "ErrorCode ": "URLInvalidError ", "ErrorMessage ": "download video failed by the url, please check it", "JobId": "4c815bjsued1****" , "SourceURL ": "http://example-bucket-****.oss-cn-shanghai.aliyuncs.com/27ffc438-164d55217ef-0005-6884-51a-1****.mp4" }