List Ad Triggers
Returns the queued ad break triggers belonging to this stream.
curl -X POST "https://api.5centscdn.com/v2/streams/pull/123/adinsertion/triggers" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"scheduleIds[]": [
"101",
"102"
],
"viewTriggered": "0",
"orderByDate": true
}'
import requests
import json
url = "https://api.5centscdn.com/v2/streams/pull/123/adinsertion/triggers"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"scheduleIds[]": [
"101",
"102"
],
"viewTriggered": "0",
"orderByDate": true
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.5centscdn.com/v2/streams/pull/123/adinsertion/triggers", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"scheduleIds[]": [
"101",
"102"
],
"viewTriggered": "0",
"orderByDate": true
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"scheduleIds[]": [
"101",
"102"
],
"viewTriggered": "0",
"orderByDate": true
}`)
req, err := http.NewRequest("POST", "https://api.5centscdn.com/v2/streams/pull/123/adinsertion/triggers", 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/streams/pull/123/adinsertion/triggers')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-Key'] = 'YOUR_API_KEY'
request.body = '{
"scheduleIds[]": [
"101",
"102"
],
"viewTriggered": "0",
"orderByDate": true
}'
response = http.request(request)
puts response.body
[
{
"id": 123,
"relid": 123,
"value": 42,
"triggered": 42
}
]
/streams/pull/{streamid}/adinsertion/triggersTarget server for requests. Edit to use your own host.
API key (sent in header)
Numeric stream ID.
The media type of the request body
Filter to specific schedule IDs (as strings). Always sent with a leading empty-string entry as a "no filter" sentinel when no schedule is selected.
Filter by triggered status: 0 pending, 1 already fired.
Set true to order results by value descending.
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
Numeric stream ID.
Body
Filter to specific schedule IDs (as strings). Always sent with a leading empty-string entry as a "no filter" sentinel when no schedule is selected.
Set true to order results by value descending.
Responses
Beanstalkd job ID.
Parent schedule ID.
Scheduled fire time as a Unix timestamp.
Whether the trigger has already fired.
01