Call pullVideo to set the url of the video to be pulled to the background. The background automatically pulls and saves url videos from third-party platforms. You can set pull tasks in batches.
| Name | Description |
|---|---|
transNoString | The service ID must be unique and controlled by users It is recommended that a 32-bit UUID be a string of up to 32 characters |
cmdString | Command in the following format {tcTemplateName:xxxx,workflowCode:xxx} |
*fileListString | The url and corresponding parameters of the video to be pulled are expressed in json strings and encoded in url_safe_base64. A maximum of 50 urls and parameters can be pulled at a time. The parameters are as follows:
|
workflowIdString | Workflow ID |
notifyUrlString | url to receive processing results. This url does not need to be encrypted. For details about the notification content, see the interface document. The notification content is encoded in url_safe_base64 |
separateInteger | Whether the processing instructions for pulling multiple videos are notified separately. Value range: 0(entire batch merge notification) 1(each video is notified independently) Default is 0 |
fetchTsInteger | The default value is 1. 0: indicates not to capture TS files 1: Indicates that TS files need to be captured Note: Encrypted hls files cannot be pulled |
| Name | Description |
|---|---|
codeInteger | Result status code, 200 indicates success |
messageString | message |
dataObject | Return data |
tranNoString | trans NO |
taskIdString | Task ID |
| Error code(code) | Description(message) | HTTP status | Semantic |
|---|---|---|---|
| 1000 | Parameter error | 200 | Parameter error |
#!/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/pullVideo" \
-X "POST" \
-u "$username:$password" \
-H "Date: $date" \
-H "x-cnc-auth-method: BASIC" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"fileList":"W3tmaWxlbmFtZTo8ZmlsZU5hbWUxPixmZXRjaFVybDo8ZmV0Y2hVcmwxPixtZDU6PG1kNTE+fSx7ZmlsZW5hbWU6PGZpbGVOYW1lMj4sZmV0Y2hVcmw6PGZldGNoVXJsMj4sbWQ1OjxtZDUyPn1d",
"workflowId":"workflowId_1",
"notifyUrl":"http://xxxxxx/callback/",
"cmd":"{tcTemplateName:xxxx,workflowCode:xxx}",
"transNo":"XXXXXXXXXX",
"separate":"1",
"fetchTs":"1"
}'{
"code": 200,
"message": "Operation succeeded",
"data":{
"taskId":"0123456789012345678912",
"transNo": "0123456789012345678912"
}
}