Refactored REST APIs to allow a summary wrapper or a detail wrapper.