Stream Management API
Stream management APIs are mounted under /v6/api/. Responses follow REST conventions: success returns resource JSON; pagination uses { data, meta }; errors use RFC 7807 application/problem+json.
Default base URL: http://localhost:8180.
Minimal Working Sequence (3 steps)
Section titled “Minimal Working Sequence (3 steps)”- List streams (paginated):
curl 'http://localhost:8180/v6/api/streams?page=1&per_page=20'- Get stream detail:
curl http://localhost:8180/v6/api/streams/live/demo- Stop the stream:
curl -X DELETE http://localhost:8180/v6/api/streams/live/demoURL-encode streamPath when it contains /, e.g. live/demo → live%2Fdemo.
Stream List
Section titled “Stream List”GET /v6/api/streams?page=1&per_page=20| Query | Description | Default |
|---|---|---|
page | Page number (1-based) | 1 |
per_page | Page size | 20 |
Response example:
{ "data": [ { "path": "live/camera01", "state": 1, "subscribers": 5, "start_time_ms": 1742306400000, "plugin_name": "rtmp", "stream_type": "server", "video_track": { "codec": "H264", "width": 1920, "height": 1080, "bps": 312500, "fps": 30 } } ], "meta": { "page": 1, "per_page": 20, "total": 1 }}Stream Detail
Section titled “Stream Detail”GET /v6/api/streams/{streamPath}Stop Stream
Section titled “Stop Stream”DELETE /v6/api/streams/{streamPath}Stops publishing and releases stream resources. Returns 204 No Content on success.
| Case | HTTP | Notes |
|---|---|---|
| Stream not found | 404 | RFC 7807 Problem Detail |
| Empty path | 400 | stream path is required |
Behavior:
- With no subscribers, or without
continue_push_timeout: normal teardown. - With active subscribers and
publish.continue_push_timeoutset: stream may enter waiting reconnect instead of immediate disposal; subscribers may stay connected.
This is stop/dispose, not pause. Engine-level pause/resume has no /v6/api/ endpoint.
Pause / Resume / Kick Subscriber
Section titled “Pause / Resume / Kick Subscriber”Not available on /v6/api/ (gRPC pause_stream / resume_stream also return not implemented):
| Capability | Status |
|---|---|
| Pause stream distribution | ❌ Not implemented |
| Resume stream distribution | ❌ Not implemented |
| Kick subscriber by ID | ❌ Not implemented |
Supported today:
- List subscribers:
GET /v6/api/streams/{streamPath}/subscribers - Stop entire stream:
DELETE /v6/api/streams/{streamPath}
is_paused in stream detail is read-only.
Live room pause/resume (different API):
POST /live/rooms/{room_id}/pausePOST /live/rooms/{room_id}/resumeSee Live plugin.
On-Demand Pull
Section titled “On-Demand Pull”Use a pull proxy:
POST /v6/api/proxies/pullContent-Type: application/json
{ "name": "remote_camera", "pull_url": "rtsp://192.168.1.50:554/stream1", "stream_path": "live/remote_camera", "pull_on_start": true}Push proxies use /v6/api/proxies/push with the same CRUD/lifecycle pattern.
Subscribers
Section titled “Subscribers”GET /v6/api/streams/{streamPath}/subscribers?page=1&per_page=20id is the numeric subscriber ID as a string. Missing stream returns an empty list (total: 0), not an error.
Disconnect
Section titled “Disconnect”Not implemented. No /v6/api/ endpoint to kick a single subscriber; stop the whole stream or wait for the client to disconnect.
Track Snapshots
Section titled “Track Snapshots”GET /v6/api/streams/{streamPath}/tracks/videoGET /v6/api/streams/{streamPath}/tracks/audioStream Aliases
Section titled “Stream Aliases”| Method | Path | Description |
|---|---|---|
| GET | /v6/api/aliases | List aliases |
| PUT | /v6/api/aliases | Create/update (alias, stream_path, auto_remove) |
| DELETE | /v6/api/aliases/{alias} | Remove alias |
Task Tree
Section titled “Task Tree”| Method | Path |
|---|---|
| GET | /v6/api/tasks/tree |
| POST | /v6/api/tasks/{id}/stop |
| POST | /v6/api/tasks/{id}/restart |
System
Section titled “System”| Method | Path |
|---|---|
| GET | /v6/api/system/info |
| GET | /v6/api/system/summary |
| GET | /v6/api/system/health |
Plugins
Section titled “Plugins”GET /v6/api/pluginsAuth Secret
Section titled “Auth Secret”GET /v6/api/streams/secret?stream_path=live/test&type=publish&expire=<hex>&plugin=rtmp