更新时间:2022-01-07 14:31:28
Obtain the information of uploaded videos that match specified conditions(uploading time, video name, video ID, video status, specific page)through this API.
Request method | POST/GET |
---|---|
Interface Address | http://api.cloudv.haplat.net/vod/videoManage/getVideoList |
If token is needed | The verification token is needed |
Parameter | Type | Required | Remark |
---|---|---|---|
createUser | string | no | Create users. The default is empty, multiple passes are allowed, separated by half-width commas, cannot start or end with a comma, and the content between two commas cannot be empty or blank characters. This parameter is restricted by permissions, and only sub-accounts or users with special permissions configured can be queried. |
startTime | string | no | The query start time, the time format is 2016-01-01 12:00:00; it is used to query the video according to the creation time period; |
endTime | string | no | The query end time, the time format is 2016-01-01 12:00:00; it is used to query the video according to the creation time period, which is less than the current query time; |
videoName | string | no | Video name, used to filter videos, support fuzzy matching; |
videoId | string | no | Video ID, used to filter videos; |
videoStatus | int | no | Video status, used to filter videos. Ranges:
|
transcodeState | string | no | Authorized broadcast is not enabled, the value range of video transcoding status:
|
videoClassification | string | no | Video categories, each category is separated by ",". |
listOrder | int | no | List order, value range:
|
pageIndex | int | no | Take the first few pages of the video list, start from 1, and the default is 1. The product of the input parameter pageIndex and pageSize must not be greater than 100000. |
pageSize | int | no | The average number of videos per page, the value range is 1-50, and the default is 10. The product of the input parameter pageIndex and pageSize must not be greater than 100000. |
For common return results, please refer to the Return Result.
Data structure of the data parameter returned when the return result is successful
Parameter | Type | Remarks |
---|---|---|
videoTotal | int | The number of records of the video list information currently returned. Note that the number of records returned here is only the number of records on the current page. |
videoListInfo | array | Video list information |
VideoListInfo array element data structure
Parameter | Type | Remark |
---|---|---|
videoName | string | Video name |
videoId | string | Video ID |
createUser | string | Creator |
encrypt | int | Whether to encrypt the transcoding file. Ranges:
|
videoSize | string | The size of the space occupied by the video, the total space usage of the video and its transcoded video. |
videoDuration | string | Video duration |
createTime | string | Video creation time |
uploadTime | string | Video upload time |
updateTime | string | Video modification time |
videoDescription | string | Video description |
videoClassification | string | Video category |
imageUrl | string | Video cover URL |
publishDomain | string | Publishing domain of the video |
playerName | string | The name of the player used for the video |
playerId | string | The ID of the player used by the video |
videoState | string | Video status, value range:
|
transcodeState | string | Authorized broadcast is not enabled, the value range of video transcoding status:
The value range of the transcoding status when activating authorized braodcast(video encryption):
|
videoSourceCode | int | Video source, value range:
|
videoResolutions | array | Video resolution and other information |
VideoResolutions array element data structure
parameters refer to the Data Structure
Parameter | Type | Remark |
---|---|---|
clarity | int | Definition. Ranges:
|
serverType | int | Terminal type. Ranges:
|
height | int | Height |
width | int | Width |
fileSize | long | File size (unit is bit) |
Input example
curl -X POST https://api.cloudv.haplat.net/vod/videoManage/getVideoList
-H "Content-Type: application/json; charset=utf-8"
-H "Host: api.cloudv.haplat.net"
<公共的头部参数>
<自定义的头部参数>
-d '{"videoName": "测试","pageIndex":"2","pageSize":"10"}'
Notes: For the “public parameter” in the example, please refer to Common Parameters.
Output example
{
"code": 200,
"data": {
"videoListInfo": [
{
"createUser": "testUser",
"encrypt": 0,
"playerId": "DF2DAF233DDA",
"playerName": "基础播放器",
"imageUrl": "http://ovptest.haplat.net//live/201708/4101630234a74ee8864e56ea88e5d290_20170801171220/cloudv-cover/9B0F7BA8BCB9D056D4C24ADDBF821D10.jpg",
"publishDomain": "ovptest.haplat.net",
"transcodeState": "5",
"updateTime": "1501578874",
"uploadTime": "1501578866",
"videoClassification": "无",
"videoDescription": "",
"videoDuration": "36",
"videoId": "9B0F7BA8BCB9D056D4C24ADDBF821D10",
"videoName": "creattest_20170801171220",
"videoResolutions": [
{
"clarity": -99,
"fileSize": 5579209,
"height": 768,
"serverType": -1,
"width": 1364
},
{
"clarity": 1,
"fileSize": 5573951,
"height": 768,
"serverType": -1,
"width": 1364
}
],
"videoSize": "11153160",
"videoSourceCode": 2,
"videoState": "0"
},
{
"createUser": "testUser",
"encrypt": 0,
"flashAutoPlay": 1,
"flashImageRatio": 0,
"flashPlayerId": "DF2DAF233DDA",
"flashPlayerName": "基础播放器",
"imageUrl": "http://ovptest.haplat.net//live/201708/4101630234a74ee8864e56ea88e5d290_20170801171104/cloudv-cover/E869FC95F3C7493ED56E8751C4AA7BEE.jpg",
"publishDomain": "ovptest.haplat.net",
"transcodeState": "5",
"updateTime": "1501578796",
"uploadTime": "1501578790",
"videoClassification": "无",
"videoDescription": "",
"videoDuration": "15",
"videoId": "E869FC95F3C7493ED56E8751C4AA7BEE",
"videoName": "creattest_20170801171104",
"videoResolutions": [
{
"clarity": -99,
"fileSize": 2533394,
"height": 768,
"serverType": -1,
"width": 1364
},
{
"clarity": 1,
"fileSize": 2531523,
"height": 768,
"serverType": -1,
"width": 1364
}
],
"videoSize": "5064917",
"videoSourceCode": 2,
"videoState": "0"
}
],
"videoTotal": 2
},
"message": "操作成功"
}
The following error codes are related to interface service logic, the generic error code can be found at Return Result.
Error code | Description |
---|---|
1512 | The start time is entered incorrectly, please enter: YYYY-MM-DD HH:mm:ss format |
1513 | The end time is entered incorrectly, please enter: YYYY-MM-DD HH:mm:ss format |
1519 | Make sure the start time is less than the end time |
1518 | video input contains special characters |
1504 | videoId contains special characters |
1515 | videoStatus can only enter 0 or 1 |
1516 | transcodeState can only enter integers from 1-5 |
1517 | videoClassification can only contain Chinese, English, letters, and commas |
1320 | listOrder can only be 0 or 1 |
1321 | listOrder cannot be empty |
1322 | pageIndex can only be an integer greater than 0 |
1323 | pageSize can only be an integer from 1-50 |
1324 | pageIndex value is too large |