Getting synchronized to server with REST API