Develop apps for MusicPimp using the JSON API.
Clients may interact with the MusicPimp server using HTTP requests and/or WebSocket connections.
Obtain information using HTTP GET requests, and send JSON-formatted messages either in the body of HTTP POST requests or as WebSocket messages.
To upload files, HTTP POST them as multipart/form-data.
When making requests, indicate the desired response format in the Accept HTTP header. The JSON response formats are versioned, and in order to ensure API compatibility, clients should be explicit about which version of the format they accept. The following formats are currently valid:
Remember this also when opening WebSocket connections; the value in the Accept header of the HTTP request that initiates a WebSocket connection will determine the format of the messages.
Whenever backwards-incompatible changes are made to the JSON response format in future MusicPimp server updates, they will be made under a new version. However, new content (name/value pairs) may be added to an existing format without notice. The examples in this documentation are based on the latest format, application/vnd.musicpimp.v18+json.
Note To force the server to respond with the latest JSON format
regardless of the Accept header, append query parameter
f=json to the request URL.
HTTP Basic authentication is supported and required most of the time. Set your credentials in the Authorization HTTP header of the request.
For example, if your username is
i_love and password
the value of the Authorization header must be
The MusicPimp server responds to requests in either JSON (application/json) or HTML (text/html), depending on what the client has requested.
The responses are gzip-compressed provided that the Accept-Encoding HTTP header
of the request contains
Success and Failure
A successful HTTP status code indicates that the request was processed successfully. The response of a failed request will have an HTTP status code indicating failure.
In addition to the information you get from the status code, failed API requests may contain a JSON response content indicating the reason your request went titsup.