Beginner

REST API Design Principles

Design a resource-oriented REST API from scratch — correct HTTP methods, status codes, and RFC 9457 Problem Details error bodies — instead of the ad hoc verb-shaped endpoints most tutorials default to.

~2.5h
0 / 7 steps
🚀
Intro

Before We Start

Prerequisites: comfort with basic HTTP concepts (methods, headers, status codes); any backend language/framework (examples use Node.js + Express); curl or a REST client like Insomnia/Postman.

Version note: verified against RFC 9110 (HTTP Semantics, June 2022 — the current spec, obsoleting the older RFC 7231), RFC 9457 (Problem Details for HTTP APIs, July 2023 — obsoleting RFC 7807), and the OpenAPI Specification v3.2.0 (released September 2025, the current stable OpenAPI release). OpenAPI 4.0 ("Moonwalk") is still in early design and isn't released — don't target it yet.

REST isn't a protocol or a format — it's a set of constraints for designing APIs around resources (nouns) rather than actions (verbs), where each resource has a URI, a representation (usually JSON), and a small, uniform set of operations (the HTTP methods) that apply consistently across every resource in the system.

In this project you'll build a small task-tracking API — /tasks — and use it as a vehicle to get resource modeling, HTTP method semantics, status codes, and standardized error responses right. By the end you'll have a working API you can extend in the next two projects on versioning and rate limiting.

🔨

Model resources and pick the right HTTP methods

🔨

Status codes and RFC 9457 Problem Details for errors

🔨

Filtering, sorting, and partial responses with query parameters

🔨

Document the API with OpenAPI 3.2

🎯
Secret Mission

Secret Mission: nested resources and validation errors

🧹
Wrap Up

Before You Go

Pro

Test what you just learned

Self-testing is one of the best ways to retain new skills. Unlock project quizzes to check your understanding.

Log in to unlock