I am working with the InboundFlightInfo method and am having some issues. Whenever I make a call using the faFlightID, the results I receive back are for the flight requested, not the inbound flight.
I.E.
I request InboundFlightInfo for SKW5394-1380778238-airline-0384, I SHOULD receive back SKW5394-1380778238-airline-0383, but instead I receive SKW5394-1380778238-airline-0384.
It’s not always possible for us to accurately determine the inbound flight if the airline does not provide us all of the information about the flights, so our heuristics occasionally guess incorrectly for some flights.
I understand that it sometimes doesn’t work right, but to date, I have not received a single response that was of a different flight. That, and the website correctly reflects the inbound flight in the example provided.
I am still having issues with this. Made about 50 different calls for different flights and they continue to return information on the same flight, not the inbound flight.
Any update on when this service will be revamped? The app I am building heavily relies on receiving alerts for the inbound flight of a selected outbound flight.
Can it then be said that we shouldn’t use this service? Or better clarify under which circumstances it works? When I visit the FlightAware site page for a given flight, the inbound flight link tracks back to the correct flight, but the API just doesn’t reflect the same data.
Have you tried this recently? We made some changes to the inbound flight calculation method used by FlightXML (but not our website), which I believe should be more accurate now. (Our website and our official mobile apps will probably be changed over to the new method after we’ve done some more performance testing on it.)
Echoing auzroz’s statement, this API does not appear to be returning the correct data. Via the web UI I can clearly see the inbound result but using the FlightXML2 call results in the API returning the same data as sent
It appears that this has been going on for quite some time. Could you please advise if the API will be fixed or if it is better to just treat the API as unavailable until someone from FlightAware specifically notes it has been fixed?
Sorry for it being fragmented … just pulled it from some different variants. This shows the behavior in both SOAP and REST variants (was hoping it was just one)
#!/usr/bin/python
#############
# soap version
#############
import sys
from suds import null, WebFault
from suds.client import Client
username = 'username'
apiKey = 'magickey'
url = 'http://flightxml.flightaware.com/soap/FlightXML2/wsdl'
api = Client(url, username=username, password=apiKey)
print api
# unexpected result ... just returns the faFlightID passed in, not the inbound flight
result = api.service.InboundFlightInfo('UAL759-1397191340-airline-0088')
print result
#!/usr/bin/python
#############
# rest version
#############
import requests
from requests import Request
from requests.auth import HTTPBasicAuth
API_USER = "username"
API_KEY = "magickey"
def call_flightaware_endpoint(server, path, params):
url = "http://{0}{1}".format(server, path)
r = requests.get(url, params=params, auth=HTTPBasicAuth(API_USER, API_KEY))
print(r.url)
print(r.text)
return r.status_code
################################################
### MAIN
################################################
def main():
# unexpected result ... just returns the faFlightID passed in, not the inbound flight
q_params = {'faFlightID': 'UAL759-1397191340-airline-0088'}
call_flightaware_endpoint("flightxml.flightaware.com","/json/FlightXML2/InboundFlightInfo", q_params)
if __name__ == '__main__':
main()