Set scheduler mode
https://octopus.livepush.io/streams/{stream_id}/config/scheduler/mode
Base URL https://octopus.livepush.io — Core Streams & Media APIs
Sets how the pre-recorded stream plays: events (scheduled events),
infinity (the playlist on air continuously) or none (off).
This replaces the stream's whole scheduler configuration with the
mode alone. The playlist, the looping setting and every scheduled
event, upcoming ones included, are cleared. Creating an event already
switches the stream to events mode, so you only need this call to
change modes deliberately.
Requires a token with the streams.write scope.
Authorization
Send a valid access token in the Authorization header.
bearerAuth— Bearer token (JWT)
Authorization: Bearer YOUR_API_TOKEN
Try it
Loading the request builder…
PUT
https://octopus.livepush.io/streams/{stream_id}/config/scheduler/mode
— This call changes live data on your account.
Parameters
Path parameters
-
stream_idstring requiredUnique identifier of the pre-recorded live stream
Request body
-
modestring requiredeventsinfinitynone
{
"mode": "events"
}
Code samples
curl -X PUT 'https://octopus.livepush.io/streams/<stream_id>/config/scheduler/mode' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"mode": "events"
}'
const response = await fetch('https://octopus.livepush.io/streams/<stream_id>/config/scheduler/mode', {
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"mode": "events"
}),
});
if (!response.ok) {
throw new Error(`Livepush API error ${response.status}`);
}
const data = await response.json();
import requests
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json',
}
payload = {
"mode": "events"
}
response = requests.put('https://octopus.livepush.io/streams/<stream_id>/config/scheduler/mode', headers=headers, json=payload, timeout=30)
response.raise_for_status()
data = response.json()
Responses
Mode set
-
successboolean
{
"success": true
}
Unauthorized