Get a task information

  • This API can receive a task infomation for task unique id.

request a task information#

bash
curl -X GET \
"https://develop.kokoon.cloud/kokoon/api/sr/v3/task/${tid}" \
-H "Content-Type:application/json" \
-H 'Authorization: eyJraWQiOiJPMGs5...eyJzdWIiOiIzN2U3NzYxM'

request parameter#

  • tid : task unique id.

response#

json
{
"request_body": {
"option": {
"face_enhance": true,
"denoise": true,
"deinterlace": true,
"add_noise": true
},
"task_type": "SR",
"category": "animation",
"use_sr": true,
"input_quality": "high",
"start_pos": 0,
"duration": 0,
"vid": "a600c7e0-b5d3-11ee-8bc1-e3593f7b2d5c",
"width": 1280,
"height": 720,
"codec": "h264",
"format": "mp4",
"use_trim_orig": false
},
"uid": "539e3480-929a-11ee-ada2-51e4bfe11414",
"tid": "89f758a0-ba76-11ee-8fa6-17cde62e8e05",
"in_vid": "a600c7e0-b5d3-11ee-8bc1-e3593f7b2d5c",
"out_vid": "89f758a1-ba76-11ee-8fa6-17cde62e8e05",
"task_type": "SR",
"step": "done",
"filename": "football_360p_10s.mp4",
"request_time": "2024-01-24T05:07:58.000Z",
"start_time": "2024-01-24T05:09:06.000Z",
"finish_time": "2024-01-24T05:09:32.000Z",
"result_message": "success",
"bitrate": "739484",
"fps": "30/1",
"nb_frames": "300",
"sr_nb_frames": "300",
"progress": "255",
"preview_orig_url": "https://sr-inner-api-storage-local.s3.amazonaws.com/video/539e3480-929a-11ee-ada2-51e4bfe11414/42a7b910-c032-11ee-9a96-9d78f06e3d9a/preview/orig_b347b420-c0f7-11ee-9818-5de581da5a32...",
"preview_sr_url": "https://sr-inner-api-storage-local.s3.amazonaws.com/video/539e3480-929a-11ee-ada2-51e4bfe11414/42a7b910-c032-11ee-9a96-9d78f06e3d9a/preview/sr_b347b420-c0f7-11ee-9818-5de581da5a32..."
}

response body field#

field type description
request_bodyobjecttask request's body parameter when task created.
tidstringtask unique id.
uidstringuser unique id.
in_vidstringinput(original) video unique id.
out_vidstringoutput(SR result) video unique id.
task_typestringtask type( SR or SR_PREVIEW)
stepstringcurrent task step.
  • ready, preparing, prepared, running, done, cancel, unknown, error
result_messagestringresult message for SR task.
filenamestringoriginal video's filename.
bitratestringoriginal video's bitrate.
fpsstringoriginal video's frame per second.
request_timestringrequested time for task.
start_timestringstarted time for task.
finish_timestringfinished time for task.
nb_framesstringtotal number of frames for original video.
sr_nb_framesstringtotal number of frames for SR range of original video.
progressstringcurrent progressing frame.
preview_orig_urlstringin case of PREVIEW task, original file's url.
preview_sr_urlstringin case of PREVIEW task, SR-result file's url.

error response#

  • task does not exist.
json
{
"message": "fail to get result."
}