Rest endpoint map refactored to provide more flexibility