Exposing the API over a websocket