Add more api test and code