APIs Have The Data, Who Shows What Fields Is Another Story
John Oliver, Last Week Tonight, Boeing Failures and Kayak
Posted by Charlie Recksieck
on 2024-04-18
API's
We've written about APIs before. And we've written here about them often. Even if you're not a software developer yourself, we feel it's important for you to know how they allow programmers to do innovative work on the shoulders of previous programmers' foundation work -AND- how APIs and web services securely share data amongst systems.
My definition of APIs: "An API is an interface that software code can use to execute a command or retrieve a set of data."
Two Examples:
1) As a programmer, if I want to convert the sentence "THIS IS IN ALL CAPS" to true sentence case of "This is in all caps" I could have written code to do it. But why write that code when I can import a DLL to my code project and just include the line strProperSentence = ConvertToSentenceCase (strOriginalAllCapsSentence).
2) If I want to look up the winner of the 1995 NBA Championship and I have access to an NBA "web service" then I can have my code call a URL for the NBA webservice and run a command that would be something like refTeam = objectNBAservice.retrieveTeam ("NBA", "1995", "Champion") (I just made up the specifics, that's not a real call).
So much of what apps do is basically receiving data-specific requests and returning groups of data.
We all use those daily. One example would be searching for a list of available flights on certain dates.
Airline Example
Just like the web service for basketball is an API service hosted by the NBA or somebody who has catalogued all of the NBA data, when we request airline availability it's only possible because the airlines have made all of their scheduled flight information available to services like Google, Hotwire, Kayak, etc. It's in the airlines interest to provide this data to various services because it sells their tickets. As such, the airline industry dedicates talented developers and IT professionals to creating great, error-free APIs.
Of all of the fields of info about every flight, the airline has in its database. There are many more specs about each flight that are being tracked internally than get shown on their website. Their web interface, just as their APIs for third-party services like Travelocity, only show a tightly-defined group of specs aka they don't tell you everything about every flight.
Let's get into an interesting case that you might actually find useful the next time you book a flight. And you might learn a little about APIs and API policy by osmosis.
Last Week Tonight and Boeing
Unless you've been under a rock for 4 months, you've heard about the awful problem of Boeing Max jets having their door panel blow off in certain conditions. Boeing's responses really couldn't have been worse. Their stubborn CEO Dave Calhoun finally got let go (albeit with $24 million in his pocket and possibly $45 million more if the stock rebounds, uggh).
John Oliver on the HBO Max show Last Week Tonight did a masterful piece on the whole thing last month. Oliver dissected Boeing’s safety record and corporate culture, highlighting egregious flaws in their aircraft manufacturing. He torched the FAA’s "oversight", conflicts of interest and lax regulation. Despite the usual Last Week Tonight laughs, the segment revealed how profit motives jeopardize passenger safety. You really should watch it if you haven't already:
Another thing I learned from the segment is that Kayak gives the users the ability to select what plane make/model you're looking at when booking.
Kayak Yes, Direct From Airline No
The technical issue this gets to, after almost 700 words, is this: In that Kayak screen capture just above you see that you can filter out airline types you don't want to take. In this case, let's say you don't want the airplane door to suddenly fly off, then you'd uncheck the Boeing options.
At the same time, the same flights when you're looking directly on the airlines sites to book from them do NOT give you the chance to filter by airplane manufacturer or model.
I doubt any of this is nefarious, it's just more like a matter of who coded the page/app. In Kayak's case, that info was made available. The programmers at the airlines could have but they just simply didn't.
Furthermore, those filter options are available on Kayak's website in a browser, but NOT in the Kayak app. Again, it's not nefarious. It's just different teams writing the code, most likely.
The Takeaway
Internal databases are usually rich with just about every conceivably useful detail. Then it's up to the makers of the APIs to decide what data is made available. And further down the line on the website or app developer level, those folks might leave out data options not out of a particular business decision but more likely for complexity, making their job easier, or judgements about performance and speed.
When there's some data you want to see, whether you're a consumer or a software developer, look in multiple places!