Get Video List in Batch

Last update:2022-01-07 14:31:28

Description

Obtain the information of uploaded videos that match specified conditions(uploading time, video name, video ID, video status, specific page)through this API.

Request Description

Request method POST/GET
Interface Address http://api.cloudv.haplat.net/vod/videoManage/getVideoList
If token is needed The verification token is needed

Request Parameters

ParameterTypeRequiredRemark
createUserstring      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.
startTimestringnoThe 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;
endTimestringnoThe 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;
videoNamestringnoVideo name, used to filter videos, support fuzzy matching;
videoIdstringnoVideo ID, used to filter videos;
videoStatusintnoVideo status, used to filter videos. Ranges:
  • 0 (Active)
  • 1 (Inactive)
transcodeStatestringnoAuthorized broadcast is not enabled, the value range of video transcoding status:
  • 1 (Transcoded)
  • 2 (Not transcoded)
  • 3 (In transcoding)
  • 4 (Transcoding failed)
The value range of the transcoding status when activating authorized braodcast(video encryption):
  • 1 (Transcoded and encrypted)
  • 2 (Unencrypted and transcoded)
  • 3 (In transcoding)
  • 4 (Transcoding failed)
  • 5 (Not transcoded)
videoClassificationstringnoVideo categories, each category is separated by ",".
listOrderintnoList order, value range:
  • 0 (in descending order of creation time)
  • 1 (in ascending order of creation time)
Default is 0
pageIndexintnoTake 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.
pageSizeintnoThe 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.

Return parameter

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

ParameterTypeRemark
videoNamestringVideo name
videoIdstringVideo ID
createUserstringCreator
encryptintWhether to encrypt the transcoding file. Ranges:
  • 0 (do not encrypt)
  • 1 (encrypt)
videoSizestringThe size of the space occupied by the video, the total space usage of the video and its transcoded video.
videoDurationstringVideo duration
createTimestringVideo creation time
uploadTimestringVideo upload time
updateTimestringVideo modification time
videoDescriptionstringVideo description
videoClassificationstringVideo category 
imageUrlstringVideo cover URL
publishDomainstringPublishing domain of the video
playerNamestringThe name of the player used for the video
playerIdstringThe ID of the player used by the video
videoStatestring

Video status, value range:

  • 0 (Active)
  • 1 (Inactive)
transcodeStatestring

Authorized broadcast is not enabled, the value range of video transcoding status:

  • 1 (Transcoded)
  • 2 (Not transcoded)
  • 3 (In transcoding)
  • 4 (Transcoding failed)

The value range of the transcoding status when activating authorized braodcast(video encryption):

  • 1 (Transcoded and encrypted)
  • 2 (Unencrypted and transcoded)
  • 3 (In transcoding)
  • 4 (Transcoding failed)
  • 5 (Not transcoded)
videoSourceCodeintVideo source, value range: 
  • 0 (Others)
  • 1 (Upload)
  • 2 (Live to recording)
  • 3 (Video pulling)
  • 4 (Video cutting)
  • 5 (Video splicing)
  • 6 (Edge pull-stream recording)
  • 10 (Universal version of Live to recording)
  • 11 (Upload SDK)
  • 12 (upload tool)
videoResolutionsarrayVideo resolution and other information

VideoResolutions array element data structure

parameters refer to the Data Structure

ParameterTypeRemark
clarityint

Definition. Ranges:

  • 1 (Original)
  • 2 (Low definition)
  • 3 (Standard definition)
  • 4 (High definition)
  • 5 (UHD)
  • -99 (Record file)
serverTypeint

Terminal type. Ranges:

  • 0 (PC)
  • 1 (original video)
heightintHeight
widthintWidth
fileSizelongFile size (unit is bit)

Example

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": "操作成功"
}

Error code

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
Is the content of this document helpful to you?
Yes
I have suggestion
Submitted successfully! Thank you very much for your feedback, we will continue to strive to do better!