Api implementation web socket