I can not understand the meaning of HATEOAS in the REST API and the advantages of adding / using it.

For example, an API is written for the web and mob. applications. Client applications (web and mob) are sharpened for working with some API resources (under links to them).

Will not they (the web and mobile applications) themselves "walk" on the links in the answers and show the user raw data?

Then why is all this necessary?

The only advantage that I see is if using the public API, I will not have to consult the documentation, because in the answer I will see these links and understand what can be done with them. But again, I will see them first, and then I will lay out the functionality for them. But not my API client will somehow automatically see the links and understand what to do with them and how to display them to the user (if this is something a bit more complicated than CRUD).

  • @VadimBugaiov, I would like to hear practical benefits from people who used Hypermedia in their API. And these examples with self links are in any Google output link on HATEOAS, but they don’t carry any payload. Ps There, in the example, the resource /product/search contradicts the principles of REST: there should be no verbs in the name of the resource. It should be like this: /products?search=... - Ray
  • I think there are not many of them, it's like TDD, everyone heard, but nobody used it))) and about searh, it can be like the noun "search" - Vadim Bugaiov

0