Logo

Docs

API

OpenSubsonic 1.16.1 and the juuz extensions

juuz implements the OpenSubsonic API at version 1.16.1. Standard endpoints behave as described in the OpenSubsonic documentation and are not repeated here. This page covers what is specific to juuz.

http://<host>:4533/rest/<endpoint>

Conventions

  • Every endpoint is available as /rest/<endpoint> and /rest/<endpoint>.view, with any HTTP method.
  • Authenticate every call, see Authentication. juuzUploadSong authenticates inside the handler, and getOpenSubsonicExtensions needs no authentication.
  • f=json returns JSON, f=jsonp&callback=<name> returns JSONP and the default is XML.
  • CORS is permissive.
{
  "subsonic-response": {
    "status": "ok",
    "version": "1.16.1",
    "type": "juuz",
    "serverVersion": "0.1.0",
    "openSubsonic": true
  }
}

Errors set status to failed and add error: {code, message}.

OpenSubsonic extensions

getOpenSubsonicExtensions lists what the server supports:

ExtensionVersionNotes
apiKeyAuthentication1API keys
formPost1
songLyrics1
indexBasedQueue1
openMusicMetadata1Exposes ommId on songs, albums and artists
juuzSongUpload1Song upload
juuzJukeboxOutput1Jukebox
juuzJukeboxEvents1Jukebox
juuzLastfm1Only when Last.fm is configured

Not supported

EndpointResult
hlsError: this operation is not supported by the server
getCaptionsError 70, requested item not found
getVideosAlways returns an empty list
getVideoInfoError 70, video not found

Last.fm

juuzLastfmStatus always works and reports configured. The other calls need Last.fm configured.

EndpointParametersResponse
juuzLastfmStatus{"juuzLastfm": {configured, linked, username}}
juuzLastfmAuthUrl{"juuzLastfm": {token, url}}. Open url to allow access
juuzLastfmLinktoken{"juuzLastfm": {linked: true, username}}
juuzLastfmUnlinkRemoves the link

Jukebox

The server plays to a DLNA speaker. jukeboxControl works as in OpenSubsonic and needs the jukebox role or admin.

EndpointParametersDescription
juuzGetJukeboxOutputsLists known devices and the current output. Needs the jukebox role
juuzScanJukeboxOutputsScans the network for devices. Admin only
juuzSetJukeboxOutputid or urlSelects the output device. Admin only
juuzJukeboxEventsServer-sent events stream. Sends a status event on every change

Outputs return {"juuzJukeboxOutputs": {device: [{id, name}], current: {id, name, online}}}.

Library

EndpointParametersDescription
juuzUploadSongSee Song uploadUpload a song, cover or lyrics
juuzDeleteSongid (repeatable)Delete songs. Needs the upload role

juuzDeleteSong removes the file, its .lrc and .txt lyrics and empty folders left behind, then returns an empty response.

Other routes

RouteDescription
GET /share/<id>Public page of a share created with createShare
GET /share/<id>/stream/<song>Streams a song of a public share
GET /jukebox/stream/<id>/<file>Stream the jukebox speaker pulls from

On this page