~/VibeHandbook
$39

Chapter 04 · 02

Endpoints and REST, in plain terms

An endpoint is a single item on the menu. It's just a URL that does one specific thing. For example:

  • https://api.weather.com/forecast — get a forecast
  • https://api.weather.com/cities — list available cities

Same kitchen, different dishes. Each endpoint is one capability.

Most APIs you'll touch follow a loose style called REST. You don't need the academic definition; you need two ideas:

  • The URL names a thing (a "resource") — a user, an order, a forecast.
  • The verb says what you want to do with it. These verbs are HTTP methods, the same ones from how-the-web-works:
    • GET — read something (fetch a forecast). Safe; changes nothing.
    • POST — create something (place an order, sign up a user).
    • PUT / PATCH — update something that already exists.
    • DELETE — remove something.

So GET /orders/42 means "read order number 42," and DELETE /orders/42 means "delete it." Same noun, different verb, completely different effect. When you read API docs or a diff, those two words — the method and the URL — tell you most of what a request does.

Want it offline?

Get the PDF + EPUB + downloadable prompt library + version updates.

$ Get the PDF — $39