How to follow REST conventions — Basic
Use nouns for resources, HTTP verbs for actions, and meaningful status codes (200, 201, 204, 400, 404, 500).
Learn: REST is a convention, not a framework feature. Collections use plural nouns; IDs live in the path; verbs express intent via HTTP methods—not via path names like /getUsers.
Supplementary examples
Nested resource path
GET /users/42/pastes # pastes belonging to user 42
POST /users/42/pastes # create paste for user 42Course example
GET /users -> 200 list
POST /users -> 201 created
GET /users/:id -> 200 one | 404
PUT /users/:id -> 200 updated | 404
DELETE /users/:id -> 204 no content | 404
Additional references & examples
- RESTful API design (readthedocs)
Resource naming and HTTP verb conventions (cited in course).
- HTTP status codes (MDN)
When to use 200, 201, 204, 400, 404, 500, and related codes.