- Split categories 5-15 into separate files for better organization - Added User, MAG, Enigma, Streams, Channel, Station, Movie, Series, Episode, Server, and Settings APIs - Each category now has its own dedicated documentation file - Total: 111 endpoints fully documented across 15 categories
2.2 KiB
2.2 KiB
Streams API - Live Stream Management
Complete documentation for live TV stream management in the XUI.ONE Admin API.
📋 Overview
Manage live TV streams including creation, editing, encoding control, and deletion.
Available Operations
| Action | Method | Description |
|---|---|---|
create_stream |
POST | Create new live stream |
edit_stream |
POST | Edit stream settings |
delete_stream |
POST | Remove stream |
start_stream |
POST | Start stream encoding |
stop_stream |
POST | Stop stream encoding |
get_stream |
GET | Get stream details |
Quick Examples
Create Stream
curl -X POST "http://your-server.com/cSbuFLhp/?api_key=API_KEY&action=create_stream" \
-d "stream_display_name=CNN HD" \
-d "stream_source=http://source.example.com/stream.m3u8" \
-d "category_id=1" \
-d "stream_icon=http://example.com/icon.png"
Start/Stop Stream
# Start
curl -X POST "http://your-server.com/cSbuFLhp/?api_key=API_KEY&action=start_stream" \
-d "id=456"
# Stop
curl -X POST "http://your-server.com/cSbuFLhp/?api_key=API_KEY&action=stop_stream" \
-d "id=456"
Python Example
class XUIStreamsManager:
def create_stream(self, name, source, category_id=1, icon=None):
data = {
'stream_display_name': name,
'stream_source': source,
'category_id': category_id
}
if icon:
data['stream_icon'] = icon
response = requests.post(
self.base_url,
params={'api_key': self.api_key, 'action': 'create_stream'},
data=data
)
return response.json()
def start_stream(self, stream_id):
response = requests.post(
self.base_url,
params={'api_key': self.api_key, 'action': 'start_stream'},
data={'id': stream_id}
)
return response.json()
Supported Source Formats
- HLS (m3u8)
- RTMP
- HTTP/HTTPS
- UDP/MPEG-TS
- RTSP