VideoEdit

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

The basic information about a single video can be edited by calling videoEdit.

  • Limit of request rate per user: 300/5min
  • Applicable Products: Cloud VoD
For API authentication details, please refer to: API Authentication Overview

Request

Body Params

NameDescription
*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. videoClassification can only contain Chinese characters, uppercase and lowercase letters, numbers, underscores, and spaces. It cannot start with a space. Multiple characters can be separated by commas. (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

Response

Body Params

NameDescription
codeInteger

Result status code, 200 indicates success

messageString

Return message

Error code

Error code(code)Description(message)HTTP statusSemantic
1301

User has no permission

200User has no permission
1500

Video name, more than 40 characters

200Video name, more than 40 characters
1558

Video cannot be spliced

200Video cannot be spliced
1575

videoIds cannot be empty

200videoIds cannot be empty
1576

videoIds cannot contain special characters

200videoIds cannot contain special characters
1577

The videoIds format is incorrect. Multiple videos should be separated by commas (,)

200The videoIds format is incorrect. Multiple videos should be separated by commas (,)

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/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"
}'
Response example
Copy Copy success
{
    "code":200,
    "data":"",
    "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!