Hacker News new | ask | show | jobs
Using HATEOAS with REST APIs (engineering.3ap.ch)
6 points by mnembrini 1881 days ago
1 comments

Self promotion: With my library AgoRapide 2020 the client can choose between HTML or JSON, with HTML giving useful links.

An example with Microsoft's Northwind dataset:

http://arnorthwind.agorapide.com/RQ/dt/Employee/1

gives HTML output with helpful links, in this case related EmployeeTerritories and related Orders.

The same query in JSON

http://arnorthwind.agorapide.com/RQ/dt/Employee/1.json

will show data for the Employee only.

This kind of turns the API into a client application, that is, you do not necessarily need to build a user interface on top of the API, it is actually inbuilt in the API.

The main customer support application in a IoT company that I run is just such an API. The customers themselves of course are offered a real app on top of this API, but not having to maintain a dedicated application for the support department is a huge saving.