Table of Contents

Audio Logger REST Interface

General Notes

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.

API Description

Retrieve list of slots

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
}

Retrieve name of slot

GET /ws/slots/<ID>/name

Returns name of the given slot as a simple string.

Retrieve record source of slot

GET /ws/slots/<ID>/soure

Returns record source (stream URL or soundcard input name) of the given slot as a simple string.

Retrieve recording status of slot

GET /ws/slots/<ID>/recording

Returns the recording status of the given slot as true/false.

Get silence duration

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 last metadata update

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 current song title

GET /ws/slots/<ID>/currenttitle

Returns the title of the current song in the received stream. Only works for stream inputs.

List recordings

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.

Retrieve audio file

GET /ws/slots/<ID>/getfile/<RECORDINGID>

Downloads the audio file for the specified recording,

Execute command

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*