Step 1 / 13Setup
A client and an API
An API is a contract: it says how one program can ask another program for something. Your mobile app does not read the database. It calls an API, and the API reads the database.
The most common style on the web is REST. You send an HTTP request, and you get a JSON answer.
Good to know
In an interview, an API is a promise. If you keep the contract stable, you can change everything behind it.
“The client never touches the database directly. It only talks to the API contract.”
←→ step·R restart·Space pause