Livepush Developers

Stream Scheduler

Set scheduler mode

PUT 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)
headers.txt
Authorization: Bearer YOUR_API_TOKEN

Try it

PUT https://octopus.livepush.io/streams/{stream_id}/config/scheduler/mode — This call changes live data on your account.

Parameters

Path parameters

  • stream_id string required
    Unique identifier of the pre-recorded live stream

Request body

application/json required

  • mode string required
    eventsinfinitynone
Example request body response.json
{
  "mode": "events"
}

Code samples

request.sh
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

application/json

  • success boolean
Example 200 response response.json
{
  "success": true
}

Unauthorized