Call videoEnable to re-enable the disabled video.
Name | Description |
---|---|
*videoIdString | The video id to enable |
Name | Description |
---|---|
codeInteger | Result status code, 200 indicates success |
messageString | Return message |
dataString | Return data |
Error code(code) | Description(message) | HTTP status | Semantic |
---|---|---|---|
1502 | The video doesn't exist! | 200 | The video doesn't exist! |
1503 | The videoId cannot be empty | 200 | The videoId cannot be empty |
1504 | videoId contains special characters | 200 | videoId contains special characters |
1509 | The video is already open | 200 | The video is already open |
1510 | Video start failure | 200 | Video start failure |
1511 | Video start failure | 200 | Video start failure |
1525 | You have no permission to start the video | 200 | You have no permission to start the video |
#!/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/videoEnable" \
-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"
}'
{
"code": 200,
"data": "",
"message": "Operation succeeded"
}