Streams

Turn a stream on or off

POST/streams/{id}/toggle-active/

write Change: creates or edits. Scopes

Flips is_active. Turning off stops it; turning an always-on stream with a source back on starts it. Answers with the stream.

Path parameters

  • idstring (uuid)required

    The stream's id.

Response

200 OK

  • idstring (uuid)requiredread-only
  • xtream_idintegerrequiredread-only

    The stream's number in players' channel lists. Set when it is created, never changed or reused.

  • namestringrequired
  • categorystring (uuid)
  • category_namestringrequiredread-only
  • categoriesstring (uuid)[]

    Every category it is listed under; always holds category, its main one.

  • bouquetsstring (uuid)[]

    Bouquets this stream belongs to

  • sourcesobject[]
    • sourcestring (uuid)required
    • source_namestringrequiredread-only
    • source_urlstring (uri)requiredread-only
    • source_healthstringrequiredread-only
    • source_health_atstring (date-time)requiredread-only
    • source_is_activebooleanrequiredread-only
    • orderinteger

      Priority. 0 = primary. Lower values are tried first.

  • descriptionstringcan be null
  • thumbnailstringcan be null
  • logo_autobooleanrequiredread-only
  • epg_channel_idstring

    The guide channel players show for this stream. Blank: no guide.

  • epg_autobooleanrequiredread-only
  • epg_channelobjectrequiredread-onlycan be null
    • idstringrequiredread-only
    • namestringrequiredread-only
    • iconstring (uri)requiredread-only
    • countriesstring[]requiredread-only
    • has_guidebooleanrequiredread-only
  • tvg_idstringrequiredread-only
  • streaming_enginestring

    Engine used for video processing

    • gstreamer - GStreamer
    • ffmpeg - FFmpeg
  • engine_configany

    JSON configuration for streaming engine parameters

  • transcoding_profilestring (uuid)can be null

    Optional: converts the stream's picture and sound this way.

  • transcoding_profile_namestringrequiredread-only
  • allow_passthroughboolean

    On (the default): a source players can play is sent as it is, and one they cannot is converted. Off: the stream is always converted. A transcoding profile always converts.

  • user_agentstring

    Sent to the source instead of the server's own. Leave empty unless the provider refuses other players.

  • http_proxystring

    Reach the source through this HTTP proxy, e.g. http://10.0.0.5:3128.

  • http_headersstring

    One "Name: value" per line, e.g. "Referer: https://example.com" or "Cookie: session=abc".

  • is_activeboolean
  • is_stoppedbooleanrequiredread-only

    Stopped with Stop: it stays stopped until Start or Restart.

  • is_on_demandboolean

    Started when someone watches and stopped once nobody does. Off: it runs all the time.

  • is_directboolean

    Send viewers straight to the source instead of playing it through a server. The line and its rules are still checked, but the source address (and any login in it) is shown to the viewer, there is no connection limit, no live connection row and no backup source.

  • routing_modestring

    auto: any streaming server with room plays it (never the panel's own); pinned: the servers of pinned_servers in order, the next taking over when one fails.

    • auto - Auto load-balance (excludes panel)
    • pinned - Pinned (ordered failover)
  • pinned_serversobject[]
    • serverstring (uuid)required
    • server_instance_idstringrequiredread-only
    • server_namestringrequiredread-only
    • positionintegerrequired

      Lower = higher priority. 0 is primary; 1, 2, … are failover targets in order.

  • auto_eligible_serversstring (uuid)[]
  • current_serverstring (uuid)requiredread-only
  • current_sourceobjectrequiredread-only
    • idstring (uuid)requiredread-only
    • namestringrequiredread-only
    • urlstring (uri)requiredread-only
    • healthstringrequiredread-only

      How the servers last found it: online while a server plays from it, down after one failed to, unknown until a server has tried.

    • health_atstring (date-time)requiredread-onlycan be null

      When a server last said how it found it.

    • probed_video_codecstringrequiredread-only

      e.g. h264, hevc. Empty until a server has read the source.

    • probed_audio_codecstringrequiredread-only
    • probed_fpsnumberrequiredread-onlycan be null

      Null when the source declares a variable or unknown rate.

    • probed_widthintegerrequiredread-onlycan be null
    • probed_heightintegerrequiredread-onlycan be null
    • probed_audio_tracksintegerrequiredread-onlycan be null

      Number of audio streams — language alternatives.

    • probed_atstring (date-time)requiredread-onlycan be null

      When a server last read these, as a stream started on it.

  • statusstringrequiredread-only
  • online_sincestring (date-time)requiredread-onlycan be null

    When the current run started: its uptime counts from here.

  • live_statsanyrequiredread-only

    What the server playing it last reported (fps, video_codec, audio_codec…).

  • check_statestringrequiredread-only

    Whether the channel proved it plays since it was added. Read-only.

  • check_detailstringrequiredread-only

    Why the check failed, in plain words, or what it waits for.

  • checked_atstring (date-time)requiredread-onlycan be null
  • sort_orderinteger
  • active_sessions_countintegerrequiredread-only

    People watching it now.

  • restart_countintegerrequiredread-onlycan be null
  • stream_configobjectrequiredread-only
  • created_bystring (uuid)requiredread-onlycan be null
  • created_by_usernamestringrequiredread-only
  • created_atstring (date-time)requiredread-only
  • updated_atstring (date-time)requiredread-only
  • provider_linkobjectrequiredread-onlycan be null
    • providerintegerrequired
    • provider_namestringrequired
    • item_namestringrequired

      The channel's name at the provider.

    • gonebooleanrequired

      The provider no longer lists it.

    • spare_namestringrequired

      The provider tried last when its sources fail; may be empty.

  • archive_daysinteger

    Record this channel so viewers can watch what aired in the last this many days (TV archive). 0 = off.

    What it costs: the channel runs all the time on the server that records it, so it holds one provider connection permanently, and it uses disk at its own bitrate (about 10.8 GB a day per Mb/s). Recordings are the channel as viewers get it, never re-encoded. Turning it off deletes the recordings.

  • archive_serverstring (uuid)can be null

    The server that records this channel and plays its catch-up. The channel runs there, so viewers of the live channel are sent there too: one provider connection, not two. If it goes down, the channel moves to another server and recording waits for it.

  • catchupobjectrequiredread-onlycan be null
    • recordingbooleanrequired
    • pausedbooleanrequired

      The server paused recording (its disk is full).

    • bytesintegerrequired
    • fromstring (date-time)requiredcan be null
    • tostring (date-time)requiredcan be null
    • recorded_secondsintegerrequired
    • gapsintegerrequired
    • bytes_per_dayintegerrequiredcan be null

      Known after ten minutes of recording.

    • disk_free_bytesintegerrequiredcan be null
    • disk_total_bytesintegerrequiredcan be null
  • created_channelobjectrequiredread-onlycan be null
    • updated_atstring (date-time)required
    • ends_atstring (date-time)requiredcan be null
  • delayedobjectrequiredread-onlycan be null
    • secondsintegerrequired
    • originalobjectrequiredcan be null

      Null when it records its own source.

      • idstring (uuid)required
      • namestringrequired
    • own_sourcebooleanrequired
    • source_statusstringrequired

      The status of the channel it records.

    • serverobjectrequiredcan be null
      • idstring (uuid)required
      • namestringrequired
    • recordingbooleanrequired
    • recorded_fromstring (date-time)requiredcan be null
    • ready_atstring (date-time)requiredcan be null

      When the whole delay is recorded.

  • feeds_delaysbooleanrequiredread-only

Errors

  • 400 Something sent is not valid. Each field that is wrong is named with what is wrong.
  • 401 No credential, or one that is wrong, expired or revoked.
  • 403 The account, or the key's or app's scopes, may not do this.
  • 404 Nothing with this id, or nothing the account can see.
  • 429 Slow down: wait the seconds in the Retry-After header, then try again.

What each error means