Skip to content

HTTP API Overview

Monibuca V6 provides APIs through a built-in shared HTTP server. All plugin HTTP endpoints are registered on the same server and differentiated by route prefixes.

The default listening address is :8180, which can be changed via configuration:

http:
listen: ":8180"
cors: true

Monibuca has built-in TLS support. You can configure HTTPS listening under global.http.

FieldTypeDescription
listenaddrtlsstringHTTPS listening address, e.g., ":8443"
certfilestringTLS certificate file path (PEM format), e.g., "/etc/ssl/fullchain.pem"
keyfilestringTLS private key file path (PEM format), e.g., "/etc/ssl/privkey.pem"

For development and testing, leave certfile and keyfile empty — Monibuca will automatically generate a self-signed certificate:

global:
http:
listenaddr: ":8180"
listenaddrtls: ":8443"
# certfile: "" # Leave empty for auto-generated self-signed cert
# keyfile: ""

Your browser will show a certificate warning. Click “Advanced” → “Proceed” to continue.

Use a certificate issued by Let’s Encrypt or another CA:

global:
http:
listenaddr: ":8180"
listenaddrtls: ":8443"
certfile: "/etc/letsencrypt/live/your-domain.com/fullchain.pem"
keyfile: "/etc/letsencrypt/live/your-domain.com/privkey.pem"

Q: Can I enable HTTPS only and disable HTTP?

Yes, leave listenaddr empty:

global:
http:
listenaddr: "" # Disable HTTP
listenaddrtls: ":8443"
certfile: "/etc/ssl/fullchain.pem"
keyfile: "/etc/ssl/privkey.pem"

Q: Do I need to restart after changing HTTPS settings?

Yes. Changes to listenaddrtls and certificate paths require a restart to take effect.

All APIs are organized by functional modules with different route prefixes:

PrefixModuleDescription
/api/V5 compat (legacy envelope)V5CompatSurface
/v6/api/Engine CoreREST streams/aliases/tasks/proxies/system
/zego/api/ZEGO Action API (feature)ZegoCompatSurface
/config/Config frameworkRead/write, schema, HTML pages
/api/config/Runtime configDB persistence and reload

Monibuca V6 exposes two HTTP management surfaces that share the same AppFacade application layer:

SurfacePrefixResponse formatUse case
V5 compat/api/*{ code, message, data } legacy envelopeAdmin UI, scripts and integrations migrated from v5
V6 native/v6/api/*Resource JSON / RFC 7807 Problem DetailNew integrations, RESTful clients
  • URLs unchanged: Integrations migrated from v5 keep using /api/... paths — no URL changes required.
  • Same auth: When global.auth.secret is set, sensitive GETs and all writes on both surfaces require an admin JWT (Authorization: Bearer …); login at /api/auth/login (see Authentication below).
  • Feature gaps: Stop/change subscriber by ID (/api/subscriber/stop/{id}) is only on /api/*; /v6/api/* focuses on REST resources. New capabilities are added to the V6 surface first.

Representative V5 compat paths (full list in repo docs/http-api.md):

CategoryExamples
SystemGET /api/summary, GET /api/sysinfo, GET /api/plugins
StreamsGET /api/stream/list, GET /api/stream/info/{path}, POST /api/stream/stop/{path}
ProxiesGET /api/proxy/pull/list, POST /api/pull-proxy/add, POST /api/pull-proxy/start/{id}
RecordingsGET /api/record/list, DELETE /api/record/delete
ConfigGET /api/config/file, POST /api/config/modify, GET /api/config/get/{name}
TasksGET /api/task/tree, POST /api/task/stop/{id}

ZEGO compat (requires api-compat-zego feature): Action-style API at POST /zego/api/?Action=DescribeStreamList with MD5 signature auth. Implemented actions include DescribeStreamList, DescribeStreamInfo, ForbidRTCStream, DescribeUserNum, and others.

PrefixPluginDescription
/rtmp/RTMPRTMP connection management
/rtsp/RTSPRTSP session management
/flv/HTTP-FLVFLV streaming endpoint
/hls/HLSHLS playlist and segments
/webrtc/WebRTCWHIP/WHEP signaling endpoint
/srt/SRTSRT connection management
/webtransport/WebTransportWebTransport sessions
/gb28181/GB28181Device management and control
PrefixPluginDescription
/mp4/MP4 RecordingRecording control and VOD
/snap/Snapshot ServiceSnapshots and MJPEG
/transcode/api/Audio TranscodingTranscoding task management
/cluster/ClusterCluster status and node management
PrefixService/PluginDescription
/room/Room ServiceRoom management
/room_report/Room ReportingRoom statistics data
/live/Live PluginLive room management
/meeting/api/Meeting PluginMeeting room REST (rooms, reservations, templates, …)

Default base URL: http://localhost:8180

  • GET /api/summary: System summary (V5 compat envelope)
  • GET /api/stream/list: Stream list (V5 compat envelope)
  • GET /v6/api/streams: Paginated stream list (V6 REST)
  • GET /v6/api/system/info: System information
  • GET /api/plugins or GET /v6/api/plugins: Plugin list
  • GET /config/: Registered config plugins
  • PUT /config/{plugin}: Update plugin config (not /config/plugin/...)
  • GET /live/rooms: Live room list
  • POST /live/rooms: Create live room
  • GET /meeting/api/rooms: Meeting room list
  • POST /meeting/api/rooms: Create meeting room
  • GET /customer-service/sessions: Customer service session list
  • GET /gb28181/api/devices: GB28181 device list
  • POST /transcode/api/launch: Launch transcode
  • GET /mp4/list: Recording list
  • GET /snap/api/{streamPath}: Snapshot (preferred; legacy GET /snap/take/{streamPath} also works)
  • POST /webrtc/push/{streamPath}: WHIP publish

This section documents the Meeting plugin HTTP API and is kept in sync with section 14.2 Meeting in the repository root docs/http-api.md. When routes change, update both places so this page and the repo-side doc stay aligned.

Like other plugins, Meeting REST is mounted under {plugin}/api, i.e. /meeting/api. After the engine registers the meeting/api prefix, the handler sees sub-paths such as /rooms, /reservations, etc. (same pattern as gb28181/api, /users/api, …).

PrefixPurposeHandler
/meeting/apiMeeting room RESTMeetingApiHandler
MethodPathDescription
GET/meeting/api/roomsList meeting rooms
POST/meeting/api/roomsCreate room (JSON body: room_id)
GET/meeting/api/rooms/{room_id}Room summary; legacy alias GET /meeting/api/room/{room_id}
DELETE/meeting/api/rooms/{room_id}Delete room
GET/meeting/api/rooms/{room_id}/usersUsers in room
POST/meeting/api/rooms/{room_id}/lockLock room
POST/meeting/api/rooms/{room_id}/unlockUnlock room
POST/meeting/api/control/muteChat mute (JSON: room_id, user_id)
POST/meeting/api/control/unmuteRemove chat mute
POST/meeting/api/control/kickRemove user from room
GET/meeting/api/statsMeeting statistics
GET/meeting/api/featuresRegistered feature metadata
GET/meeting/api/reservationsList reservations
POST/meeting/api/reservationsCreate reservation
GET/meeting/api/templatesList templates
POST/meeting/api/templatesCreate template
PUT/meeting/api/templates/{id}Update template
DELETE/meeting/api/templates/{id}Delete template
GET/meeting/api/recordingsRecording catalog (may be empty until persistence is wired)
GET/meeting/api/recordings/{id}/playPlay URL (404 if not found)
GET/meeting/api/recordings/{id}/downloadDownload
DELETE/meeting/api/recordings/{id}Delete recording

Note: Agenda, transcription, and in-session control are primarily WebSocket (/room/{room_id}?type=meeting). Do not use the legacy /room/meeting/... prefix for Meeting REST. For concepts and signaling, see the Meeting Room plugin page.

  • Content-Type: application/json (for POST/PUT requests)
  • Character encoding: UTF-8
  • URL encoding: URL-encode streamPath when it contains / (e.g. live%2Fdemo)

/api/ (V5 compat) — { "code", "message", "data" } legacy envelope; code: 0 means success. The Admin UI and v5-migrated scripts depend on this shape.

/v6/api/ — success returns resource JSON or { "data", "meta" }; failures use RFC 7807 Problem Detail.

/config/{ code, message, data } envelope.

Status CodeDescription
200Request successful
400Invalid request parameters
401Unauthorized (authentication required)
403Forbidden
404Resource not found
500Internal server error
501Not implemented
503Service unavailable

Monibuca V6 uses JWT for the management plane. Stream publish/play URL auth (secret/expire) is separate — see Auth Secret API below.

global:
auth:
secret: "your-jwt-secret-key"
users:
- username: admin
password: your_secure_password
role: admin

Or set M7S_AUTH_SECRET. Without an explicit secret, an ephemeral JWT secret is used (tokens are not stable across restarts); the admin gate stays enabled.

For local dev only: M7S_ADMIN_DEV_MODE=1.

POST /api/auth/login
Content-Type: application/json
{
"username": "admin",
"password": "password"
}

Response (legacy envelope):

{
"code": 0,
"message": "success",
"data": {
"access_token": "eyJ…",
"refresh_token": "eyJ…",
"expires_in": 86400,
"token_type": "Bearer",
"username": "admin",
"role": "admin"
}
}
POST /api/auth/refresh
Content-Type: application/json
{ "refresh_token": "eyJ…" }
GET /api/auth/userinfo
Authorization: Bearer eyJ…
GET /v6/api/streams
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...

Sensitive GETs on built-in /api/* and all mutations require the admin role (or M7S_ADMIN_DEV_MODE=1).

Generates stream auth signatures (secret + expire):

GET /v6/api/streams/secret?stream_path={streamPath}&type={publish|subscribe}&expire=<hex>&plugin=<pluginName>
  • stream_path: stream path
  • type: publish or subscribe, default publish
  • expire: optional hex Unix timestamp; defaults to now + 30 minutes
  • plugin: optional plugin name; default global

Response example:

{
"secret_type": "publish",
"plugin": "rtmp",
"stream_path": "live/test",
"expire": "6610f4a0",
"secret": "0123456789abcdef0123456789abcdef"
}

CORS is enabled by default, allowing cross-origin access. It can be configured:

http:
cors: true
cors_origins:
- "http://localhost:3000"
- "https://your-domain.com"