hateoas
HATEOAS
What links are actually for
The pitch for hypermedia is usually discovery — a client that explores an API by following links. That client rarely exists, and building for it is
how _links blocks turn into payload nobody reads.
The value that does hold up is narrower and worth the bytes: a link is a statement about state and permission that the client would otherwise have
to infer. A draft book carries a publish
link; a published one does not. A caller who may not delete a book never sees delete. The client renders buttons from the links it got instead of
reimplementing your rules in its own language and drifting from them.
That is the test for adding a link: would the client otherwise have to compute this? Pagination passes — the client would have to know the page
arithmetic. A self link on an object the client just fetched by URL usually does not.