add missing api code