call api from flight