Use category callback

Prev Next

Available in Classic and VPC

VOD Station provides a callback feature to check the status of encoding requests. When using callback, VOD Station automatically sends a callback message to the set notificationUrl whenever a status change event occurs during encoding. When requesting the following APIs, set the callback by entering the callback URL in notification.

Note

Callback messages are sent separately for each encodingOptionId. For example, if a category has three encoding options set and the encoding status changes for an input file, it will send a callback for each encoding option for the status change.

Callback message

The following describes the callback message.

Field Type Required Description
categoryId Integer - Category ID
categoryName String - Category name
fileId Integer - Input file ID
filePath String - Detailed path to the bucket for the input file, including the file name
  • Send as an empty string if status is WAITING (Pending).
encodingOptionId Integer - Encoding option ID
outputType String - Output type
link String - HTTP URL path to the output file, including the file name
  • Displayed if status is COMPLETE (Completed)
status String - File encoding status
  • COMPLETE | WAITING | RUNNING | FAILURE
    • COMPLETE: Completed
    • WAITING: Pending
    • RUNNING: In progress
    • FAILURE: Failed

Callback message example

The example of a callback message is as follows:

// Pending job (WAITING)
{
  "categoryId": 13814,
  "categoryName": "VOD-Callback",
  "fileId": 1163694,
  "filePath": "",
  "encodingOptionId": 2,
  "outputType": "AVC_SD_1Pass_30fps_1",
  "status": "WAITING"
}
{
  "categoryId": 13814,
  "categoryName": "VOD-Callback",
  "fileId": 1163694,
  "filePath": "",
  "encodingOptionId": 1,
  "outputType": "AVC_SD_1Pass_30fps",
  "status": "WAITING"
}
{
  "categoryId": 13814,
  "categoryName": "VOD-Callback",
  "fileId": 1163694,
  "filePath": "",
  "encodingOptionId": 3,
  "outputType": "AVC_HD_1Pass_30fps",
  "status": "WAITING"
}

// Job in progress (RUNNING)
{
  "categoryId": 13814,
  "categoryName": "VOD-Callback",
  "fileId": 1163694,
  "filePath": "/VOD-Callback/VODStation_AVC_HD_1Pass_30fps.mp4",
  "encodingOptionId": 3,
  "outputType": "AVC_HD_1Pass_30fps",
  "status": "RUNNING"
}
{
  "categoryId": 13814,
  "categoryName": "VOD-Callback",
  "fileId": 1163694,
  "filePath": "/VOD-Callback/VODStation_AVC_SD_1Pass_30fps.mp4",
  "encodingOptionId": 1,
  "outputType": "AVC_SD_1Pass_30fps",
  "status": "RUNNING"
}
{
  "categoryId": 13814,
  "categoryName": "VOD-Callback",
  "fileId": 1163694,
  "filePath": "/VOD-Callback/VODStation_AVC_SD_1Pass_30fps_1.mp4",
  "encodingOptionId": 2,
  "outputType": "AVC_SD_1Pass_30fps_1",
  "status": "RUNNING"
}

// Job completed (COMPLETE)
{
  "categoryId": 13814,
  "categoryName": "VOD-Callback",
  "fileId": 1163694,
  "filePath": "/VOD-Callback/VODStation_AVC_SD_1Pass_30fps.mp4",
  "encodingOptionId": 1,
  "outputType": "AVC_SD_1Pass_30fps",
  "link": "https://kr.object.ncloudstorage.com/station-000/VOD-Callback/VODStation_AVC_SD_1Pass_30fps.mp4",
  "status": "COMPLETE"
}
{
  "categoryId": 13814,
  "categoryName": "VOD-Callback",
  "fileId": 1163694,
  "filePath": "/VOD-Callback/VODStation_AVC_SD_1Pass_30fps_1.mp4",
  "encodingOptionId": 2,
  "outputType": "AVC_SD_1Pass_30fps_1",
  "link": "https://kr.object.ncloudstorage.com/station-000/VOD-Callback/VODStation_AVC_SD_1Pass_30fps_1.mp4",
  "status": "COMPLETE"
}
{
  "categoryId": 13814,
  "categoryName": "VOD-Callback",
  "fileId": 1163694,
  "filePath": "/VOD-Callback/VODStation_AVC_HD_1Pass_30fps.mp4",
  "encodingOptionId": 3,
  "outputType": "AVC_HD_1Pass_30fps",
  "link": "https://kr.object.ncloudstorage.com/station-000/VOD-Callback/VODStation_AVC_HD_1Pass_30fps.mp4",       
  "status": "COMPLETE"
}