https://en.wikipedia.org/wiki/HATEOAS
The idea has been around for a while; I personally don't think it is a good idea.
There is even a content type (or two) for it: application/hal+json and application/hal+xml.
https://en.wikipedia.org/wiki/HATEOAS
The idea has been around for a while; I personally don't think it is a good idea.
There is even a content type (or two) for it: application/hal+json and application/hal+xml.
Instead, the relationship between the response document and the URL's target is implicit, probably guessed from the naming of the key or maybe noted in the response document's definition.
The point of HATEOAS is that a client who understands the meaning of certain link relations (aka "rels"), such as ones in the IANA registry [1], can interact with these referred-to resources using the Standard Interface (of GET, POST, PUT, etc).
Only in the section where the article talks about ways to express links in JSON do link relations appear.
[1] https://www.iana.org/assignments/link-relations/link-relatio...
> [...]
> There is even a content type (or two) for it: application/hal+json and application/hal+xml.
Also, the original content-type for REST, including HATEOAS, text/html.