reworked api requests to better support dynamic requests from angular