Refactor ApiParams