InboundFlightInfo not returning info for inbound flight


#1

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.


#2

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.


#3

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.


#4

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.


#5

We’re still looking into improving this. We are aware there are issues with the current implementation.


#6

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.


#7

Bump.


#8

This is still on our list of things to do, but it’s a very long list at the moment.


#9

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.


#10

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.)


#11

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?

Thanks


#12

Hi Cliff, can you provide an example of a call that’s not returning the expected result?


#13

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()


Thanks for the response,
Cliff


#14

Just so you have it, this was the result from the SOAP version starting at the InboundFlightInfo call



... result = api.service.InboundFlightInfo('UAL759-1397191340-airline-0088')
>>> print result
(FlightExStruct){
   faFlightID = "UAL759-1397191340-airline-0088"
   ident = "UAL759"
   aircrafttype = "A319"
   filed_ete = "01:54:00"
   filed_time = 1397191340
   filed_departuretime = 1397420820
   filed_airspeed_kts = 440
   filed_airspeed_mach = None
   filed_altitude = 380
   route = "SFO1 SFO RBL BTG HAWKZ3"
   actualdeparturetime = 1397421660
   estimatedarrivaltime = 1397427480
   actualarrivaltime = 1397427480
   diverted = None
   origin = "KSFO"
   destination = "KSEA"
   originName = None
   originCity = None
   destinationName = None
   destinationCity = None
 }


You’ll notice the faFlightID is the same as the one I queried for. This was not the behavior I was expecting (nor auzroz in his case).


#15

A change to InboundFlightInfo was just made today to causing it no longer return the same flight as what was requested.


#16

Thank you for the quick turnaround on this. Does what I’d expect now.