Reading time 4 min

People all over the world consume data on a daily basis across a variety of networks, geographies, and devices. You’ve probably lost track of how many applications are on your phone or tablet – applications for shopping, ordering food, checking the weather, reading the news, tracking the stock market, and sharing images, videos, and other content with friends and family (and maybe a few strangers).

But how do these applications enable users to consume data across thousands of different devices all around the world, and how does that data get from where it is stored to those devices, wherever users are?

The answer to this question (in most cases) is through an API.

APIs for Dummies: What Is an API?

“API” stands for “application programming interface,” and APIs are the unsung heroes of the modern web. From a technical perspective, an API is a set of programming instructions and standards for accessing a web-based software application or service.

APIs are the unsung heroes of the modern web. #api #apis #webperf #perfmatters Click To Tweet

APIs are constructed by web service providers and give directions on how to interact with their particular service. An API typically describes the service’s available functionality, how it can be used and accessed, and what formats it will accept as an input or output.

APIs at Your Service

Think of an API as a waiter at a restaurant:

An API is like a waiter

At a restaurant, you are handed a menu of items that you can order. You can then add specific instructions about how you want those items prepared.

Once you’ve made your decisions, you give your order to the waiter, saying, “I want the filet mignon, medium-rare, with a side of creamed spinach and a fully-loaded baked potato with no chives.”

The waiter writes down your order and delivers it to the kitchen team, who prepares your meal to your exact specifications.

Once your meal is prepared, the waiter picks it up from the kitchen and serves it to you at your table. You review it to make sure that you have received everything you requested – and then you eat.

The waiter’s role in this scenario closely mirrors the role of an API in the delivery of data on the modern web. Like a waiter, an API:

  1. Receives a set of instructions (a request) from a source (such as an application or engineer)
  2. Takes that request to the database
  3. Fetches the requested data or facilitates a set of actions
  4. Returns a response to the source

Consumer-Facing APIs in Action

I have a widget on my iPhone – and you likely have a similar widget on your phone – that lives on my home screen and always lists the current temperature and weather conditions for my location.

iPhone Weather Widget Example

The widget needs to get that information from the Weather Company, which collects data from millions of endpoints around the globe and stores it in its databases.

To display this information on the widget, my phone sends a request at predetermined intervals to The Weather Company’s API. That request asks for specific information – in this case, the temperature and conditions for a time and a place.

The API then interprets that request, fetches the appropriate information, and delivers a response to my phone with that information, which is then displayed to me so I know whether to grab an umbrella on my way out the door. It is extremely likely that my phone interacts with this API and others multiple times a day – and that yours does as well.

What is an API?

Programmer APIs Put to the Test

While APIs can be as simple as the above example, calling for and delivering information, they can also be used to execute a series of tasks. Let’s use Rigor as an example of a system that takes advantage of a different type of API.

Put simply, Rigor is a web performance and monitoring platform used by businesses to manage the speed and reliability of their digital presence. Many customers use Rigor to monitor their business-critical websites and applications around the clock and to receive alerts when performance problems arise.

When pushing code changes, most businesses need to temporarily take all or part of their application offline. During those time periods, they would not need to be notified that the application is down and/or malfunctioning – they already know.

Thus, these customers leverage RIgor APIs when deploying new code to automatically:

  • Pause or mute monitors and prevent alerts from being sent via Rigor
  • Mark the time and the build number of each deploy in a Rigor graph (as shown below), providing a record for easy attribution of any subsequent performance regressions that may occur to a specific deploy
  • Re-initiate the monitors after the deploy is complete

So while a widget can use an API to request specific information and display it to an end user, another common function is to use an API to handle a series of tasks.

Rigor API Example
An API can be used to automatically mark the time and build number of each deploy.

Conclusion

An API, or application programming interface, is the gateway for interacting with modern web applications. APIs can:

  1. Provide documentation on how to programmatically interact with a web application
  2. Act as intermediaries between two web applications or an application and a developer
  3. Execute a series of predefined functions for interacting with an application, such as:
    • Fetching data
    • Posting data
    • Executing tasks

Rigor offers API monitoring that gives you peace of mind by continuously monitoring all your first and third-party APIs to verify the availability, response time, and data quality of business-critical processes. Reach out now for more information and a free trial of the Rigor platform.

Suggested Blog Posts