REST API
Everything the dashboard does goes through this API, so scripts can do it too. All requests and responses are JSON.
Authentication
Create an API key in the dashboard under Server → API keys (admins), with the role it should have, and send it on every request:
KEY=gsk_…
curl -H "Authorization: Bearer $KEY" https://tv.example.com/api/v1/streamsA key can do what its role can do (see roles). A streamer-role key belongs to no account, so it sees no channel. To give a client their channel's viewer figures for their own website or app, make the channel a figures link instead. Repeated wrong keys from one address are refused with 429 for a while. A streamer's changes to a stream's adaptive bitrate, rewind, picture-check, sound-fix, sound-sides, lip-sync and logo settings are limited to 30 a minute, and their channel reports to another 30 a minute; beyond that they answer 429 with Retry-After.
Only GET /api/v1/health works without a key.
Recording, adaptive bitrate, UDP inputs and adding restream destinations also need the feature in your license; without it they answer 403.
Streams
| Method and path | Role | |
|---|---|---|
GET /api/v1/streams | streamer | Live streams: codec, resolution, bitrate, viewers by protocol, health, recording, adaptive bitrate |
GET /api/v1/streams/{name} | streamer | One stream |
DELETE /api/v1/streams/{name} | operator | Disconnect the encoder (it may reconnect by itself) |
GET /api/v1/streams/{name}/consumers | streamer | Everything reading the stream, and who is dropping frames |
GET /api/v1/streams/{name}/thumbnail | streamer | A JPEG of the latest keyframe (needs FFmpeg) |
GET /api/v1/streams/{name}/tr101290 | streamer | The full TR 101 290 report of what a stream's sender sends, for a stream published over SRT or received on a UDP or RTP input (404 otherwise). The stream's tr101290 field carries the counts |
GET /api/v1/streams/{name}/sound | streamer | The stream's sound now: measured, peak and rms (dBFS, left and right), silent_s, no_track, phase (how alike left and right are: +1 the same, −1 one side upside down; left out while too quiet to tell) and cancel_s (how long they have cancelled each other), plus silence_dbfs and alarm_after_s. measured is false for a stream not metered (a channel's inputs). 501 without sound meters (needs FFmpeg) |
GET /api/v1/streams/{name}/picture-check | streamer | The stream's picture now (state: moving, frozen or black, seconds it has been so), whether a still picture is normal for it (still_ok), and the alarms' delays (frozen_after_s, black_after_s). available is false where pictures aren't checked (no FFmpeg) |
PUT /api/v1/streams/{name}/picture-check | streamer | {"still_ok": true} turns the frozen-picture alarm off for a channel whose picture stands still on purpose (a black picture still alarms); audited |
GET /api/v1/streams/{name}/sound-fix | streamer | The sound fix's mode (off, flip, auto), whether one side is flipped now (flipping), what the converter is doing (state: off, starting, on, retrying with error, not_stereo, no_sound, off_air), the side copied now (copying), and how alike the two sides are (phase.value: +1 the same, −1 one side upside down; phase.cancel_s: how long they have cancelled each other). available is false where the sound can't be changed (no FFmpeg) |
PUT /api/v1/streams/{name}/sound-fix | streamer | `{"mode": "off" |
GET /api/v1/streams/{name}/sound-sides | streamer | One side silent: side_mode (off, left, right, auto), the side put on both now (copying), the shared state, and each side now (sides.left_db, sides.right_db peaks in dBFS; sides.silent: left or right while it is silent and the other has sound, for sides.silent_s) |
PUT /api/v1/streams/{name}/sound-sides | streamer | `{"mode": "off" |
GET /api/v1/streams/{name}/lip-sync | streamer | The sound's delay against the picture: delay_ms (+ later, − earlier), max_ms |
PUT /api/v1/streams/{name}/lip-sync | streamer | {"delay_ms": n}, −10000 to 10000; a live channel follows at once and its HLS playback restarts; audited |
GET /api/v1/audio/levels | operator | Every metered stream's sound now (streams: the same fields per stream), as Multiview shows it |
GET / POST /api/v1/streams/{name}/record | operator | Recording status / {"action":"start"} or {"action":"stop"}. A channel's input (news.main, .backup, .pull, .loop) can't be recorded (400): record the channel |
GET /api/v1/streams/{name}/transcode | streamer | Adaptive bitrate for this stream: mode (on, off, config, or empty for off by default), server_on, qualities (its own choice, largest first; null is Auto), sizes (what can be chosen, with suggested bitrates), auto (the server's qualities), max_qualities. Answers while the stream is offline |
PUT /api/v1/streams/{name}/transcode | streamer | {"enabled": true} turns adaptive bitrate on for this stream (clients: their own channels) |
PUT /api/v1/streams/{name}/transcode/qualities | streamer | {"mode": "auto"}, or {"mode": "manual", "qualities": [{"size": 1080, "video_kbps": 4000}, {"size": 720, "video_kbps": 2500}]}: up to 8 sizes from sizes, 50 kbps up to each size's max_video_kbps (clients: twice the suggested bitrate; staff: 50000), each smaller size with less bitrate than the one above. Each is used up to what the source justifies. A live stream's adaptive bitrate starts again with them, at most once every 30 seconds |
Viewer figures
| Method and path | Role | |
|---|---|---|
GET /api/v1/streams/{name}/audience?from=YYYY-MM-DD&to=YYYY-MM-DD | streamer | The stream's viewer figures from day from to day to (the server's days; today when left out; up to 400 days back): totals (peak, peak_at, viewers, sessions, watch_seconds, bytes), points (every 15 minutes for one day, every hour for up to 8 days, every day beyond: resolution), protocols and devices (watch seconds; viewers when exact), days, since (the first day with figures), partial, time_zone, utc_offset. Viewers are exact up to 8 days, estimated within about 3 % beyond. &format=csv gives a line per day. A channel's input answers 400 |
GET /api/v1/streams/{name}/public | streamer | Whether the live viewer count is public: on, path |
PUT /api/v1/streams/{name}/public | streamer | {"on": true} lets anyone read the live count |
GET /api/v1/public/{name}/viewers | anyone | stream, live, viewers (now), peak_today, at; Access-Control-Allow-Origin: *, refreshed every 5 seconds. 404 unless switched on |
GET /api/v1/public/{name}/watch | anyone | What a channel's watch page shows: title, tagline, live, viewers (when the page shows it), schedule (from half a day ago to three days ahead: start, stop, title, description, between; absent when the page hides it), now (the server's clock). Refreshed every 10 seconds. A protected stream's needs its link (?token=), else 403; 404 for a name that isn't a channel |
GET /api/v1/public/{name}/logo | anyone | The watch page's logo (a PNG), kept 5 minutes by browsers; 404 without one |
GET /api/v1/public/{name}/still | anyone | The channel's picture now (a JPEG), for an embed waiting to be played; kept 10 seconds. A protected stream's needs its link |
GET /api/v1/streams/{name}/stats-link | streamer | The channel's private figures link: path ("" = none made) |
POST /api/v1/streams/{name}/stats-link | streamer | Makes a new link (path); one made before stops working |
DELETE /api/v1/streams/{name}/stats-link | streamer | Ends the link |
GET /api/v1/stats-link, POST, DELETE | admin | The same for the link to every channel's figures |
GET /stats/{token}.json | the link | The figures: channel, live, watching_now, today, yesterday, last_7_days, last_30_days, this_month, last_month (each views, viewers, viewers_estimated, most_at_once, most_at_once_at, watch_hours, average_watch_minutes, data_gb), figures_from, time_zone, utc_offset, updated_at. ?from=&to= gives total and days instead. The all-channels link gives channels: one such entry per channel (with ?from=&to=, each channel's total). Any site may read it; 404 for a link that isn't (or no longer is) one, or while the channel's owner is disabled. At most 30 custom periods a minute per link (429 with Retry-After). Only channels can have one (400 otherwise), and a change of owner ends it |
Viewer sessions
| Method and path | Role | |
|---|---|---|
GET /api/v1/sessions | operator | Sessions running now: stream, protocol, ip, user_agent, started_at, duration_seconds, bytes |
GET /api/v1/sessions/history | operator | Finished sessions, a page at a time (limit up to 500, offset), with total; ?format=csv downloads them |
GET /api/v1/sessions/summary?by=stream | operator | Totals per stream (by=ip: per viewer address): sessions, active, distinct, view_seconds, bytes, protocols |
Filters for all three: stream, protocol (hls, dash, rtmp, srt), ip (address prefix), agent (player contains), from and to (start time, RFC 3339 or unix seconds), min_duration (seconds), sort (started, duration, bytes).
Recordings
| Method and path | Role | |
|---|---|---|
GET /api/v1/recordings[?stream=] | operator | Recorded files, newest first: stream, name, size, start, length, whether it is still being written; plus the total size and retention |
GET /api/v1/recordings/{stream}/{file} | operator | The file itself (supports Range); add ?download=1 to save it |
GET /api/v1/recordings/{stream}/{file}/index.m3u8 | operator | An HLS playlist over the file, for playing and seeking in a browser |
DELETE /api/v1/recordings/{stream}/{file} | operator | Delete a recording (not the one being written: 409) |
24/7 channels (playout)
| Method and path | Role | |
|---|---|---|
GET /api/v1/playout/channels | operator | Every channel: state, what is on air (and where in the file), the live input, the next items, the schedule's state and problems, the encoder |
GET /api/v1/playout/channels/{name} | operator | One channel |
GET /api/v1/playout/channels/{name}/asrun | operator | What went on air, newest first; from, to (RFC 3339 or unix seconds), limit; ?format=csv downloads it |
POST /api/v1/playout/channels | operator | Make a channel: {"name", "live", "width", "height", "fps", "video_kbps", "filler": "black"|"video", "filler_file", "timezone"} (all but the name optional). It starts at once with an empty playlist (filler). 409 if the name is taken |
GET /api/v1/playout/channels/{name}/settings | operator | The channel's settings and origin (dashboard, or config for unda.yaml) |
PUT /api/v1/playout/channels/{name} | operator | New settings for a dashboard channel (it restarts; the schedule is kept). 409 for a channel from unda.yaml |
DELETE /api/v1/playout/channels/{name} | operator | Delete a dashboard channel and its schedule (the as-run log is kept) |
GET /api/v1/playout/channels/{name}/schedule | operator | The playlist: timezone, repeat (loop), start_at, since, items (media, title, description, in, out, and at + days, or after), version, writable, error if the file can't be used now. A schedule of times of day or dates is shown as the playlist that plays the same (converted) |
PUT /api/v1/playout/channels/{name}/schedule | operator | Save the whole playlist with the version you read. 400 lists the problems (problems, one per item); 409 if it changed since that version, or the server can't write the file. The channel follows it at once |
POST /api/v1/playout/channels/{name}/schedule/preview | operator | What a playlist would play if saved (nothing is saved): today's slots (start, end, item, fixed), next (when each item next starts, up to 8 days ahead), on_air, round_s |
POST /api/v1/playout/channels/{name}/skip | operator | {"action": "next"|"previous"|"play", "item": N}: move the loop on air (play: loop item N, 0-based). 409 while a fixed-time item is on air, or while the channel is paused |
POST /api/v1/playout/channels/{name}/pause | operator | Take the channel off air: state paused, with paused_at, paused_by and, for a looping playlist, resume (item, media, title, position_seconds: where it carries on). Kept across restarts (until the next start for a channel from unda.yaml); audited. The preview of a paused channel's playlist has paused and resume, on_air -1, and no next for loop items |
POST /api/v1/playout/channels/{name}/resume | operator | Back on air; a looping playlist carries on where it was paused. 409 while the licence allows no more live streams; audited |
GET /api/v1/playout/channels/{name}/logo | operator | The channel's logo: {"logo": {"corner", "size", "opacity", "file", "width", "height", "updated_at"}}, or {"logo": null} |
GET /api/v1/playout/channels/{name}/logo/image | operator | The logo as kept: a PNG, transparent edges trimmed, at most 1024 px a side |
PUT /api/v1/playout/channels/{name}/logo | operator | A multipart form: image (PNG or JPEG, up to 5 MB, at most 4096 px a side), corner (top-left, top-right, bottom-left, bottom-right), size (3–30, % of the picture's height), opacity (10–100). Or JSON settings alone, which keep the image. A field left out keeps its value (a new logo: top-right, 10, 85). On air from the next picture; audited. 400 for an image or setting refused, 413 over 5 MB |
DELETE /api/v1/playout/channels/{name}/logo | operator | Take the logo off, from the next picture; 404 if there is none; audited |
GET /api/v1/playout/channels/{name}/still | operator | The channel's picture now without its logo (a JPEG), for placing one. 409 while the channel is paused or has no picture |
GET /api/v1/media | operator | The media folder: files (length, size, codecs, state ready/checking/error, on_air/scheduled channels), unfinished uploads, space |
GET /api/v1/media/{name} | operator | One file |
DELETE /api/v1/media/{name} | operator | Delete a file; 409 while it is on air. The answer lists channels whose schedule still names it |
POST /api/v1/media/uploads | operator | {"name","size","fingerprint"} starts an upload (201), or returns the unfinished upload of the same file (200) to resume |
GET /api/v1/media/uploads/{id} | operator | Where an upload is (offset) |
PUT /api/v1/media/uploads/{id}?offset=N | operator | The file's bytes from N (at most 16 MB per request). A wrong offset is 409 with the right one. The last piece answers done and the file once it is checked (422 if it isn't playable video) |
DELETE /api/v1/media/uploads/{id} | operator | Cancel an upload |
Restreaming
| Method and path | Role | |
|---|---|---|
GET /api/v1/streams/{name}/push | streamer | Destinations with their state (live only once the destination accepted the stream), last_error in plain words, error_detail (the underlying error), failing_since, and paused_reason when the server switched a destination off after 30 minutes of failures (URLs shown with the key hidden). A channel's list also holds destinations set up earlier on its inputs, each with its input's name in stream (use that name to switch them off or remove them) |
POST /api/v1/streams/{name}/push | streamer | {"name":"youtube","url":"rtmp://a.rtmp.youtube.com/live2/KEY"}. A TV output (operators) adds "broadcast":{…}; "language":"eng" in it labels the sound track (ISO 639), "ad_cues":true in it sends SCTE 35 ad cues ("cue_pid", default 258). A TV output can wait for its receiver: "url":"srt://:9000?passphrase=…" (or allow= addresses); the list then shows srt_listen as for bundles. A destination without broadcast can't listen (400). A channel's input takes no new destination (400): add it to the channel |
GET /api/v1/streams/{name}/inputs/logo | streamer | A channel's playlist logo (drawn on its playlist or looped video only): {"logo": {...}} or {"logo": null}. PUT takes the same form as a 24/7 channel's logo (corner, size, opacity, image) or JSON settings; DELETE removes it; …/inputs/logo/image is the image; …/inputs/still the playlist's picture now without the logo (404 while it isn't playing). For the channel's owner and operators |
GET /api/v1/streams/{name}/watch-page | streamer | A channel's watch page settings: title, tagline, color, hide_schedule, show_viewers, logo (its address, when there is one), with default_title, default_color, watch_url, guide (the channel has a schedule) and still (embeds can show a picture). PUT changes the fields given (title up to 80 characters, tagline 160, colour #rrggbb or "" for the default; audited); PUT …/watch-page/logo takes a multipart form with image (PNG or JPEG, up to 5 MB), DELETE …/watch-page/logo removes it. Channels only (400 for other streams); a client's changes are limited to 30 a minute |
GET /api/v1/streams/{name}/ad-break | operator | The stream's ad break: state ("", announced, on, ending), seconds, out_at, return_at, and outputs that send its cues |
POST /api/v1/streams/{name}/ad-break | operator | {"seconds":60} (5-1800): starts an ad break, leaving the programme 4 s later. 409 when nothing sends the stream's cues, the stream is not live or a break is on; 429 for more than one change every 2 s per stream |
DELETE /api/v1/streams/{name}/ad-break | operator | End now: the programme comes back 2 s later, or a break that has not begun is withdrawn |
PATCH /api/v1/streams/{name}/push/{id} | streamer | {"paused": true} stops sending but keeps the destination; {"paused": false} starts it again. {"name", "url", "broadcast"} edit it: an absent or empty url keeps the saved address and its key; "broadcast": {…} re-encodes it for TV (operators), null sends it as it is. It restarts with the new settings; a paused one stays paused. One from unda.yaml is 409 |
DELETE /api/v1/streams/{name}/push/{id} | streamer | Remove a destination; returns once it is disconnected |
GET /api/v1/streams/{name}/push/{id}/tr101290 | streamer | The full TR 101 290 report of what an MPEG-TS destination or TV output is sent (404 for RTMP, or before it has sent). Each destination's tr101290 field in the list carries the counts |
GET /api/v1/streams/{name}/push/{id}/link | operator | A TV output receivers pull ("url":"http-pull://?allow=…&plain=1"): {"path": "/tv/<token>.ts"}, the link on this server. Every look is audited. The list never shows the token; it shows tv_link with the receivers (address, since, bytes), allow, plain and the last refusal. 404 for other destinations |
POST /api/v1/streams/{name}/push/{id}/link | operator | A new link: the old one stops at once and its receivers are cut off; the encoder carries on. Returns {"path"}. 409 for one from unda.yaml |
GET /tv/<token>.ts | anyone with the link | The TV output as one continuous MPEG-TS. 404 for a wrong link, 403 over plain HTTP when the output is HTTPS only or from an address not allowed, 503 (Retry-After) while it is switched off or already has 8 receivers |
curl -X POST -H "Authorization: Bearer $KEY" \
-d '{"name":"youtube","url":"rtmp://a.rtmp.youtube.com/live2/YOUR-KEY"}' \
https://tv.example.com/api/v1/streams/main-show/pushPlayback protection
Signed links: a protected stream plays only with ?token=. A playback request from a device a link was taken from answers 409 (403 is a missing, wrong or expired link).
| Method and path | Role | |
|---|---|---|
GET /api/v1/streams/{name}/playback | streamer | {"protected", "stream", "all", "devices_per_link", "pushed_off_24h"}: whether a link is needed (set on this stream, or for every stream), how many devices one link may play on at once (0 = unlimited), and how many devices were stopped in the last 24 hours because a link was opened on more |
PUT /api/v1/streams/{name}/playback | streamer | {"protected": true} requires a signed link for this stream (it need not be live); {"devices_per_link": 1} (0–99) limits every link to that many devices at once, the newest winning. Either or both |
POST /api/v1/streams/{name}/playback-link | streamer | {"ttl_seconds": 7200, "devices": 1} (60 s to 30 days, default 1 hour; devices 0 = the stream's setting, 1–99) → {"token", "expires_at", "devices"}: the latest time a viewer can start. Not for a channel's input (400): viewers watch the channel |
GET /api/v1/playback | admin | {"protect_all", "streams"} |
PUT /api/v1/playback | admin | {"protect_all": true} protects every stream |
GET /api/v1/playback/secret | admin | The signing secret (hex) for a website that makes its own links; audited |
POST /api/v1/playback/secret/rotate | admin | A new secret; every link made before stops working; audited |
Rewind
Rewind: how far back a stream's HLS viewers may go. A window is kept on disk; changing one makes the stream's players start again once.
| Method and path | Role | |
|---|---|---|
GET /api/v1/streams/{name}/rewind | streamer | {"minutes", "applies", "max_minutes", "choices", "keeping_minutes", "keeping_bytes"}: the window set, the window that applies (held to the server's longest), the choices offered, and what the stream keeps now |
PUT /api/v1/streams/{name}/rewind | streamer | {"minutes": 30} (0 = off, up to the server's longest); the stream need not be live |
GET /api/v1/rewind | operator | {"max_minutes", "streams", "used_bytes"}; administrators also get dir, ladder_dir and free_bytes |
PUT /api/v1/rewind | admin | {"max_minutes": 120} (0 = no rewind on this server, up to 1440); longer windows are held to it |
WebRTC (WHIP and WHEP)
WebRTC, standard WHIP (RFC 9725) and WHEP. Not under /api/v1 and not behind an account: a WHIP publisher shows its stream key, a WHEP player its playback token, each as Authorization: Bearer … (refused over plain HTTP, 403 https_required). Any origin may call them (CORS); Location, ETag, Link and Accept-Patch are readable.
| Method and path | Who | |
|---|---|---|
POST /whip/{name} | publisher (stream key) | SDP offer (application/sdp, H.264 video, Opus audio) → 201 with the SDP answer, Location (the session), ETag and one Link: <turn:…>; rel="ice-server"; username=…; credential=… per STUN/TURN server. 401 wrong key, 403 another stream's key or not licensed, 409 already live, 406 no video, 503 too many publishers. The stream goes live once media arrives |
POST /webrtc/{name} | viewer (token if protected) | SDP offer → 201 with the answer, Location and Link headers as above. 403 link refused, 404 not live, 409 link in use on its allowed devices, 503 too many viewers or the outbound cap reached |
PATCH /whip/resource/{id}, PATCH /webrtc/resource/{id} | the session | Trickle ICE candidates (application/trickle-ice-sdpfrag, If-Match the ETag); 204. ICE restarts are not supported (501) |
DELETE /whip/resource/{id}, DELETE /webrtc/resource/{id} | the session | Ends it; 200 |
Channel inputs
Channel inputs: a channel ranks its live encoder (live: {name}.main, then {name}.backup), its pull stream (pull: {name}.pull) and its playlist (playlist: {name}.loop); the first with pictures is published as {name}. Streamers reach their own channels only.
| Method and path | Role | |
|---|---|---|
GET /api/v1/streams/{name}/inputs | streamer | enabled, mode (splice = direct, seamless), order, the timings (stall_ms, return_seconds, idle_stop_seconds), slate (playlist or video with slate_file), playlist_from_top, the seamless picture settings, running; while running in direct mode splice: current, role, switches, restarts, last_switch and inputs (each on_air/standby/no_signal), in seamless mode status as under backup sources below; pull (the channel's pull input, its address shortened), has_backup_key, licensed (inputs, pull, playlist, seamless), can_operate |
PUT /api/v1/streams/{name}/inputs | streamer | Any of enabled, order (e.g. ["pull","live","playlist"]; an input left out is off), the timings, slate/slate_file, playlist_from_top (true: the playlist starts from its first item each time it takes over from a live input, instead of joining where its clock is); operators also mode, sources (extra streams after these) and width, height, fps, video_kbps. 403 when a streamer sends an operator's field or the licence lacks an option. In direct mode a running channel takes new settings without restarting; a new mode, or new settings in seamless mode, restart the stream |
PUT /api/v1/streams/{name}/inputs/pull | streamer | {"url":"https://example.com/live/index.m3u8"} (optional rtsp_transport, user_agent). A streamer's address must be http:// or https:// on the public internet (400 otherwise; host names are checked at every connection); an operator's may be anything a pull input takes |
DELETE /api/v1/streams/{name}/inputs/pull | streamer | Remove the channel's pull address; 204 |
The playlist is GET/PUT …/failover/playlist and POST …/failover/switch (operator) puts an input on air ahead of the others in both modes ({"source":"main-show.pull"}). Audit: inputs_changed, channel_pull_set, channel_pull_removed (never the address).
Programme guide
The programme guide: a 24/7 channel's comes from its playlist, a live channel's is typed in. Part of the licence's playout feature. Streamers reach their own channels only.
| Method and path | Role | |
|---|---|---|
GET /api/v1/streams/{name}/guide | streamer | A live channel's typed-in guide: timezone, between (what the guide shows between programmes), programmes (at: "19:00" or "2026-10-25 15:00", days: ["mon","fri"], title, description, length in seconds), version, plan (today in the guide's zone, and next: when each programme is next on air or on_now, null when not in the next 8 days), can_edit. 404 for a stream that isn't a channel ("code":"playout_channel" for a 24/7 channel) |
PUT /api/v1/streams/{name}/guide | streamer | Save it with the version you read ("" when it had none). 400 names the problems (one line per programme); 409 if it changed since. No programmes and no between removes it. Audit live_guide_saved |
POST /api/v1/streams/{name}/guide/preview | streamer | The plan of an unsaved guide, or its problems; nothing is saved |
GET /api/v1/epg | streamer | Every channel's programmes (kind: playout or live; between marks a live channel's time between programmes) from from to to (RFC 3339; default today from midnight UTC; at most 8 days) |
GET /api/v1/epg/link | streamer | Your XMLTV link (path, enabled) |
POST /api/v1/epg/link/rotate | admin | New links for everyone: every link given out before stops working |
GET/PUT /api/v1/epg/settings | admin | {"xmltv": true|false} |
GET /epg/{token}/xmltv.xml (or .xml.gz) | the link | XMLTV for IPTV apps: no sign-in, the link is the key. 404 when it is wrong, replaced or switched off |
Backup sources (failover)
Backup encoder: the older form of the routes above, kept for existing scripts (a channel first switched on here gets seamless switching): with backup sources on, a channel's key publishes to {name}.main, its backup key to {name}.backup, and the server publishes {name} from the first source with pictures.
| Method and path | Role | |
|---|---|---|
GET /api/v1/streams/{name}/failover | streamer | The settings (enabled, sources after main and backup, stall_ms, return_seconds, idle_stop_seconds (0 = always on), slate black/video with slate_file, width, height, fps, video_kbps), running, and while running status: current (the source on air, "" = the slate), forced, switches and sources (each with state offline/starting/standby/on_air/stalled, last_picture, steady_seconds) |
PUT /api/v1/streams/{name}/failover | operator | Any of the settings; the rest stay. {"enabled": true} switches on (a live encoder reconnects once; the channel gets a backup key). Saving while it runs restarts the stream |
POST /api/v1/streams/{name}/failover/switch | operator | {"source": "main-show.backup"} puts that source on air ahead of the others while it has pictures; "" = the automatic order |
GET /api/v1/streams/{name}/failover/log | streamer | The switches, newest first (?limit=, ?format=csv) |
GET /api/v1/channels/{name}/backup-key | streamer | The channel's backup key; audited |
POST /api/v1/channels/{name}/backup-key/rotate | streamer | A new backup key; a backup encoder using the old one is disconnected |
Channels
| Method and path | Role | |
|---|---|---|
GET /api/v1/channels | streamer | Channels you can see: whether each is live, its owner (owner_id, owner_email, owner_name), and for an offline one last_live_at (when it last stopped, while the event log still has it: 30 days) |
POST /api/v1/channels | streamer | {"name":"main-show"} (operators and above may add "owner_id") |
PATCH /api/v1/channels/{name} | admin | {"owner_id": 12} gives the channel to that account, 0 to the house. Its keys stay the same; audited |
GET /api/v1/channels/{name} | streamer | One channel, as in the list (no key) |
GET /api/v1/channels/{name}/key | streamer | The channel's stream key |
POST /api/v1/channels/{name}/rotate | streamer | A new key; a stream using the old one is disconnected |
DELETE /api/v1/channels/{name} | streamer | Delete the channel |
POST /api/v1/channels/{name}/pause | streamer | Take the channel off air: a live encoder is disconnected (disconnected), its keys (the backup key too) are refused until it is resumed, and its inputs stop. The channel shows paused_at and paused_by (to a client, the server's staff when staff paused it); kept across restarts; audited. Pausing a paused channel changes nothing |
POST /api/v1/channels/{name}/resume | streamer | Its keys work again (encoders reconnect by themselves) and its inputs start; audited |
Monitoring
| Method and path | Role | |
|---|---|---|
GET /api/v1/health | none | {"status":"ok"} |
GET /api/v1/alerts | streamer | Open alerts, then those resolved in the last 10 minutes; open, and cleared, how many of the open ones someone has cleared |
POST /api/v1/alerts/{id}/clear | operator | Clears an open alert for everyone: it stays open and listed, with cleared_by and cleared_at, until it gets worse (warning to critical) or ends. A stream's health.alert_level leaves cleared alerts out (cleared_alerts counts them). DELETE shows it again. 404 when the alert isn't open; audited |
GET /api/v1/logs?minutes=N[&stream=NAME][&contains=TEXT][&format=jsonl] | operator | The server's log lines of the last minutes (1, 2, 5, 10, 15, 30, 60, 180, 360 or 1440) as a text file, one line per event; stream keeps one channel's (its inputs, the bundles that carry it, the addresses it sends to), contains lines with that text (any case), format=jsonl the lines as JSON. The server keeps 24 hours in memory; audited |
GET /api/v1/events?limit=20&before=<id> | streamer | Events, newest first, kept 30 days in the database (before pages back through them). A line that repeats within an hour is one entry with count and first_ts; a repeat replaces the earlier line (replaces names it) |
GET /api/v1/metrics/history?metric=egress&range=1h | streamer | The last hour, one point every 5 s. metric: ingest, egress, viewers, streams, cpu, heap, goroutines, consumers, bitrate (with stream=); range: 5m, 15m, 30m, 1h. Longer ranges (6h, 24h, 7d, 30d, 13mo) come from the figures kept in the database as [time, average, highest] per period (a minute to a day, at most about 800 points). A client reads the bitrate and viewers of their own streams only |
GET /api/v1/reports/channels?from=YYYY-MM-DD&to=YYYY-MM-DD | streamer | Each channel's record for whole days on the server's clock (the last 7 by default, at most 400): on_air_seconds, interruptions (the encoder away and back within 5 minutes), interrupted_seconds, longest_interruption_s, stops (away longer, or not back yet), avg_kbps, peak_viewers. stream= for one channel, format=csv for a file. A client sees their own channels |
GET /api/v1/metrics/peaks | streamer | Today's peak viewers, overall and per stream |
GET /api/v1/live | streamer | A live feed (Server-Sent Events): a heartbeat every 5 s and each event as it happens |
GET /api/v1/server | streamer | Ports, addresses and limits in force |
GET /metrics | operator | Prometheus metrics |
UDP inputs
| Method and path | Role | |
|---|---|---|
GET /api/v1/udp/inputs | operator | Inputs with packet counts and loss |
POST /api/v1/udp/inputs | operator | {"name":"sat-feed","listen":":5001","allow":["192.168.1.20"]} or {"name":"…","multicast":"239.1.1.1:5000","interface":"eth1"}. RTP inputs ("rtp":true) may take a second path, "path2" and "interface2": the status then has paths (each path's packets, missing, last_packet) and merged |
PATCH /api/v1/udp/inputs/{name} | operator | Change an input: any of listen, multicast, interface, rtp, path2, interface2, allow, timeout_seconds (a field left out keeps its value; listen replaces multicast and the other way round). Its socket opens again and its stream starts again with the next packets; settings that can't open (a port in use) leave it as it was (400 with the reason). Inputs from the configuration file: 409. Saved |
DELETE /api/v1/udp/inputs/{name} | operator | Remove an input |
GET /api/v1/udp/inputs/{name}/tr101290 | operator | The full TR 101 290 report of what an input receives; the list's tr101290 field carries the counts |
Pull inputs
Streams Unda fetches from elsewhere (guide). The address is never returned: url in answers is its shortened form. A channel's own pull ({channel}.pull, set under channel inputs) is listed here too, with channel and guarded (fetched through the public-only guard).
| Method and path | Role | |
|---|---|---|
GET /api/v1/pull/inputs | operator | Inputs with their state (live, reconnecting, connecting, retrying, unsupported, blocked, not_licensed, paused), the reason in plain words, the last error, reconnects and what is converted |
POST /api/v1/pull/inputs | operator | {"name":"news","url":"https://example.com/live/index.m3u8"}; optional transcode_video, rtsp_transport (tcp/udp), user_agent, timeout_seconds (2-600, default 10), paused |
PATCH /api/v1/pull/inputs/{name} | operator | Change any of those, e.g. {"paused":true}; a new url restarts the input |
DELETE /api/v1/pull/inputs/{name} | operator | Remove an input (its stream ends) |
Multi-channel (MPTS)
| Method and path | Role | |
|---|---|---|
GET /api/v1/relays | operator | Relays: each with source (without secrets), input (receiving, since, kbps, sender, stats with lost packets, tr101290, and link/rist/paths for SRT, RIST and two-path RTP), destinations (each url without secrets, state connecting/live/backoff, last_error, kbps, dropped_packets, srt_listen, rist, paths), and error for one that could not start |
POST /api/v1/relays | operator | {"name":"station","source":"udp://239.1.1.1:5000","interface":"eth1","allow":["10.0.0.5"],"destinations":["srt://receiver.example.net:9000?passphrase=…"],"timeout_seconds":5} (1 to 4 destinations: udp://, rtp://, srt:// calling or waiting, rist://). Needs TV outputs in the licence. Saved |
GET /api/v1/relays/{name} | operator | One relay |
PATCH /api/v1/relays/{name} | operator | Change a relay: source (left out or empty keeps the saved one, passphrase included), interface, allow, timeout_seconds, destinations as [{"keep":1},{"url":"udp://10.0.0.9:5000"}] (keep = a current destination by its place in the list, 1 = the first; left out keeps them all). Kept destinations stay connected; a new source, interface or sender list reopens the receiving side only, and one that can't open leaves the relay as it was (400 with the reason). A relay that could not start is tried again with its new settings. Saved |
DELETE /api/v1/relays/{name} | operator | Stop a relay (a destination waiting for its receiver closes its port) and forget it |
GET /api/v1/relays/{name}/tr101290 | operator | The full TR 101 290 report on what a relay receives and passes on, with passed_on: true |
GET /api/v1/mpts/inputs | operator | Bundles being received, with their channels, state, bitrates and TR 101 290 counts. A RIST source has rist: packets, recovered, lost; for Main Profile also profile (main), encrypted, key_bits (the sender's AES key length) and what couldn't be read (wrong_passphrase, unreadable (made-up or damaged packets, not another passphrase), not_encrypted, need_passphrase, not_main_profile, srp, with last_refusal and last_refusal_at). The url shows secret=**** |
GET /api/v1/mpts/inputs/{name}/tr101290 | operator | The full TR 101 290 report of a bundle being received: counts per check, the latest errors, each PID, each table and what the tables say |
GET /api/v1/mpts/inputs/{name}/programs | operator | The channels a bundle carries: number, name, provider, PMT and PCR PIDs, and each track's PID, codec and language |
POST /api/v1/mpts/inputs | operator | {"name":"sat","source":"udp://239.1.1.1:5000","programs":[{"program":101,"stream":"sports-hd"}]}; add "discover_only":true to only list the channels. RIST Main Profile, encrypted: "source":"rist://@:5001?secret=…" |
PATCH /api/v1/mpts/inputs/{name} | operator | Change an input: source (a udp://, rtp://, srt:// or rist:// address; left out or empty keeps the saved one, passphrase included), interface, allow, timeout_seconds, discover_only, on_new_program. The channels it publishes stay; it receives again and they start again with the next packets. Settings that can't open leave it as it was (400 with the reason). Inputs from the configuration file: 409. Saved |
DELETE /api/v1/mpts/inputs/{name} | operator | Stop receiving a bundle (its channels' streams end) |
PUT /api/v1/mpts/inputs/{name}/programs/{program} | operator | Publish one channel of a running bundle: {"stream":"sports-hd"} (optional audio_pid, audio_language, transcode_video); changes only that channel |
DELETE /api/v1/mpts/inputs/{name}/programs/{program} | operator | Stop publishing that channel (the bundle keeps running) |
GET /api/v1/mpts | operator | Bundles being sent, with their channels and TR 101 290 counts. A bundle waiting for its receivers (srt://:port) has srt_listen: addr, receivers (each addr, since, bytes, resent), refused with last_refusal and last_refusal_at |
GET /api/v1/mpts/{name}/tr101290 | operator | The same report for a bundle being sent |
POST /api/v1/mpts | operator | {"name":"bundle","url":"udp://239.2.2.1:6000","total_kbps":12000,"programs":[{"stream":"cam","program":1,"name":"Channel 1","bitrate_kbps":4000}]}; add "no_epg":true to send no now/next for playout channels. A channel's input can't be a bundle channel (400): add the channel |
POST /api/v1/mpts/{name}/programs | operator | Add a channel to a running bundle |
PATCH /api/v1/mpts/{name} | operator | Change a bundle. url (left out or empty keeps the saved one, passphrase included), provider, total_kbps (0 = the channels' sum plus headroom), vbr, offline (black or none) build it again with its channels, PIDs, guide and network tables (every channel off air a few seconds; settings that can't start leave it as it was, 400 with the reason). epg (off, now_next, schedule) and network_tables (network_name, country, time_zone, no_network_tables) change while it runs. Bundles from the configuration file: 400. Saved |
PATCH /api/v1/mpts/{name}/programs/{program} | operator | Change one channel: stream, name, provider, bitrate_kbps, encode (the encoder settings, or null to send it as it is), pmt_pid, video_pid, audio_pid, cue_pid (0 = automatic), ad_cues; a field left out keeps its value. Only that channel restarts; settings that don't fit leave it as it was (400 with the reason). {"epg":false} alone leaves it out of the guide without a restart. Saved |
DELETE /api/v1/mpts/{name}/programs/{program} | operator | Remove a channel from a running bundle |
DELETE /api/v1/mpts/{name} | operator | Stop sending a bundle |
Stream analyser
Needs the udp licence feature (Broadcast). See Stream analyser.
| Method and path | Role | |
|---|---|---|
GET /api/v1/analyses | operator | Analyses, running and finished, newest first: source (without secrets), protocol, state, time left, TR 101 290 counts, MDI |
POST /api/v1/analyses | operator | {"source":"udp://239.1.1.1:5000","interface":"eth1","duration_seconds":3600,"as_output":false}. Sources: udp://, rtp://, srt://, rist://, http(s):// (MPEG-TS). 10 s to 24 h; two at once (409 for a third, or for a port one of the server's inputs uses) |
GET /api/v1/analyses/{id} | operator | The status, the full TR 101 290 report (detail), the rate measured from the PCR (rate), MDI and the minute-by-minute timeline |
POST /api/v1/analyses/{id}/stop | operator | End it now; the report is kept |
POST /api/v1/analyses/{id}/again | operator | Start a finished analysis again with the same settings (its address as given, passphrase included); answers like POST /api/v1/analyses. 400 while it still runs |
DELETE /api/v1/analyses/{id} | operator | Stop it if it runs, and remove its report |
Users and security
| Method and path | Role | |
|---|---|---|
GET /api/v1/users | admin | Users and pending invites |
POST /api/v1/users/invite | admin | {"email":"…","role":"streamer","channel_quota":3} → an invite link |
DELETE /api/v1/pending-invites/{id} | admin | Withdraw an invite |
PATCH /api/v1/users/{id} | admin | Any of role, disabled, channel_quota, name |
POST /api/v1/users/{id}/signout | admin | End that person's sessions |
POST /api/v1/users/{id}/reset-2fa | admin | Remove their two-factor setup |
GET / POST /api/v1/apikeys, DELETE /api/v1/apikeys/{id} | admin | API keys; POST {"name":"grafana","role":"operator"} shows the key once |
GET /api/v1/audit | admin | Audit log |
GET / PUT /api/v1/settings/security | admin | Which roles must use two-factor sign-in |
License and support access
| Method and path | Role | |
|---|---|---|
GET /api/v1/license | operator | State, limits, features, usage |
PUT /api/v1/license | owner | The license file as the request body |
GET / POST / DELETE /api/v1/support-access | owner | Vendor support access: POST {"email":"…","hours":72} |
Legacy stream keys
GET / POST /api/v1/keys and DELETE /api/v1/keys/{key} manage keys from the configuration file's streams.keys, which publish under their own name. Use channels instead; changes here last until the next restart.