What is REST
REST (Representational State Transfer) is an architectural style for building APIs over HTTP. Roy Fielding defined it in his 2000 dissertation as a set of constraints: client-server separation, statelessness, cacheability, uniform interface, and layered system.
How it works
A REST API exposes resources (users, orders, documents) at URLs. Clients use HTTP verbs to operate on them: GET to read, POST to create, PUT to replace, PATCH to update, DELETE to remove. Each request is stateless — it carries everything the server needs (authentication, parameters, body) without relying on server-side session state.
Responses use standard HTTP status codes (200 for success, 404 for not found, 500 for server error) and typically return JSON. The combination of standard HTTP methods, URLs, and status codes makes REST APIs predictable and easy to consume with any HTTP client.
Why it matters
REST is the default API style for public APIs and web applications. Its reliance on HTTP means it works through proxies, load balancers, CDNs, and browsers without special tooling. Caching works out of the box for GET requests. The tradeoff: REST can require multiple round trips for complex data and doesn't support real-time server push.
See How REST Works for the full explanation of resources, verbs, statelessness, and HATEOAS.