refactored metrics api response