- Hands-On RESTful Web Services with TypeScript 3
- Biharck Muniz Araújo
- 139字
- 2021-07-02 12:19:21
Experience-based APIs
Experience-based APIs represent a different approach to resource-based APIs. Here, the concept is One-Size-Fits-All (OSFA). Basically, the key to experience-based APIs is providing endpoints that are focused on the experience itself, which isn't only the user's experience—it could be the home screen experience.
The following example shows the dashboard-screen operation being directly connected to the Nintendo resource, thus expressing the experience of the screen on Nintendo:
/nintendo/dashboard-screen
This concept came from Netflix and, in general, it is an extension of the proxy pattern, where new proxy endpoints will be designed, developed, and configured to focus on the business requirements of the API consumers.
The following diagram shows how the Experience-based APIs building blocks connect to the external world (web, mobile, and so on) and with downstream systems such as the Legacy API: