Livepush Developers

Stream Scheduler

Toggle event looping

PUT https://octopus.livepush.io/streams/{stream_id}/config/scheduler/{event_id}/loop

Base URL https://octopus.livepush.io — Core Streams & Media APIs

Turns looping on or off for one event. Note the path has no /events/ segment.

This also sets the stream's looping setting to the same value. Looping requires a plan that includes it.

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/{event_id}/loop — This call changes live data on your account.

Parameters

Path parameters

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

Request body

application/json required

  • loop boolean required
Example request body response.json
{
  "loop": true
}

Code samples

request.sh
curl -X PUT 'https://octopus.livepush.io/streams/<stream_id>/config/scheduler/<event_id>/loop' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "loop": true
  }'
const response = await fetch('https://octopus.livepush.io/streams/<stream_id>/config/scheduler/<event_id>/loop', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "loop": true
  }),
});

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 = {
    "loop": True
}

response = requests.put('https://octopus.livepush.io/streams/<stream_id>/config/scheduler/<event_id>/loop', headers=headers, json=payload, timeout=30)
response.raise_for_status()
data = response.json()

Responses

Event looping updated

application/json

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

Unknown stream or event

Unauthorized