api url refactoring