Configuration Management API
Monibuca exposes two configuration HTTP surfaces:
| Prefix | Purpose |
|---|---|
/config/ | Config Framework: schema-driven UI, incremental overrides |
/api/config/ | Runtime config API (UnifiedConfigManager): list/read/write/reload from DB |
Default base URL: http://localhost:8180. The admin config UI uses /config/.
Minimal Working Sequence (3 steps)
Section titled “Minimal Working Sequence (3 steps)”- List registered plugins:
curl http://localhost:8180/config/- Read global config:
curl http://localhost:8180/config/global- Update a plugin (example: mp4):
curl -X PUT http://localhost:8180/config/mp4 \ -H "Content-Type: application/json" \ -d '{ "record_path": "/data/recordings", "expire_days": 30 }'Config Framework (/config/)
Section titled “Config Framework (/config/)”List plugins
Section titled “List plugins”GET /config/Get global configuration
Section titled “Get global configuration”GET /config/globalResponse shape:
{ "code": 0, "message": "success", "data": { "config": { "http": { "listenaddr": ":8180" } }, "sources": {}, "inherited": {} }}Get plugin configuration
Section titled “Get plugin configuration”GET /config/{plugin_name}Example: curl http://localhost:8180/config/mp4
Update global / plugin configuration
Section titled “Update global / plugin configuration”PUT /config/globalPUT /config/{plugin_name}Content-Type: application/json
{ "log": { "level": "debug" } }Partial updates only. Success payload includes requires_restart when a restart is needed.
Schema Query
Section titled “Schema Query”GET /config/schema/{plugin_name}There is no single “all schemas” endpoint; list plugins via GET /config/ then fetch each schema.
Validation
Section titled “Validation”POST /config/validateContent-Type: application/json
{ "plugin": "mp4", "config": { "record_path": "/data/recordings" }}plugin and config belong in the body, not the URL path.
Reset to Defaults
Section titled “Reset to Defaults”POST /config/reset/{plugin_name}Restores schema defaults for the plugin (not a full config.yaml reload).
Debug Endpoints
Section titled “Debug Endpoints”| Method | Path | Description |
|---|---|---|
| GET | /config/debug | Config source overview |
| GET | /config/debug/{plugin} | Per-field sources |
HTML Config Pages
Section titled “HTML Config Pages”| Path | Description |
|---|---|
GET /config/page | Main config UI |
GET /config/page/{plugin} | Plugin page (global for global) |
Runtime Config API (/api/config/)
Section titled “Runtime Config API (/api/config/)”| Method | Path | Description |
|---|---|---|
| GET | /api/config/ | List plugin configs |
| GET | /api/config/{plugin} | Get raw plugin config |
| PUT | /api/config/{plugin} | Update ({ "config": {...}, "persistent": true }) |
| POST | /api/config/{plugin}/reload | Reload one plugin from DB |
| POST | /api/config/reload-all | Reload all |
Writes require admin JWT.
WebSocket Notifications
Section titled “WebSocket Notifications”ws://host:port/config/ws is not implemented yet (server returns 501). Poll GET /config/{plugin} or use the admin UI.
Sensitive Fields
Section titled “Sensitive Fields”Masked in responses when marked sensitive in schema; send plaintext on write for encryption at rest.
/config/ vs /api/config/
Section titled “/config/ vs /api/config/”| Capability | /config/ | /api/config/ |
|---|---|---|
| Schema / HTML | ✅ | ❌ |
| Source tracking | ✅ | ❌ |
| DB persistence API | via UCM | ✅ explicit persistent |
Do not mix prefixes — wrong prefix returns 404.