You should be clear about one thing: the API only defines what the messages from one program to another should look like.

GETis the HTTP method: it tells the server what action we want (here, read data)./users/43/photosis the endpoint or resource path:43is John’s user ID.
POST /photos. To delete a photo: DELETE /photos/81. At its simplest, an API request is a method plus an endpoint; real requests also include authentication tokens, query parameters, and bodies for create/update actions.
Common HTTP methods and when to use them:
The example above follows the REST style. There are other API styles — GraphQL, gRPC, etc. — but the central idea remains: an API is a contract describing structured messages one program sends to another.
Follow one API call end-to-end (what happens after Alan taps John’s profile):
- Alan’s phone builds the request
GET /users/43/photosand sends it over the network. - The request hits a load balancer.
- The load balancer forwards the request to one of the application servers.
- The app server inspects the endpoint and recognizes it as a read request for user 43’s photos.
- The server checks the cache, possibly consults a read-replica of the database, and gathers the photo metadata.
- The server prepares an API response: a JSON list of photos where each item includes metadata (caption, like count) and a CDN URL for the image file.
- The app server sends this response back to Alan’s phone.
- The phone receives the list, fetches the actual image files from the CDN using the provided URLs, and renders John’s profile on screen.

- RESTful API Design
- HTTP — MDN Web Docs
- GraphQL
- gRPC
- Content Delivery Network
- Load Balancing (computing)