Nouns, HTTP methods for actions, stable identifiers, and no verb in path.
Routes that age
Nouns, not verbs
GET /users/42, notGET /getUser?id=42.HTTP method = action
GET read, POST create, PUT replace, PATCH update, DELETE remove.
Stable identifiers in path
Slugs and IDs, not state (
/users/current-user-with-name-ana).Order matters
Specific routes before generic:
/users/mebefore/users/{id}.Version the contract
/v1/users/42lets you break without breaking clients.