liveBook · Manning

Internal API

As explained in The Design of Web APIs, Second Edition

An internal API is an application programming interface exposed for use within an organization's systems or network.

An internal API lets applications or developers within an organization use a software interface. For web APIs, this is commonly called a private API. “Internal” describes its consumers, not necessarily its network location: a private API can be exposed on the internet. Even an API built for one team has other consumers, including newcomers and teammates who did not design it. section 1.1.4 section 1.8

Who uses the interface?

SOCNET’s Backend and Friends APIs are private; its Search API serves selected partners, while its Face Detection API comes from a public external provider. These labels distinguish audiences, not how carefully an interface deserves to be designed. section 1.1.4 section 1.3.1

Figure 1.4 The terms internal, external, private, partner, and public API may need to be disambiguated so everyone involved understands each other.
figure

Use the terminology diagram when “internal” could mean either restricted consumers or local-network exposure. section 1.1.4

Design a new internal API—or a change to one—around consumer needs before implementation. A superficial rename may be hidden behind a later partner or public API, but gaps in data, operations, security, or pagination can require disruptive changes to existing private APIs. One option is an external façade built on sound private interfaces; designing every private interface for instant public release is a more demanding alternative. section 1.3.1 section 1.8

Start with the capabilities consumers need, then choose an API type that fits. REST is a standard choice in this context, but streaming, bidirectional communication, internal events, or a backend-for-frontend may call for other options. Reconsider REST when a private API may later serve partners or the public. section 1.8 section 14.8.2

How The Design of Web APIs, Second Edition covers it

How deep it goes
Defines consumers and exposure, then discusses design trade-offs without specifying an internal endpoint or implementation.
Examples
Contrasts SOCNET’s Backend and Friends APIs with a partner Search API and a public Face Detection API.
What you can do after
Practice/perform internal API design around consumer needs while anticipating changes that could affect existing consumers or future external APIs.
How it connects
Relates private APIs to partner APIs, public APIs, API façades, and REST APIs.

Also explained in

Compare how 3 books explain internal API →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Design of Web APIs, Second Edition. The section links point to the parts of the book it draws on.