added websocket apis