FlightInfoEx Handling of Diverted Flights

Hi there,

When I sent the request (https://flightxml.flightaware.com/json/FlightXML2/FlightInfoEx?ident=JBU465-1549175144-airline-0233&howMany=15&offset=0) last Friday, I noticed that a faFlightID will be duplicated if the flight is diverted. This was the response:
{
“FlightInfoExResult”: {
“next_offset”: -1,
“flights”: [
{
“faFlightID”: “JBU465-1549175144-airline-0233”,
“ident”: “JBU465”,
“aircrafttype”: “A321”,
“filed_ete”: “03:19:00”,
“filed_time”: 1549364116,
“filed_departuretime”: 1549364220,
“filed_airspeed_kts”: 448,
“filed_airspeed_mach”: “”,
“filed_altitude”: 340,
“route”: “PATSS5 PATSS NELIE CMK J75 GSO Q75 SLOJO Q103 CYNTA SHFTY4”,
“actualdeparturetime”: 1549364148,
“estimatedarrivaltime”: 1549376859,
“actualarrivaltime”: 1549376859,
“diverted”: “”,
“origin”: “KBOS”,
“destination”: “KPBI”,
“originName”: “Boston Logan Intl”,
“originCity”: “Boston, MA”,
“destinationName”: “Palm Beach Intl”,
“destinationCity”: “West Palm Beach, FL”
},
{
“faFlightID”: “JBU465-1549175144-airline-0233”,
“ident”: “JBU465”,
“aircrafttype”: “A321”,
“filed_ete”: “03:19:00”,
“filed_time”: 1549364116,
“filed_departuretime”: 1549364220,
“filed_airspeed_kts”: 448,
“filed_airspeed_mach”: “”,
“filed_altitude”: 340,
“route”: “PATSS5 PATSS NELIE CMK J75 GSO Q75 SLOJO Q103 CYNTA SHFTY4”,
“actualdeparturetime”: -1,
“estimatedarrivaltime”: -1,
“actualarrivaltime”: -1,
“diverted”: “t”,
“origin”: “KBOS”,
“destination”: “KRSW”,
“originName”: “Boston Logan Intl”,
“originCity”: “Boston, MA”,
“destinationName”: “Southwest Florida Intl”,
“destinationCity”: “Fort Myers, FL”
}
]
}
}

This makes sense. However, when I sent a request to FlightInfoEx using the tail ID (N966JT), I noticed something strange. The version of the flight going to KRSW (with actual departure as -1, and diverted true) shows up twice, and the other one doesn’t show up at all. The first occurrence is the 15th flight listed, and the second occurrence is the 16th flight listed (1st with offset 15). Is this the latest version of the flight, or the old record? Any idea why the same flight is in the response twice? Is this a bug? Might be a corner case, since it was actually between 2 separate requests (offset 0 and 15).

I just want to make sure we’re getting the most up-to-date information on the flight when we request FlightInfoEx and pass in the tail ID as ident.

Please let me know.

Thanks,
Martin

It’s indeed intentional that the same faFlightID is reused when a flight is diverted, however I’m not sure about the other behavior you described.

If you increase the howMany from 15 to something higher so that you can get all of the relevant results in a single request (you may need to call SetMaximumResultSize if you haven’t ever increased it above 15), then you might be able to confirm if it is an issue caused by paging.