add api to global var