Guided Notes

Building a REST API with Express

Designing resources and endpoints, CRUD operations, validation, consistent error responses, pagination and filtering, and testing with a REST client.

REST in practice

Slide 1 / 5

A REST API exposes resources (patients, appointments, invoices) at URLs and uses HTTP methods for actions:

GET /api/appointments — list GET /api/appointments/:id — one item POST /api/appointments — create PATCH /api/appointments/:id — update some fields PUT /api/appointments/:id — replace DELETE /api/appointments/:id — remove

Use plural nouns, JSON bodies, and the right status codes.

← Express Basics