The RESTful API consists of two main concepts: Resource, and Representation.
Resource can be any object associated with data, or identified with a URI (more than one URI can refer to the same resource), and can be operated using HTTP methods. Representation is the way you display the resource.
- Consistency across the entire API
- Stateless existence, i.e. no server-side sessions
- Use of HTTP status codes where appropriate
- Use of URL endpoints with a logical hierarchy
- Versioning in the URL rather than in HTTP headers
- GET for retrieving an object
- POST for creating a new object
- PUT for modifying or replacing an object
- DELETE for removing an object
[% div surf %]
- 理解RESTful架构 - 阮一峰的网络日志
- REST API Documentation Best Practices - Bocoup