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

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
主站蜘蛛池模板: 新安县| 怀远县| 叙永县| 瓦房店市| 安达市| 茶陵县| 徐州市| 安仁县| 苏尼特右旗| 板桥市| 五莲县| 陇南市| 涿州市| 大连市| 玉树县| 尼木县| 昆明市| 塘沽区| 汾西县| 兰溪市| 清新县| 罗定市| 雅江县| 叙永县| 鄱阳县| 平遥县| 淳化县| 深水埗区| 方城县| 紫金县| 白水县| 都匀市| 中卫市| 拉萨市| 天水市| 阳西县| 榆中县| 八宿县| 嘉义市| 宁海县| 康乐县|