DJs and relays
Use ?server=1 to filter lists. Public reads use a reduced representation without ip and password. Send a panel token with DJ permissions for administrative operations.
HTTP methods GET, POST
Authentication GET is public. Changes require a panel JWT.
List or create DJ sources. Set server, name and source settings. Direct connections use port and password.
HTTP methods GET, PUT, PATCH, DELETE
Authentication GET is public. Changes require a panel JWT.
Read or manage one source. AutoDJ cannot be deleted.
HTTP methods GET, POST
Authentication GET is public. Changes require a panel JWT.
List or create relay sources. Set server, name and stream_url.
HTTP methods GET, PUT, PATCH, DELETE
Authentication GET is public. Changes require a panel JWT.
Read, update, or delete a relay.
HTTP methods POST
Authentication Panel JWT
Toggle the source. Returns the new active flag in result.
HTTP methods POST
Authentication Panel JWT
Toggle the relay. Returns the new active flag in result.
HTTP methods POST
Authentication Panel JWT
Rewind AutoDJ. Returns {"result":"rewind_done"} or HTTP 400 with a reason in result.
HTTP methods POST
Authentication Panel JWT
Schedule a one-time relay
starting at the next minute. Optional timezone is an IANA zone. Returns result: success with Unix seconds in start_ts, or result: error and msg: grid_busy.
HTTP methods POST
Authentication Panel JWT
Send server and a priorities object mapping DJ IDs to integer priorities. Returns result: done and new_priorities.
Source fields
The source object includes id, server, name, cat (auto for AutoDJ, real for an encoder connection, ws for web DJ, server for a relay), active, priority, port, stream_url, dj_buffer_ms (milliseconds), metadata, meta_charset, volume_change, and image. connected, on_air, dt_connect and dt_disconnect describe live connection state. do_recording enables recording and do_recording_hourly splits files by hour.
Recordings
HTTP methods GET
Authentication Public
Array of MP3 file names, newest first.
HTTP methods GET
Authentication Public
Query parameter file is a name from the recordings list
. Returns the audio attachment.
HTTP methods GET
Authentication Panel JWT
Pass file for timing markers. available indicates whether markers exist and events contains at_ms offsets and on_air flags.
HTTP methods DELETE
Authentication Panel JWT
Pass the file name in the file query parameter. Returns an empty body.
HTTP methods POST
Authentication Panel JWT
Send files, an array of file names. Returns an empty body.
GET /api/v2/djs/7/recording_air_timeline/?file=show.mp3
{
"available": true,
"events": [
{
"at_ms": 1200,
"on_air": true
}
],
"recording_type": "raw_input"
}
Buffer and recording values
dj_buffer_ms accepts 0 (no jitter reserve), 1000 (1 second), 3000 (3 seconds), 8000 (8 seconds), 30000 (30 seconds), or 60000 (60 seconds). In the recording example, 7 is the DJ ID and at_ms: 1200 marks the start of on-air playback 1.2 seconds into the raw recording.
volume_change is the percentage adjustment to the incoming source level. Use 0 for no adjustment. meta_charset names the stream metadata encoding and defaults to UTF-8. In priorities, each key is a DJ ID and its integer value is the desired priority for that DJ.