VideoBlock

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

Invoke videoBlock to mask and disable uploaded videos. When the video is disabled, you cannot watch it any more.

  • 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 be masked

Response

Body Params

NameDescription
codeInteger

Result status code, 200 indicates success

messageString

Return message

dataString

Return data

Error code

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

The video doesn't exist!

200The video doesn't exist!
1503

The videoId cannot be empty

200The videoId cannot be empty
1504

videoId contains special characters

200videoId contains special characters
1505

You have no permission to block the video

200You have no permission to block the video
1506

The video has since been blocked

200The video has since been blocked
1507

Video block failure

200Video block failure
1508

Video block failure

200Video block failure

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/videoBlock" \
-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"
}'
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!