FlightAware Discussions

Question on the ordering of flights in the FlightInfoEx response


#1

FlightAware Support,

I am using the FlightInfoEx endpoint in the FlightXML2 API, passing in a tail ID. I have a few questions regarding the data in the response.

How are the flights sorted in the response when a tail ID is passed in to the “ident” parameter? On the documentation link I provided above, it says “When a tail number or ident is specified and multiple flights are available, the results will be returned from newest to oldest.” What field is being used for ordering though? My reason for asking this is so we can detect when a given faFlightID (with the “:[0-9]” suffix removed) is deleted.
I was thinking it might be sorted by filed_time, and I think I remember noticing the filed_time matching up with the timestamp embedded in faFlightID in the past. However, I’m seeing flights that don’t have any fields matching to the time in faFlightID. For example, some flights with tail 4X-EHA.
If the sorting of flights is based on a field which the value could change, does the sorting update with the new value, or use the original sorting (based on the original value)?

Please let me know.

Thank you in advance,
Martin


#2

FlightInfoEx sorts results by filed_departuretime in descending (newest to oldest) order. A filed departure time typically does not change and allows ident@filed_departuretime style queries on some FlightXML endpoints in lieu of a faFlightID.

While certain other fields in a FlightInfoEx may resemble segments of the faFlightID this field should not be used for anything more than a unique identifier.