set up RESTful API for app