Implemented tree api for WebSockets