I’m getting closer to finishing the app I’m building that uses FlightXML2. Overall, I really like the API, but the alert system is unfortunately light on documentation. It would help me if you could answer the following questions.
- What are all the event_codes that are used by the alerts? I have put together a list, but I’m unsure if it’s correct or complete:
event_code = Enum(
'filed',
'change',
'departure',
'arrival',
'diverted',
'cancelled',
)
This list is a guess based on the alert channel names and the mention of the ‘change’ event_code from a previous forum answer. I’m also unclear on whether ‘cancelled’ is spelt with two L’s or not in both the channel and the event_code.
Below is my guess about what the channels do. Please correct/clarify:
- ‘filed’ : This alert is sent whenever a new flight plan is filed i.e. a flight is first scheduled or the schedule is changed (before departure).
- ‘change’ : This alert is sent whenever the flight plan has changed due to a delay in departing. When this happens, does the filed_departuretime change too? If it does, will I need to keep track of the original filed_departuretime in order to calculate the delay amount?
- ‘departure’ : Alert sent on take-off.
- ‘arrival’ : Alert sent on landing.
- ‘diverted’ : Alert sent when the plane is diverted. If this happens, does the destination of the flight get updated too? Is that information available only in the alert, or is it reflected in future calls to FlightInfoEx?
- ‘cancelled’ : Alert sent when the flight is canceled. Not sure about the spelling (UK/US).
One thing I’ve noticed in testing is that ‘departure’ and ‘arrival’ notifications are very reliable, but I have yet to receive even a single ‘filed’ or ‘change’ notification for any flight I have tracked, even ones that were delayed before take off. Are these not always sent? Knowing about changes to the flight plan or delays is really important to the accuracy of information shown by my app. I was hoping to not have to poll FlightAware and instead rely on alerts telling me about such events. Am I doing something wrong / making a bad assumption about the alert system?
Thanks in advance for your help!