The API is divided in multiple REST endpoints for controlling and a WebSocket endpoint for events.
The REST API documentation is available as OpenAPI specification: api-spec.yml.
The WebSocket endpoint is available at /events
.
The following events are emitted:
active
: The device has become activeinactive
: The device has become inactivemetadata
: A new track was loaded, the following metadata is available:uri
: Track URIname
: Track nameartist_names
: List of track artist namesalbum_name
: Track album namealbum_cover_url
: Track album cover image URLposition
: Track position in millisecondsduration
: Track duration in milliseconds
will_play
: The player is about to play the specified trackuri
: The track URIplay_origin
: Who started the playback
playing
: The current track is playinguri
: The track URIplay_origin
: Who started the playback
not_playing
: The current track has finished playinguri
: The track URIplay_origin
: Who started the playback
paused
: The current track is pauseduri
: The track URIplay_origin
: Who started the playback
stopped
: The current context is empty, nothing more to playplay_origin
: Who started the playback
seek
: The current track was seeked, the following data is provided:uri
: The track URIposition
: Track position in millisecondsduration
: Track duration in millisecondsplay_origin
: Who started the playback
volume
: The player volume changed, the following data is provided:value
: The volume, ranging from 0 to maxmax
: The max volume value
shuffle_context
: The player shuffling context setting changedvalue
: Whether shuffling context is enabled
repeat_context
: The player repeating context setting changedvalue
: Whether repeating context is enabled
repeat_track
: The player repeating track setting changedvalue
: Whether repeating track is enabled