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

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
主站蜘蛛池模板: 高雄县| 呼图壁县| 阜康市| 祁门县| 乐昌市| 金乡县| 怀仁县| 庄河市| 噶尔县| 宁陵县| 贵南县| 岐山县| 莱阳市| 阳曲县| 泸水县| 铜鼓县| 大庆市| 舟曲县| 星子县| 元阳县| 乌审旗| 商丘市| 黄龙县| 井冈山市| 黄大仙区| 漳浦县| 巴塘县| 朔州市| 梅河口市| 崇信县| 攀枝花市| 巴东县| 揭阳市| 遵义县| 黄冈市| 南宁市| 汝阳县| 当涂县| 海阳市| 长兴县| 东山县|