added REST api to server