PullVideoQuery

Update time: 2024-07-29 17:02:38

You can query the completion of pullVideoQuery.

  • Single user trigger frequency: 300/5min
  • Applicable Products: Cloud VoD

Request

Body Params

NameDescription
taskIdString
Task ID taskId and transNo must pass at least one packet, with taskId taking precedence
transNoString
Service ID taskId and transNo must pass at least one packet, with taskId taking precedence

Response

Body Params

NameDescription
codeInteger
Result status code, 200 indicates success
messageString
message
dataObject
Return data
taskIdString
Task ID
transNoString
trans NO
timestampString
Millisecond timestamp
statusInteger
Task status Value range: 1(in process) 2(Completed)
itemsList
Pull the result status information for each video. If the processing request includes multiple videos, items contain multiple pieces of information
fileNameString
File name
fetchUrlString
Pull URL
md5String
Video md5
pullStatusInteger
Pull the task execution status Value range: 1(in process) 2(Successful) 3(Failure)
cmdStatusInteger
Execution status of the integration command Value range: 1(in process) 2(Successful) 3(Failure)
videoInfoObject
Contains video id, video file list. Video information includes bit rate, sharpness, resolution, terminal type, video URL
videoIdString
Video id
durationLong
duration
videoFileListList
Video file list
clarityInteger
Clarity. Value range: 1(original painting) 2(fluency) 3(standard definition) 4(HD) 5(Super clear)
serverTypeInteger
Terminal type. Value range: 0(PC) 1(original video)
bitrateInteger
Bit rate
resolutionString
resolution
fileSizeLong
File size
fileUrlString
Video url

Error code

Error code(code)Description(message)HTTP statusSemantic
1000Parameter error200Parameter error
1301User has no permission200User has no permission

Example

JSON
JSON
Request example
Copy Copy success
#!/bin/bash
username='example_username'
apiKey='example_apiKey'
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url "https://api.cdnetworks.com/vod/videoManage/pullVideoQuery" \
-X "POST" \
-u "$username:$password" \
-H "Date: $date" \
-H "x-cnc-auth-method: BASIC" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
	"taskId":"aaaaabbbbbccccc",
	"transNo":"XXXXXXXXXX"
}'
Response example
Copy Copy success
{
    "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": "Operation succeeded"
}
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!