Smart HATEOAS APIs

Hello.

It is always useful to navigate in an API as easily as in an HTML file.
Who have ever dreamt of a clever software code able to browse all the relevant data just by browsing an API document ?

Here is how :
– build an API result with links. Your links must be accessed like you would do in a css file (<link rel= »stylesheet » href= »path/to/the/file>)
– trust your MVC framework to remind you which links are associated to your current resource (find in the Request Mapping the relevant links)
– give the user a root resource where you can find a « menu » of your APIs. A simple test can convince you that your APIs links work : use Postman, and try to reach a single resource from the root resource.

You can find an example about how it works with Spring MVC 4.2 . Give it a try to my simple web app https://github.com/libetl/RESTAndSpringBankAccountWebApp. Fork this repo, scaffold it to build your own APIs, make yourself at home.