What is an API? (a plain-language explanation for non-techies) - Automation Thingies

What is an API? (a plain-language explanation for non-techies)

As someone who works with any kind of web-based software (e.g. MailChimp, ActiveCampaign, Xero, Google Sheets, etc) it’s likely that you’ve come across the term “API”. What is an API? What does it mean? And why is it necessary?

There are plenty of technical explanations on the web defining API (e.g. from Amazon or from IBM). This is not one of those technical explanations. We’re going to keep this really simple.

Firstly, API = ¬†application programming interface. As you can tell from the name, it’s something that developers need for integration purposes.

Think of an API like a food menu

If you imagine a restaurant (or takeaway, or takeout), you have a customer, a server and a chef in the kitchen.

As a customer, you choose what you want from the menu, the kitchen then prepares your food (which you don’t usually see), and then you’re given your food. This process is exceptionally close to what it’s like to work with an API.

Comparing it to the computer systems equivalent:

  • a developer is the equivalent of a customer who wants to order some food.
    the API is the equivalent of a menu, explaining what you can choose from
    the data you can get from a system is the equivalent to the different ingredients listed for each meal
    the system that you’re talking to is the equivalent of the kitchen.

An API tells a developer what information they can access, and gives them ways to request that data. (Technically speaking, APIs also allow you to ‘push’ data too. That might be the equivalent of giving the kitchen ingredients to cook with in this metaphor).

Why are APIs important?

When you talk to another system, you don’t usually know what’s going on internally. This is similar to a closed kitchen. You know that food is being prepared, but you don’t usually see how. There are many reasons for why you don’t see what’s going on internally a system. The main reasons include protecting intellectual property (i.e. the magic recipe for creating your meal), and providing many layers of security to protect the system and data (i.e. making sure customers only get the food they’ve ordered and paid for).

An API provides a ‘gateway’ to access and provide information, and this gateway is standardised to make it easier for developers to build applications and integrations to a piece of software.

For example, you can only order a burger meal from a burger restaurant. Pizza is not available. However, you can order a whole range of salad items or sauces to go in your burger. An API would be the equivalent of making it easy to order that burger with any number of add-ons.

APIs also make it easy for developers to write code in any programming language when they want to exchange data with a web application. This would be the equivalent of being able to speak in any language (English, French, Chinese, Arabic) to order your burger meal, and still receive the exact meal that you ordered. This gives developers tremendous of flexibility and makes it significantly easier to create integrations.

What about API keys?

To protect information on a system, to ensure that only the right people get access to the right information, there needs to be some kind of authentication. In the same way you need a username and password to log into a system, systems also need permission to talk to each other via APIs. That’s where you might have heard of the term ‘API key’. An API Key is essentially a username and password combined together.

There’s another type of authentication called OAuth. This is a little like a special ‘permission slip’. Using a username and password, you ask the remote system for permission to access its data for a while. The system then gives you a ‘permission slip’ which you can then use to get data (it’s called a token).¬† This form of authentication is considered to be more secure and protected, because it’s access is time-limited.

In closing

Whilst APIs are technical, it represents something incredibly useful and essential in the world of integrations and automations. Simply think of an API like a menu that allows systems to move information around. And you now might understand why we get excited about APIs when we’re helping you to automate something in your company.