API is located on http://ip-of-machine:5252, or whatever port the user chose.
Audio Logger uses HTTP Basic authentication. For anonymous access, no auth header must be sent. For admin access, use user name “admin” and the password specified in config.
GET /ws/slots
Returns a JSON array with the available recording slots - note that the first slot ID is 0, while in the GUI it's 1.
Example output:
{ "ID": 0, "Name": "eldo", "Source": "http://sender.eldoradio.de:8000/128", "Recording": true }
GET /ws/slots/<ID>/name
Returns name of the given slot as a simple string.
GET /ws/slots/<ID>/soure
Returns record source (stream URL or soundcard input name) of the given slot as a simple string.
GET /ws/slots/<ID>/recording
Returns the recording status of the given slot as true/false.
GET /ws/slots/<ID>/silence
Returns the number of seconds that have passed since the signal was last over the silence threshold. Silence threshold must be set in config for this to work.
GET /ws/slots/<ID>/lastmetadata
Returns the number of seconds that have passed since the last metadata update was received from the recorded stream. Only works for stream inputs.
GET /ws/slots/<ID>/currenttitle
Returns the title of the current song in the received stream. Only works for stream inputs.
GET /ws/slots/<ID>/list/<YEAR>/<MONTH>/<DAY>
Returns the list of recordings for the particular slot on the particular date as a JSON array.
GET /ws/slots/<ID>/getfile/<RECORDINGID>
Downloads the audio file for the specified recording,
POST /execute POST /ws/execute
Excutes the command given as the “command” parameter in the POST data.
Available commands are currently:
SLOT <number> START | Start recording on the given slot* |
SLOT <number> STOP | Stop recording on the given slot* |
/execute
was supported as the endpoint. From v1.3.4, /ws/execute
should be used.