add how to access the API from controller