updates to use an instance variable for api path and allow passing in a custom api path