|
|
|
|
|
by pabe
970 days ago
|
|
You can have both a hypermedia API and a data (JSON) API. Your hypermedia API is a lot more lightweight and flexible as it's tied to your web app. The HTMX authors talk about that topic in their book: https://hypermedia.systems/json-data-apis/ "These two different types of APIs have different strengths and needs, so it makes sense to use both. The hypermedia approach can be used for your web application, allowing you to specialize the API for the “shape” of your application. The Data API approach can be used for other, non-hypermedia clients like mobile, integration partners, etc. Note that by splitting these two APIs apart, you reduce the pressure to constantly change a general Data API to address application needs. Your Data API can focus on remaining stable and reliable, rather than requiring a new version with every added feature." |
|