The basic information about a single video can be edited by calling videoEdit.
Name | Description |
---|---|
*videoIdString | id of the video to edit |
videoNameString | The modified video name contains a maximum of 40 Chinese characters |
videoDescriptionString | Video description, a maximum of 200 Chinese characters |
videoClassificationString | Modified video subcategories. This field is valid only when categoryNames is not entered. If there are multiple subcategories that are the same, the video sets all of them. (categoryNames is recommended) |
categoryNamesString | After the video category is modified, you can specify parent category and child category. The format is an urlsafe base64 encoded JSON string array. Transfer an empty array, indicating that the video classification Settings are cleared.
The parameters are as follows:
1) parentName: indicates the name of the parent class.
2) childName: indicates the name of the subcategory
} |
publishDomainString | Adjusted published domain name |
playerIdString | The adjusted player ID |
Name | Description |
---|---|
codeInteger | Result status code, 200 indicates success |
messageString | Return message |
Error code(code) | Description(message) | HTTP status | Semantic |
---|---|---|---|
1301 | User has no permission | 200 | User has no permission |
1500 | Video name, more than 40 characters | 200 | Video name, more than 40 characters |
1558 | Video cannot be spliced | 200 | Video cannot be spliced |
1575 | videoIds cannot be empty | 200 | videoIds cannot be empty |
1576 | videoIds cannot contain special characters | 200 | videoIds cannot contain special characters |
1577 | The videoIds format is incorrect. Multiple videos should be separated by commas (,) | 200 | The videoIds format is incorrect. Multiple videos should be separated by commas (,) |
#!/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/videoEdit" \ -X "POST" \ -u "$username:$password" \ -H "Date: $date" \ -H "x-cnc-auth-method: BASIC" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "videoId":"XXXXXXXXXXX", "videoName":"new_name", "videoDescription":"description", "videoClassification":"fileName", "categoryNames":"W3siY2hpbGROYW1lIjoi5a2Q5YiG57G7MSIsInBhcmVudE5hbWUiOiLniLbliIbnsbsxIn0seyJjaGlsZE5hbWUiOiLlrZDliIbnsbsyIiwicGFyZW50TmFtZSI6IueItuWIhuexuzIifV0=", "publishDomain":"xxxx.com", "playerId":"1" }'
{ "code":200, "data":"", "message":"Operation succeeded" }