官术网_书友最值得收藏!

Hypermedia as the engine of application state (HATEOAS)

This constraint states that, based on what a server provides to a REST client, the REST client should be able to discover all available actions and resources. In other words, it states that if a client knows an entry point then from that first endpoint, it should be able to discover other relevant endpoints related to that resource. For example, if a client goes to a resource's listing endpoint, that should include links to resources in that listing. And if there is pagination or limit being applied, it should have links to go to the rest of the items in the listing.

If a client has created a new resource, the new resource's link should be included in response as well which can be used for read, update, and delete operations on that resource by using different HTTP verbs. For operations other than typical CRUD, it will obviously have more URLs, so URLs for those operations should also be in the response, so that all endpoints related to the resource can be discoverable from one entry point.

Due to HATEOAS, an endpoint exposes links to related endpoints. This reduces the need of a thorough API documentation, although not completely, but one does not need to see the API documentation for the links already being exposed.

主站蜘蛛池模板: 鹰潭市| 新安县| 白沙| 洱源县| 会宁县| 屏南县| 东阿县| 雷州市| 色达县| 慈利县| 广南县| 荆州市| 铅山县| 方正县| 莱芜市| 新巴尔虎右旗| 正定县| 桃江县| 广灵县| 嵊泗县| 理塘县| 镇江市| 香格里拉县| 邵阳县| 全椒县| 顺义区| 浏阳市| 定襄县| 永善县| 富锦市| 忻城县| 宽城| 博乐市| 大庆市| 井冈山市| 阳西县| 祁连县| 凌海市| 客服| 大洼县| 通化县|