initial setup of API for AngularJS