REST (Representational State Transfer) is the dominant web API architecture. Principles include: statelessness (each request contains all needed information), resource-based URLs (/users/123), HTTP methods mapping to operations (GET=read, POST=create, PUT=update, DELETE=delete), and standard status codes (200 OK, 404 Not Found, 500 Error). RESTful APIs return data in JSON or XML format. Best practices: use nouns not verbs in URLs, version your API (/v1/users), implement pagination for lists, use proper HTTP status codes, and document with OpenAPI/Swagger. REST's simplicity and HTTP compatibility made it the web API standard.
💻 Development + 🌐 Web Technologies beginner
REST API
Architectural style for designing networked applications using HTTP methods to perform CRUD operations on resources.
7
views
</> Related Terms
WebSocket
Protocol providing full-duplex, bidirectional communication channels over a single TCP connection.
API (Application Programming Interface)
Set of rules and protocols that allow different software applications to communicate.
FastAPI
A modern, high-performance Python web framework for building APIs with automatic OpenAPI documentation.
GraphQL
Query language for APIs that lets clients request exactly the data they need, developed by Facebook.