5.1 – Understanding APIs

“Data is the new oil.” “What do you do with my data?” “How can we collect more data?”. Whether it is collected in tables, in objects, in photos or videos or anything else, data is changing the world in big and small ways.

Data is most useful when there is lots of it and when it is shared. The problem is:

  • there is sensitive data (both to you and to many companies strategies)
  • that data is stored differently & accessed by different languages, and so
  • it requires some sort of IT person to jump through hoops to share it

Enter the API

APIs or Application Programming Interfaces are a software “robot” that you create to only share (or take in) the data you allow.

  • “Alright robot, you can share weather data with anyone who asks for it just give them an ID so we know how often they are asking for it.”
  • “Format it like ‘this’ so that it doesn’t matter what language they are using or if they are using tables or objects. All the other cool robots are sharing this way too.”
  • “Also let anyone write to our database in these ok ways, that way we won’t have to get Bob or Alice in IT to keep stopping what they are doing to get it done.”

Examples

A couple of real life examples are:

The Kanye West API, very useful to pull a random quote from the database of stellar Kanye quotes out there:

If you want to pull an up to date weather forecast into your own software or web page, this API “robot” does it for you:

Wait, isn’t that just a database connection?

No. APIs can read and write, but you control that through the API. The more you give wide access to your databases the more they need to know the specific structure of your database (table, object) and the more permissions you need to give, these are possible but not as lightweight and simple as an API.

REST

You’ve probably heard of a REST API, right? Oh, yeah that is just a REpresentational State Transfer API, problem solved except for that makes no sense.

A REST API simply a really easy and agreed upon way to share data by API the reason it is popular is because it works and is designed to minimize problems like giving people a choice on format, using links instead of labels, not pointing to other code that the user can’t see. In short, good customer service for those using it.

How you can use it?

As a builder, think about APIs to solve data-sharing problems in your software or even within your company.

Amazon would still conjure images of a rain forest if it were not for the aggressive API strategy they enacted in the 2000’s. The story told here is great.

Expect this simple technology to become a more and more dominant part of the software world, exciting times.

Leave a Reply

Your email address will not be published. Required fields are marked *