====== mpd-control — API Reference ====== > **Note:** mpd-control has been superseded by [[products:er-audio|er-audio]]. This page is provided for reference in legacy installations. HTTP REST API served on port **3001**. All endpoints use the **GET** method. Media directory: ''/home/er/media'' ===== Media Files ===== ==== GET /files ==== Returns a JSON tree of all audio files in the media directory (up to 5 levels deep). Supported formats: mp3, wav, flac, ogg, m4a. ===== Playback Control ===== ==== GET /loadfile?file= ==== Loads a single audio file. Does **not** auto-play — call ''/play'' separately. **Parameter:** ^ Name ^ Description ^ | file | Relative path to the audio file within the media directory | ==== GET /play ==== Starts or resumes playback. ==== GET /pause ==== Pauses playback. ==== GET /stop ==== Stops playback. ===== Volume ===== ==== GET /volume ==== Returns the current volume level (no parameters). ==== GET /volume?value=<0-100> ==== Sets the volume to a percentage (0–100). **Parameter:** ^ Name ^ Range ^ Description ^ | value | 0–100 | Volume percentage | ===== Status ===== ==== GET /stats ==== Returns current playback state as JSON. **Response:** { "title": "background-music.mp3", "state": "playing", "volume": "75", "flags": "repeat: off random: off single: on consume: off" } **State values:** ''"playing"'', ''"paused"'', ''"stopped"''