linking front end to RESTful API