Resources Are Nouns
A REST API exposes resources, the things your system manages such as orders, users, or invoices. Each resource gets a stable identifier, a URL like slash orders slash 42. You act on resources with the standard HTTP methods rather than inventing custom verbs in the path.
Mapping Methods to Actions
- GET reads a resource or a collection.
- POST creates a new resource inside a collection.
- PUT replaces a resource and PATCH updates part of it.
- DELETE removes a resource.
Good and Bad Shapes
Prefer plural collection names and nest only to show ownership, such as slash users slash 7 slash orders. Avoid verbs in paths like slash createOrder; the verb belongs in the HTTP method, not the URL. Keep identifiers stable so clients can bookmark and cache them.
Key idea
Model the API as nouns with stable URLs and let HTTP methods carry the verbs, so the interface stays uniform and predictable.