rest service to receive and give data