You can query the completion of pullVideoQuery.
Name | Description |
---|---|
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 |
Name | Description |
---|---|
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(code) | Description(message) | HTTP status | Semantic |
---|---|---|---|
1000 | Parameter error | 200 | Parameter error |
1301 | User has no permission | 200 | User has no permission |
#!/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" }'
{ "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" }