Refactoring API configuration process