Archived
As the project grew from a lightweight FFmpeg CLI wrapper, architectural issues started to appear which called for a more vertically integrated design. And since Go is unsuitable for FFI and assembly-level video processing, I decided to rewrite it in Rust. Most of the things we used from FFmpeg besides the h264 decoder have been ported to Rust.
1.4 KiB
1.4 KiB
Monitor
DELETE /api/monitor
Auth: admin
Delete monitor.
PUT /api/monitor
Auth: admin
Set monitor json config.
GET /api/monitors
Auth: admin
All monitor json configs.
Account
GET /api/accounts
Auth: admin
Users.
DELETE /api/account?id=x
Auth: admin
Delete account.
PUT /api/account
Create or replace account.
Auth: admin
example request:
{
"id": "7phg3h7v3ayb5g2f",
"username": "name",
"isAdmin": false,
"plainPassword": "pass"
}
GET /api/log/query?levels=error,warning&sources=app,monitors=a,b&time=1234567890111222&limit=2
Auth: admin
Query logs. Time is in Unix micro seconds.
example response:
[
{
"level": "warning",
"time": 0,
"msg": "",
"src": "",
"monitorID": ""
},
{
"level": "warning",
"time": 0,
"msg": "",
"src": "",
"monitorID": ""
}
]
Websockets API
Requires TLS. Authentication is validated before each response.
example: wss://127.0.0.1/api/logs
curl doesn't support wss.
Logs
/api/logs?levels=error,warning&monitors=a,b&sources=app,monitor
Auth: admin
Live log feed.