Map CRUD to HTTP correctly
Given a Todo resource, choose GET/POST/PUT/PATCH/DELETE routes and matching success status codes (200, 201, 204). Keep routes noun-based.
Full name: Representational State Transfer
Memory aid: Representations transfer State through constrained interactions.
A JSON endpoint is not automatically a fully RESTful design.
Study area: Data & integration · Batch 4
Relevant study for: Azure Data Fundamentals DP-900 · CompTIA Cloud+
Practice with exam flashcards →Legacy & Roots / Knowledge library
architectural style for stateless web apis
REST provides a consistent way to expose and consume resources over the web so clients and servers can evolve independently, scale horizontally, and use standard HTTP features like caching and status codes.
REST was defined by Roy Fielding in his 2000 dissertation as an architectural style, not a protocol. It emerged from lessons learned while designing the early web architecture. Core constraints include client-server, statelessness, cacheability, uniform interface, layered system, and optional code-on-demand. REST became the dominant public API style in the 2010s and remains foundational, though now considered mature/legacy in many stacks.
Work through these exercises in order. Try the task before opening a reference.
Given a Todo resource, choose GET/POST/PUT/PATCH/DELETE routes and matching success status codes (200, 201, 204). Keep routes noun-based.
Design GET /products with pagination, filtering, ETag, and 304 handling. Include sample request/response headers.
Convert endpoints like /createUser and /getUserById into resource-oriented routes. Add proper status codes for validation, not found, and conflicts.
Propose a v1 to v2 migration plan using additive changes, deprecation headers, and compatibility tests.
Define a reusable error response schema (code, message, details, traceId) and map it to 400/401/403/404/409/422/500.