ajax call REST api finished and improve message passing, not finished