🔌APIs
How software talks to software · 32 terms
API Basics
6What an API is, the addresses it answers on and the calls it makes back to you.
The data a server sends back in a web reply, after the headers. It is what you asked for.
Rules that let one program ask another for data or work. A menu for code.
One address in an API, plus its method, like GET /users/42.
A web address for news. Another app calls it when an event takes place.
An API that another company runs. Your app calls it to use their service.
The guide to an API. It lists each endpoint, what to send and what comes back.
API Architecture Styles
7The main ways to shape a web API, from REST to GraphQL, RPC and SOAP.
A web API where each thing has its own address, and HTTP methods act on it.
A way to ask an API for just the fields you want, in one go.
You call a function in your code, but it runs on a far machine.
An older kind of web API. Every message is strict XML in an envelope.
API Design Practices
10Habits that keep an API easy to use, safe to retry and kind to its servers.
One file that lists each path of a REST API and what it sends back.
One thing a REST API offers, like an order. It has its own address.
An API that keeps no memory between requests. Each one carries all it needs.
What an API sends back when a request fails. It gives a code and a reason.
Plan the API first. Then write the code behind it.
Version numbers on an API, so changes do not break the apps that use it.
Splitting a long list into pages, so an API sends a few at a time.
A cap on how many calls one user can make each minute.
When doing something twice has the same result as doing it once.
A code sent with a webhook that proves who sent it and that nothing changed.
HTTP Clients
6Tools and code libraries for sending a request and reading what comes back.
A tool that sends web requests and reads the replies.
A command that sends a web request. It prints the reply.
A code library for sending web requests. It works in the browser and on the server.
A Python tool for calling web APIs. One line gets a page.
A tool you type in a terminal to call APIs. Its commands are short and its replies are neat.
An app for trying an API. You click to send each request.
API Test Methods
3Ways to check an API works, and to keep it in step with the apps that call it.
Testing an API on its own. You send requests and check the answers.
A fake API that sends back set answers, for building and testing.
Tests that check an API and the apps that call it still agree.