set api to var apiObj