16 Working with Spring Data REST
This chapter covers
- Introducing REST applications
- Creating a Spring Data REST application
- Using ETags for conditional requests
- Limiting the access to repositories, methods, and fields
- Working with REST events
- Using projections and excerpts
Representational state transfer (REST) is a software architectural style for creating web services; it also provides a set of constraints (to be detailed in the next section). The American computer scientist Roy Fielding, who is also one of the authors of the HTTP specification, first defined REST, presenting the REST principles in his PhD dissertation in 2000 (https://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm). Web services following this REST architectural style are called RESTful web services. RESTful web services allow interoperability between the internet and computer systems. Requesting systems can access and manipulate web resources represented as text using a well-known set of stateless operations (GET, POST, PUT, PATCH, DELETE). A stateless operation does not depend on any other prior operation, it must contain all the information needed to be understood by the server.