Video Fetch Query

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

Description

Query video fetch task results.

Request Description

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

Request Parameters

Parameter Type Required Remark
taskId String No At least one of task ID(taskId and transNo) is passed, taskId is used first
transNo String No At least one of the business ID(taskId and transNo) is passed, and taskId is used first

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

ParameterTypeRemark
taskIdstringTask ID.
transNostringBusiness ID
timestamplongMillisecond timestamp
statusint

Task status

Value range of task status :

  • 1 (processing)
  • 2 (completed)
itemsarrayThe status information of each video fetch result. If the processing request includes multiple videos, the items include multiple pieces of information.

Items field data format

ParameterTypeRemark
fileNamestringfile name
fetchUrlstringFetch URL
md5stringVideo md5
pullStatusstringFetch task execution status
Value range of it:
  • 1 (processing)
  • 2 (success)
  • 3 (failure)
cmdStatusstringIntegrated command execution status
Value range of it:
  • 1 (processing)
  • 2 (success)
  • 3 (failure)
videoInfoobjContains video id, video file list. The file list includes bitrate, definition, resolution, terminal type, and video URL.

videoInfo field data format

Parameter Type Remarks
videoId string Video ID
duration double duration
videoFileList array Video file list

videoFileList field data format

Parameter nameTypeRemark
clarityintDefinition. Ranges:
  • 1 (Original)
  • 2 (Low definition)
  • 3 (Standard definition)
  • 4 (High definition)
  • 5 (UHD)
serverTypeintTerminal type. Ranges:
  • 0 (PC)
  • 1 (original video)
bitrateintBitrate
resolutionstringResolution
fileSizelongFile size
fileUrlstringVideo url

Example

Input example

curl -X POST http://api.cloudv.haplat.net/vod/videoManage/pullVideoQuery
  -H 'content-type: application/x-www-form-urlencoded; charset=utf-8' 
  -H "Host: api.cloudv.haplat.net" 
  <公共的头部参数>
  <自定义的头部参数>
  -d 'taskId=aaaaabbbbbccccc'

Notes: For the “public parameter” in the example, please refer to Common Parameters.

Output example

{
    "code": 200,
    "data": {
        "items": [
            {
                "cmdStatus": 2,
                "fetchUrl": "http://ovptest.haplat.net/pullvideo/201709/9828dc65015e10009c2920a600000000/testpull.flv",
                "fileName": "testpull1.flv",
                "md5": "",
                "pullStatus": 2,
                "videoInfo": {
                    "duration": 105,
                    "videoFileList": [
                        {
                            "bitrate": 412,
                            "clarity": 1,
                            "fileSize": 5384542,
                            "fileUrl": "pullvideo/201709/983afec9015e10006b97c47b00000000/testpull1.flv",
                            "resolution": "360:1080",
                            "serverType": -1
                        },
                        {
                            "bitrate": 398,
                            "clarity": 2,
                            "fileSize": 929,
                            "fileUrl": "pullvideo/201709/983afec9015e10006b97c47b00000000/983ed602015e100085d5fdd300000000-01.m3u8",
                            "resolution": "640:360",
                            "serverType": 0
                        }
                    ],
                    "videoId": "983ed602015e100085d5fdd300000000"
                }
            }
        ],
        "status": 2,
        "taskId": "983af870015e10001885297a00000000",
        "timestamp": 1505803059873,
        "transNo": "0bf4cc34824004b1c4cb48fed63d620a"
    },
    "message": "操作成功"
}

Error code

The interface has no error codes that are related to interface service logic, the generic error code can be found at Return Result.

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!