HATEOAS
HATEOAS (Hypermedia As The Engine Of Application State) is the principle in Fielding's REST that responses must include links describing the next valid actions, so clients can navigate an application by following links rather than hard-coding URL structures.
How it works
A HATEOAS response returns not just data, but also a set of links (typically named relations such as self, next, edit, cancel) pointing to URLs the client can act on next. The client follows these links instead of constructing URLs itself, which decouples the client from the server's URL structure.
Common formats
- HAL (Hypertext Application Language): JSON+HAL, simple link and embedded resource conventions.
- JSON:API: a fuller specification including relationships, sparse fieldsets, and pagination links.
- Siren, Collection+JSON, Hydra: alternative hypermedia formats with different ergonomics.
Most APIs labelled REST do not implement HATEOAS in this strict sense, which is why some prefer the label "HTTP API". HATEOAS remains in use in domains where long-lived clients benefit from server-driven control, such as some payments and banking APIs.