Briefle words · Code & architecture
REST
Also called RESTful API
A common style for web APIs where URLs name things (resources) and standard HTTP methods say what to do with them.
Say it to an AI
Express router for the orders API using RESTful resource naming: plural nouns only, the id as a path parameter (/orders/:id), and the HTTP method as the verb: GET list/show, POST create, PATCH update, DELETE cancel. Nested line items at /orders/:id/items. No action words in URLs.
How an expert would brief the stronger version of “Order routes”.
See it
Try it as a puzzle →The Express router that defines every URL of an online shop's orders API.
Why: A exposes the orders resource at /orders and /orders/:id and uses get, post, patch and delete on the same paths.
Related words
Room 5 · APIs & data
Learn “REST” in a five-minute lesson