generalizing all appmetric api calls into one service call