One API for the web, iOS and Android
A website, an iOS app and an Android app can all use one backend. They reach it through an API. The server does not care which one is calling.
You place a dinner order in the food delivery app on an iOS phone. A friend opens the same app on an Android phone. A third person uses the delivery site in a laptop browser. All three see the same menu, the same prices and the same order status.
Select each client and compare the two boxes. The request changes with the client, and the reply from the server stays the same.
Every client calls the same URL.
The menu as JSON, a plain text format for data. Every client receives the same reply.
More detail
The two messages as text
The code each client uses
What is different about this client
What REST stands for
REST stands for Representational State Transfer. The server holds the data. When a client asks for it, the server sends a representation of that data, which here is JSON text. What the client does with it is up to the client: a table, a list, a scrolling view in a phone app, or a printout. The server never needs to know.
Some systems are server-rendered. They return finished web pages, with the data mixed into the layout. A phone app cannot use that page directly. Compare what each kind of system returns.
Returns a finished web page. The data is mixed into the layout.
Returns only the data. Each app decides how it looks.
More detail
The two replies
The same data in two forms
All the data a mobile app needs is in the HTML reply, mixed with table widths, CSS class names (labels that control appearance) and a decision about column order. An iOS app cannot use that reply directly. It would have to scrape it, which means reading HTML written for a browser and hoping the layout never changes. The layout changes often.
Why teams build it this way
With one kind of client, browsers only, server-rendered HTML was the fastest correct design. The cost shows up years later, when a second kind of client arrives and there is nothing for it to call. Adding an API later means going into the page-generating code and pulling the business logic (the rules for what the system does) out of the markup. Teams often keep the old design because it still works.
Phone users update their apps when they choose to, and some never do. An additive change adds a field. A breaking change renames or removes one. Choose Breaking and drag the slider to see who fails.
You can now decide whether an API change is safe for old apps.
More detail
Rule for changing an API
If you cannot update the clients, add freely and remove almost never. When you must break something, publish the new version at a new path (/api/v2/menu) and keep the old one running until few users remain on old versions. Another option is to keep the old field next to the new one and stop documenting it.
The adoption curves are illustrations of typical patterns. They do not come from measurements of a specific app.