Home » What Is an API? Understanding Application Programming Interfaces

What Is an API? Understanding Application Programming Interfaces

By

–

What Is an API? Understanding Application Programming Interfaces

In the 1940s, British computer scientists Maurice Wilkes and David Wheeler were working on a modular software library for EDSAC, an early computer. The subroutines sat on punched paper tape in a filing cabinet, alongside what the two men called a “library catalog”: notes on each subroutine and how to fit it into a program. Today that catalog would be called an API specification.

An application programming interface connects computers, or pieces of software, to each other. A user interface connects a computer to a person. The document or standard that describes how to build the connection is the API specification, and a system that meets it is said to implement or expose the API. The term can mean either one.

End users are not meant to touch it directly. The audience is the programmer building it into software.

What an API is made of

An API is built from calls, which go by several names: subroutines, methods, requests or endpoints. A program that uses one is said to call it. The main job is concealment. The API shows only what a programmer finds useful and keeps that stable even when the internals change.

Some APIs are written for one pair of systems. Others are shared standards that let many systems work together. Most people now mean web APIs, which link computers over the internet, but APIs also exist for programming languages, libraries, operating systems and hardware. POSIX, for example, defines common operating system APIs so an application written for one conforming system can be compiled for another.

Take a weather sensor with an API. A message sent to it is the API call. The weather report it sends back is the API response. A forecasting app could pull from several such sensors across a region.

Developers often compare building with APIs to snapping together Lego bricks, and joining them is called integration. They also compare an API to a contract between the provider and the developers who depend on it. If the API stays stable, or changes only in predictable ways, developers trust it more and tend to use it more.

How the term evolved

Wilkes and Wheeler’s book, The Preparation of Programs for an Electronic Digital Computer, contains the first published API specification. The phrase itself turns up in print in 1968, in a paper on remote computer graphics presented at an AFIPS conference. C. J. Date brought it into databases in a 1974 paper. By 1990 technologist Carl Malamud defined an API as “a set of services available to a programmer for performing certain tasks.”

Networks changed it again. In the 1990s CORBA, COM and DCOM competed to become the standard way to expose services over the internet. Then in 2000, Roy Fielding’s dissertation at UC Irvine laid out REST and described a “network-based Application Programming Interface.” XML and JSON web APIs saw wide commercial adoption from that year on, and the web API is now the usual meaning of the term.

Developers who publish an API are held to its behavior whether they like it or not. Hyrum’s law says that with enough users, “all observable behaviors of your system will be depended on by somebody.” Studies also show that most applications use only a small part of any given API.

Sources

Get breaking stories first on our Telegram channel.

More stories by

Most read

Electronics & Computing

Cybersecurity

Gadgets & Reviews

Business