Application programming interface - Core Foundations of APIs
Understand what an API is, why it’s valuable, and how it has evolved.
Summary
Read Summary
Flashcards
Save Flashcards
Quiz
Take Quiz
Quick Practice
What is the general definition of an Application Programming Interface (API)?
1 of 9
Summary
Application Programming Interfaces (APIs): Definition and Core Concepts
Introduction
An Application Programming Interface (API) is one of the most important concepts in software development. At its core, an API is a software interface that enables communication between different software systems or components. Rather than being used directly by people, APIs are designed for programmers to use when building and connecting software applications. Understanding APIs is essential because they form the foundation for how modern software systems work together.
What Is an API?
An API is fundamentally a software interface that connects computers or software programs to each other. Think of it as a messenger system: one software system offers a service, and another software system requests that service through the API.
More formally, an API specification is a document that describes exactly how to build and use an interface. When a computer system actually follows that specification, we say it implements or exposes an API. The term "API" can refer to either the specification itself (the instructions) or the implementation (the actual working system).
APIs vs. User Interfaces
This is an important distinction that students often find confusing: an API is not a user interface. A user interface (UI) connects a computer to a person—it's what you see on your screen and interact with using a mouse or keyboard. An API, by contrast, connects a computer or software program to another computer or software program. APIs are not intended for end users; they are strictly for programmers.
Key Characteristics of APIs
Abstraction and Information Hiding
One of the most important features of a well-designed API is abstraction. An API hides the internal details of a system and exposes only the parts that are useful to programmers. This simplification is crucial because:
Consistency: The API remains the same even when the internal implementation changes
Simplicity: Programmers don't need to understand how everything works internally—they only need to know how to use the exposed interface
Maintainability: Developers can improve or fix the internal system without breaking code that uses the API
Calls and Methods
The parts of an API that a programmer actually uses are called several different things depending on context: calls, subroutines, methods, requests, or endpoints. An API specification defines these calls and explains how to use or implement them. For example, you might call a "getUser" method to retrieve user data, or send a "POST request" to save information.
Purpose and Benefits of APIs
Opening Systems to Communication
The fundamental purpose of an API is to open a software system to interactions from the outside. An API allows two separate software systems to communicate across a boundary using mutually agreed-upon signals. Without APIs, each system would be isolated and unable to share data or functionality.
The Contract Concept
An API represents a contract between a service provider and software developers who rely on it. The provider agrees to maintain the API in a predictable way, and developers agree to use it in the intended manner. This contract is what makes integration possible.
Integration
When you join multiple software components together through their APIs, this process is called integration. Just as building blocks combine to create complex structures, software services and libraries connect through their APIs to compose new, more powerful products.
<extrainfo>
Historical Context
Understanding how APIs evolved can provide useful context, though the specific dates and historical details are less critical for most exam purposes.
Early Development
Starting in the 1990s, as computer networks became increasingly common, the concept of APIs expanded beyond simple library-based interfaces. Remote procedure calls allowed programs on different machines to communicate with each other.
Web APIs and Modern Standards
A major turning point came in 2000 when Roy Fielding's dissertation introduced Representational State Transfer (REST), which described a network-based API distinct from traditional library-based interfaces. Starting around 2000, XML and JSON web APIs saw widespread commercial adoption and became the most common meaning of the term "API" in modern usage.
</extrainfo>
Summary
An API is a software interface that enables communication between programs. It hides unnecessary internal details while exposing useful functions through methods or endpoints. The key insight is that APIs represent a contract allowing different software systems to work together seamlessly—they are the glue that holds modern software systems together. Whether you're building a web application, integrating third-party services, or developing a library for other programmers, understanding and designing good APIs is essential.
Flashcards
What is the general definition of an Application Programming Interface (API)?
A software interface that connects computers or software programs to each other.
What is a document called that describes how to build an Application Programming Interface?
An API specification.
What is the primary difference between a User Interface (UI) and an Application Programming Interface (API)?
A UI connects a computer to a person, while an API connects computers or software to each other.
In terms of communication, what does an API allow two software systems to do?
Communicate across a boundary using mutually agreed‑upon signals.
What is the term for the process of joining software components through their APIs?
Integration.
What metaphorical concept describes the agreement between a service provider and the developers using an API?
A contract.
Which two developments in the 1990s expanded the API concept as networks became common?
Remote procedure calls and web APIs.
What architectural style did Roy Fielding introduce in 2000 that described a network-based API?
Representational State Transfer (REST).
Which two data formats saw widespread commercial adoption in web APIs starting in 2000?
XML
JSON
Quiz
Application programming interface - Core Foundations of APIs Quiz Question 1: What is the primary function of an application programming interface (API)?
- Connect computers or software programs to each other (correct)
- Provide a graphical user interface for end users
- Store data in a central database
- Compile source code into executable binaries
Application programming interface - Core Foundations of APIs Quiz Question 2: Which 2000 dissertation introduced Representational State Transfer (REST) and described a network‑based API distinct from traditional library‑based interfaces?
- Roy Fielding’s dissertation (correct)
- Tim Berners‑Lee’s web standards paper
- James Gosling’s Java language specification
- Vint Cerf’s TCP/IP design document
Application programming interface - Core Foundations of APIs Quiz Question 3: Which development in the 1990s expanded the concept of APIs as computer networks became common?
- Remote procedure calls and web APIs (correct)
- Object‑oriented programming languages
- Artificial intelligence expert systems
- Centralized mainframe computing
What is the primary function of an application programming interface (API)?
1 of 3
Key Concepts
API Fundamentals
Application programming interface
API specification
API implementation
API contract
Web API Technologies
Web API
JSON
XML
Representational State Transfer (REST)
Communication Protocols
Remote procedure call
User interface
Definitions
Application programming interface
A software interface that enables programs to communicate and request services from each other.
API specification
A document that defines the calls, data formats, and usage rules of an API.
API implementation
The actual code and system that expose the defined API to callers.
User interface
The means by which a human interacts with a computer system, distinct from programmatic APIs.
Remote procedure call
A protocol that allows a program to cause a procedure to execute on a different computer as if it were local.
Representational State Transfer (REST)
An architectural style for network‑based APIs that uses standard HTTP methods and stateless interactions.
Web API
An API accessed over the web, typically using HTTP and data formats like JSON or XML.
JSON
A lightweight, text‑based data interchange format commonly used in web APIs.
XML
A markup language for encoding structured data, historically used in many web APIs.
API contract
The formal agreement outlining the responsibilities, inputs, outputs, and behavior expected between an API provider and its consumers.