[fix] duplicated api code, merge it