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

Resource-based APIs

This category essentially states that each resource represents a specific collection of information regarding an entity or collection of entities of a given type. Resources are organized based on the information that's provided by the domain itself. In general, APIs use the REST style to perform operations that reflect the state of a given resource. From an enterprise perspective, exposed resources based on APIs allow for mirroring key business concepts, rather than silos.

Here, you can see examples where the resource is the user and its representation is related to login and logout actions:

/users/login
/users/logout

The following example shows information such as ratings, titles, and recommendations under a specific user ID. The same idea applies to items from a given order ID:

/users/<id>/ratings/title
/users/<id>/recommendations

/stores/orders/<id>/items
主站蜘蛛池模板: 翼城县| 通城县| 信宜市| 高要市| 陵川县| 桃江县| 石楼县| 丰台区| 鹤岗市| 广饶县| 普安县| 康平县| 休宁县| 泗水县| 蕉岭县| 美姑县| 九龙城区| 南康市| 曲麻莱县| 海伦市| 上饶市| 宁乡县| 察隅县| 南木林县| 启东市| 河西区| 同仁县| 阳春市| 遵义县| 亚东县| 清镇市| 民县| 通州市| 绿春县| 韶山市| 乐亭县| 永州市| 秦皇岛市| 景泰县| 神池县| 伊宁县|