REST is one of the most commonly misused terms in web development. Let's clear it up with practical examples.
What REST Actually Means
REST (Representational State Transfer) is a set of conventions for designing networked APIs around resources and standard HTTP verbs.
Resources, Not Actions
Good REST APIs name endpoints after resources (nouns), not actions (verbs):
GET /courses # list courses
GET /courses/12 # get one course
POST /courses # create a course
PUT /courses/12 # update a course
DELETE /courses/12 # delete a course
Status Codes Matter
200 OK— successful GET/PUT201 Created— successful POST404 Not Found— resource doesn't exist422 Unprocessable Entity— validation failed
Versioning Your API
Prefixing routes like /api/v1/courses gives you room to evolve the API without breaking existing clients.
A predictable, resource-oriented API is one of the biggest gifts you can give the developers who consume it — including future you.