Get all video list

  • This API can receive all uploaded video list.

request a video list#

bash
curl -X GET \
"https://develop.kokoon.cloud/kokoon/api/sr/v3/video?orig_type=original&filename=football&order_field=expired_time&order=asc&page_size=2&page_num=0&start_date=2022-01-19&end_date=2023-01-19" \
-H "Content-Type:application/json" \
-H 'Authorization: eyJraWQiOiJPMGs5...eyJzdWIiOiIzN2U3NzYxM'

request query parameter#

  • filters
field mandatory description
orig_typeoptionalorigin for video( sr or original)
  • sr : show only SRresult files.
  • original : show only original files.
filenameoptionalsearch with partial filename.
order_fieldoptional(default : created_time)sorting with specific field.
  • supported order fields type : created_time, expired_time, filename
orderoptionalordering.
  • asc or desc (default : desc)
page_sizeoptionalsize per page for pagenation.(page_num is required.)
page_numoptionalcurrent page for pagenation.(page_size is required.)
start_dateoptionalstart date
end_dateoptionalend date

response#

json
{
"all_count": 7,
"curr_count": 2,
"page_size": "2",
"page_num": "0",
"orig_type": "original",
"filename": "football",
"start_date": "2023-01-01",
"end_date": "2024-05-01",
"order_field": "expired_time",
"order": "asc",
"videos": [
{
"uid": "539e3480-929a-11ee-ada2-51e4bfe11414",
"vid": "b3b551b0-bf44-11ee-b7b1-bde2d5ef838d",
"pid": "00000000-0000-0000-0000-000000000000",
"tid": "00000000-0000-0000-0000-000000000000",
"created_time": "2024-01-30T07:53:50.000Z",
"filename": "football_360p_10s--trim_1S_3D.mp4",
"size": 363347,
"codec_name": "h264",
"width": 640,
"height": 360,
"fps": "30/1",
"nb_frames": "90",
"duration": "3.000000",
"bitrate": "954261",
"expired_time": "2024-02-13T07:53:50.000Z",
"download_cnt": 0,
"last_category": "general",
"state": "completed",
"url": "https://sr-inner-api-storage-local.s3.amazonaws.com/video/539e3480-929a-11ee-ada2-51e4bfe11414/...",
"thumb_url": "https://sr-inner-api-storage-local.s3.amazonaws.com/video/539e3480-929a-11ee-ada2-51e4bfe11414/..."
},
{
"uid": "539e3480-929a-11ee-ada2-51e4bfe11414",
"vid": "9f6bf740-c025-11ee-bcc2-490e08f2a351",
"pid": "00000000-0000-0000-0000-000000000000",
"tid": "00000000-0000-0000-0000-000000000000",
"created_time": "2024-01-31T10:43:54.000Z",
"filename": "football_360p_10s.mp4",
"size": 939073,
"codec_name": "h264",
"width": 640,
"height": 360,
"fps": "30/1",
"nb_frames": "300",
"duration": "10.000000",
"bitrate": "739484",
"expired_time": "2024-02-14T10:43:54.000Z",
"download_cnt": 0,
"last_category": null,
"state": "completed",
"url": "https://sr-inner-api-storage-local.s3.amazonaws.com/video/539e3480-929a-11ee-ada2-51e4bfe11414/...",
"thumb_url": "https://sr-inner-api-storage-local.s3.amazonaws.com/video/539e3480-929a-11ee-ada2-51e4bfe11414/..."
}
]
}

response body field#

field type description
all_countinttotal item count for filted results.
curr_countintitem count for current page.
orig_typestringorigin for video( sr or original)
filenamestringfilename
order_fieldstringsorting with specific field.
orderstringordering.
page_numstringcurrent page for pagenation.
page_sizestringsize per page for pagenation.
start_datestringstart date.
end_datestringend date.
  • videos
field type description
uidstringuser's unique id
vidstringvideo unique id
pidstringparent_id :
  • if video file is original, parent_id is '00000000-0000-0000-0000-000000000000'.
  • if video file is SR result, parent_id is original file's vid used when SR is requested.
tidstringSR task_id :
  • if video file is original, task_id is '00000000-0000-0000-0000-000000000000'.
  • if video file is SR result, task_id is a unique task-id recevied when SR is requested.
created_timestringvideo's created time.
filenamestringvideo's filename.
sizeintvideo's filesize.
codec_namestringvideo's codec_name.
fpsstringvideo's fps(frame per second).
durationstringvideo's duration.(seconds)
nb_framesstringvideo's number of total frames.
bitratestringvideo's bitrate.(bits per second)
widthintvideo's width.
heightintvideo's height.
download_cntintvideo's downloding count.
  • We cannot figure out that a user really downloaded a original file with url. But we can provide a download-inc-count API. After a user really download a file with url, if call download-inc-count API, download_cnt will be increased.
expired_timestringvideo's expired time. original video will be expired after 14day later from created_time.
statestringvideo's state. In case of original file, state is always 'completed'.
  • state :
    • pending : SR video creation is requested.
    • processing : SR video creation is in processing.
    • completed : SR video creation is completed.
    • error : SR video creation is failed.
urlurlvideo's url.
thumb_urlurlvideo's thumbnail url.
last_categorystringlast selected category in SR task.