Names are the contract
A REST URL should describe where a resource lives, not what you are doing to it. The HTTP verb already carries the action, so the path stays a pure noun.
Practical rules
- Use plural nouns for collections, like a path of users or orders.
- Identify a single item by appending its id, like users then a specific id.
- Express hierarchy by nesting, so the orders that belong to a user sit under that user.
- Prefer lowercase with hyphens for multi word names, and avoid verbs in the path.
Why consistency pays off
When every collection is plural and every nested path mirrors ownership, callers can predict an endpoint they have never seen. Mixing singular and plural, or burying verbs in paths, forces readers back to the docs for every call.
Keep nesting shallow. More than two levels deep usually means the deeper resource deserves its own top level path.
Key idea
Good resource names are plural nouns arranged to mirror ownership, letting callers guess URLs correctly.