Chapter 19: HATEOAS
HATEOAS (Hypermedia as the Engine of Application State) is a concept where the client does not need to know the API structure in advance, since all available actions and state transitions are described directly in the server’s response using links and relations.
In the world of web pages, a typical example is the HTML <a>
tag, which allows linking between HTML documents. Navigation between documents is usually carried out consciously by the user of the website, and in real time.
When consuming a REST API, the situation is different. Communication with the web server is pre-programmed by the developer. During implementation, the developer decides what data will be needed in different situations to complete the workflow. In practice, developers usually rely on REST API documentation to determine how to interact with the various resources on the server.