Enable Ad Insertion
Creates the ad insertion record for the VoD push zone. Requires the service to have Advanced Features enabled and an available ad insertion slot.
curl -X PUT "https://api.5centscdn.com/v2/zones/vod/push/42/adinsertion" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"enabled": "Y",
"provider": "Google Ad Manager",
"advanced_analytics": 1
}'
import requests
import json
url = "https://api.5centscdn.com/v2/zones/vod/push/42/adinsertion"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"enabled": "Y",
"provider": "Google Ad Manager",
"advanced_analytics": 1
}
response = requests.put(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.5centscdn.com/v2/zones/vod/push/42/adinsertion", {
method: "PUT",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"enabled": "Y",
"provider": "Google Ad Manager",
"advanced_analytics": 1
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"enabled": "Y",
"provider": "Google Ad Manager",
"advanced_analytics": 1
}`)
req, err := http.NewRequest("PUT", "https://api.5centscdn.com/v2/zones/vod/push/42/adinsertion", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.5centscdn.com/v2/zones/vod/push/42/adinsertion')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-Key'] = 'YOUR_API_KEY'
request.body = '{
"enabled": "Y",
"provider": "Google Ad Manager",
"advanced_analytics": 1
}'
response = http.request(request)
puts response.body
{
"result": "success"
}
/zones/vod/push/{zoneid}/adinsertionTarget server for requests. Edit to use your own host.
API key (sent in header)
Zone ID
The media type of the request body
Enable or disable ad insertion on the zone.
Ad server provider identifier.
1 to enable the Advanced Analytics add-on, which unlocks the Ad Insertion Logs tab and the Advanced Analytics tab (tracking reports, creatives, events, ad breaks). 0 otherwise.
SSAI transcoding profile ID from the SSAI catalog (see Check/Apply SSAI Transcode Profile). Write-only; omit to leave unchanged.
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Provide your API key in the header.
Path Parameters
Body
1 to enable the Advanced Analytics add-on, which unlocks the Ad Insertion Logs tab and the Advanced Analytics tab (tracking reports, creatives, events, ad breaks). 0 otherwise.
01SSAI transcoding profile ID from the SSAI catalog (see Check/Apply SSAI Transcode Profile). Write-only; omit to leave unchanged.
42Responses
successerror