Skip to main content

Query Videos

Service Address

http://api-az-cn.danghongyun.com/rest

Request Method

GET

Request Parameters

ParameterDescriptionTypeRequired
accessKeyThe user access keyStringRequired
actionAPI name, this api is "queryVideo"StringRequired
versionAPI version, currently must be 2.0StringRequired
timestampInvoke time in milliseconds since january 1 1970, eg: 1466488681033StringRequired
signatureSignature generated by signature rule.StringRequired
startstartStringRequired
numbernumberStringRequired
sortSort the results by this field, Can only be title, size, category, uploadTime, status, tagStringRequired
orderAsc order, desc reverse orderStringRequired
searchTypeSearch for videos, with search types of title, tag, and all, which are search by title, search by tag, and search together by title and tag. When searching, the parameter keyword must be entered simultaneously. When it is empty, in order to obtain the video list, it is not necessary to enter the parameter keywordStringOptional
keywordkeywordStringOptional
categoryIdcategoryId, While searching according to the above requirements, check the results that belong to that category. If left blank, all categories will be includedIntegerOptional
videoType0:normal video, 1:VR, If this value is not passed, it defaults to 0IntegerOptional
statusVideo status. If this value is not passed, all status videos are returned. Status values: 0,1,2,3,4,5,6,7 Please refer to the following instructions for detailsIntegerOptional

Description of Status Value:

0:TRANSCODE_STATUS_UPLOAD_FINISHED
1:TRANSCODE_STATUS_START
2:TRANSCODE_STATUS_COMPLETED
3:TRANSCODE_STATUS_FAILED
4:TRANSCODE_STATUS_UPLOAD_FAILED
5:TRANSCODE_STATUS_UNKNOWN_FILE_TYPE
6:TRANSCODE_STATUS_SECOND_TRANSCODE_START
7:TRANSCODE_STATUS_WAITTING

Response Example

{
"code":0,
"message":"success",
"result":
[
{
"id":"b01811bcb49a4bef9847f3555752a3c6",
"parentId":null,
"playrate":"1.0",
"fileName":"290c4314065646f384ac52d21a718c9e.mp4",
"thumbnail":"http://k35rdw4u.images.danghongyun.com/cover/2017/11/27/b01811bcb49a4bef9847f3555752a3c6/193_b01811bcb49a4bef9847f3555752a3c6_0.jpg",
"cover":"http://k35rdw4u.images.danghongyun.com/cover/2017/11/27/b01811bcb49a4bef9847f3555752a3c6/193_b01811bcb49a4bef9847f3555752a3c6_0.jpg",
"title":"1.mp4",
"width":720,
"height":576,
"bitrate":333209,
"audioBitrate":0,
"duration":286000,
"playNum":0,
"size":11361,
"userId":193,
"categoryId":0,
"category":null,
"status":2,
"date":"2017/11/27",
"uploadTime":1511779239632,
"tag":null,
"description":null,
"contentId":null,
"customId":null,
"sourceContentId":null,
"sourceCustomId":null,
"transcodedVideoList":
[
{
"name":"high-definition",
"hlsUrl":"http://k35rdw4u.vod2.danghongyun.com/target/hls/2017/11/27/193_b01811bcb49a4bef9847f3555752a3c6_10_720x576.m3u8",
"hlsSize":23635592,
"mp4Url":"http://k35rdw4u.vod2.danghongyun.com/target/mp4/2017/11/27/193_b01811bcb49a4bef9847f3555752a3c6_10_720x576.mp4",
"mp4Size":19244116,
"flvUrl":"http://k35rdw4u.vod2.danghongyun.com/target/flv/2017/11/27/193_b01811bcb49a4bef9847f3555752a3c6_10_720x576.flv",
"flvSize":19442983,
"tsUrl":"http://k35rdw4u.vod2.danghongyun.com/target/ts/2017/11/27/193_b01811bcb49a4bef9847f3555752a3c6_10_720x576.ts",
"tsSize":23762824,
"videoWidth":720,
"videoHeight":576,
"videoBitrate":500,
"audioBitrate":64000,
"defaultVideo":1,
"taskId":"113444",
"status":2,
"idx":1,
"type":0,
"hlsEncryptType":0,
"mp4EncryptType":0,
"flvEncryptType":0,
"tsEncryptType":0,
"contentId":null,
"customId":null,
"aesKey":null
}
],
"subPlayrateList":
[
{
"videoId":"577e0bcfc4774cc295668d1638e1752b",
"playrate":"0.8",
"subVideoType":0
},
{
"videoId":"dd9220fc79e34651a8140d77ecbe7e95",
"playrate":"30",
"subVideoType":0
}
],
"playCode":
{
"previewUrl":"http://www.danghongyun.com/video/preview/193/b01811bcb49a4bef9847f3555752a3c6",
"flashUrl":"http://www.danghongyun.com/video/preview/193/b01811bcb49a4bef9847f3555752a3c6.swf",
"htmlEmbedCode":"<div id=\"193_b01811bcb49a4bef9847f3555752a3c6\" style=\"text-align:center;\"></div>\r\n<script type=\"text/javascript\" src=\"http://static.danghongyun.com/libs/embed/H_E_v0.2.js\"></script>\r\n<script type=\"text/javascript\">\r\n HONGSHIYUN.embed(\"193_b01811bcb49a4bef9847f3555752a3c6\",{\r\n width:\"100%\",\r\n height:\"100%\",\r\n autoPlay:false\r\n });\r\n</script>"
},
"type":0,
"uri":null,
"fastEditor":0,
"videoType":0,
"audio":null,
"audioStatus":null,
"audioTaskId":null,
"subtitle":null,
"subVideoType":null,
"shareStatus":0,
"shareToUserId":null,
"shareCategoryId":0,
"logoGroupId":null
},
{
"id":"4b4deb6b24b54ec0b816d607a4317712",
"parentId":null,
"playrate":"1.0",
"fileName":"254b95af058441218eddeae1ff7f10df.mp4",
"thumbnail":"http://k35rdw4u.images.danghongyun.com/thumb/2017/11/27/4b4deb6b24b54ec0b816d607a4317712/193_4b4deb6b24b54ec0b816d607a4317712_0.jpg",
"cover":"http://k35rdw4u.images.danghongyun.com/cover/2017/11/27/4b4deb6b24b54ec0b816d607a4317712/193_4b4deb6b24b54ec0b816d607a4317712_0.jpg",
"title":"7.mp4",
"width":1280,
"height":720,
"bitrate":1312051,
"audioBitrate":0,
"duration":35360,
"playNum":0,
"size":5530,
"userId":193,
"categoryId":0,
"category":null,
"status":2,
"date":"2017/11/27",
"uploadTime":1511778702647,
"tag":null,
"description":null,
"contentId":null,
"customId":null,
"sourceContentId":null,
"sourceCustomId":null,
"transcodedVideoList":
[
{
"name":"high-quality",
"hlsUrl":null,
"hlsSize":0,
"mp4Url":"http://k35rdw4u.vod2.danghongyun.com/target/mp4/2017/11/27/193_4b4deb6b24b54ec0b816d607a4317712_10_1280x360.mp4",
"mp4Size":2318404,
"flvUrl":null,
"flvSize":0,
"tsUrl":null,
"tsSize":0,
"videoWidth":1280,
"videoHeight":360,
"videoBitrate":500,
"audioBitrate":64000,
"defaultVideo":1,
"taskId":"113442",
"status":2,
"idx":1,
"type":0,
"hlsEncryptType":0,
"mp4EncryptType":0,
"flvEncryptType":0,
"tsEncryptType":0,
"contentId":null,
"customId":null,
"aesKey":null
}
],
"subPlayrateList":[],
"playCode":
{
"previewUrl":"http://www.danghongyun.com/video/preview/193/4b4deb6b24b54ec0b816d607a4317712?isVR=true",
"flashUrl":"http://www.danghongyun.com/video/preview/193/4b4deb6b24b54ec0b816d607a4317712.swf?isVR=true",
"htmlEmbedCode":"<div id=\"193_4b4deb6b24b54ec0b816d607a4317712\" style=\"text-align:center;\"></div>\r\n<script type=\"text/javascript\" src=\"http://static.danghongyun.com/libs/embed/H_E_v0.2.js\"></script>\r\n<script type=\"text/javascript\">\r\n HONGSHIYUN.embed(\"193_4b4deb6b24b54ec0b816d607a4317712\",{\r\n width:\"100%\",\r\n height:\"100%\",\r\n autoPlay:false\r\n });\r\n</script>"
},
"type":0,
"uri":null,
"fastEditor":0,
"videoType":1,
"audio":"audio/2017/11/27/193_4b4deb6b24b54ec0b816d607a4317712.mp3",
"audioStatus":3,
"audioTaskId":"113443",
"subtitle":null,
"subVideoType":null,
"shareStatus":0,
"shareToUserId":null,
"shareCategoryId":0,
"logoGroupId":null
}
],
"success":true
}

Response Fields

Video

FieldDescription
audioThe audio address of the vr outlet
audioStatusThe transcoding status of the audio transferred from vr
audioTaskIdThe id of the audio transcoding task that is generated by vr
audioBitrateThe audio bitrate of the source file
bitrateThe bitrate of the source file
categoryCategory
categoryIdCategory id
contentIdThe content id,it is used for video encryption
coverThe default cover image
customIdThe custom id, it is used for video decryption
dateThe date the video was uploaded
descriptionDescription
durationVideo duration, milliseconds
fastEditorWhether or not to edit quickly
fileNameThe video source file name
heightThe height of the source video
idThe video id
logoGroupIdThe id of the station mark group used for transcoding
parentIdThe parent video id
playCodeThe play code, seePlay Code
playNumThe times of playback
playrateThe playback rate, currently in multiples: 0.8,1.2,1.4,1.6; shrink time: 10,30,60180, in seconds
shareCategoryIdThe category of the video shared, this field is invalid
shareStatusThe status of the share, this field is invalid
shareToUserIdThe id of the user to whom it was shared, this field is invalid
sizeThe video source file size, KB
sourceContentIdOne of the keys used when encrypting the video source itself
sourceCustomIdOne of the keys used when encrypting the video source itself
statusVideo transcoding status, 1 transcoding in progress, 2 transcoding completed, 3 transcoding error, 4 upload failed, 5 unknown file type, 6 secondary transcoding in progress, 7 queuing in progress
subtitleSubtitle
subPlayrateListThe list of subvideos, see Sub Video
subVideoTypeIf the video is a subvideo it indicates the sub video type, 0 multiples transcoding, 1 time down transcoding
tagThe video tags
taskIdThe id of the video transcoding task,
thumbnailThe default thumbnail
titleThe title of video
transcodedVideoListThe list of transcoded video addresses, see Output stream
typeSource file type: 0 regular file, 1 hls file, 3 live recording, 4 fast encoding, 5 live recording with secondary transcoding, 6 fast encoding with secondary transcoding, 7 video overlay, 8 video overlay with secondary transcoding
uploadTimeThe upload time
userIdThe user id
uriThe source file uri
videoTypeThe video type, 0: normal, 1: VR
widthThe width of the source video file

Play Code

FieldDescription
flashUrlFlash playback url
htmlEmbedCodeThe html embedded code
previewUrlThe preview url

Sub Video

FieldDescription
videoIdThe id of the subvideo
playrateSub video playback rate, same meaning
subVideoTypeThe type of subvideo, 0 multiples transcoding, 1 time down transcoding

Output Stream

FieldDescription
aesKeyThe key used for AES encryption
audioBitrateThe bitrate of the transcoded audio
contentIdOne of the keys used for danghong encryption
customIdOne of the keys used for danghong encryption
defaultVideoWhether it is the default playback, 1 yes, 0 no
flvEncryptTypeThe type of flv encryption after transcoding, 0 no encrypted, 7 arcvideo encryption
flvUrlThe flv address after transcoding
flvSizeThe size of the flv file after transcoding, Byte
hlsEncryptTypeHls encryption type after transcoding, 0 not encrypted, 6 AES encryption, 7 danghong encryption, currently AES encryption only works for hls
hlsUrlThe hls address after transcoding
hlsSizeThe size of the hls file after transcoding, Byte
idxDifferent output address indexes for the same file
mp4EncryptTypeThe type of mp4 encryption after transcoding, 0 not encrypted, 7 danghong encryption
mp4UrlThe mp4 address after transcoding
mp4SizeThe mp4 file size after transcoding, Byte
nameThe stream name
statusThe transcoding task status
taskIdThe id of the transcoding task
tsEncryptTypeThe type of ts encryption after transcoding, 0 not encrypted, 7 danghong encryption
tsUrlThe ts address after transcoding
tsSizeThe ts file size after transcoding in byte
typeThe type of file after transcoding, 0 noraml, 1 preview the clip
videoBitrateThe video bitrate
videoHeightThe height of the video after transcoding
videoWidthThe width of the transcoded video

Error Codes

CodeMessage
0success
10000exception
10013sort_type_is_incorrect
10018search_type_is_incorrect
10201api_not_exists