move APIs into common api module