[Hawkular-dev] REST-api and hyperlinks

Anton Hughes ah at tradeworks.io
Tue Nov 10 15:03:38 EST 2015


This sounds similar to https://en.wikipedia.org/wiki/HATEOAS

On 9 November 2015 at 08:10, Heiko W.Rupp <hrupp at redhat.com> wrote:

> Hey,
>
> one cool trait of RESTful apis, which we all use every day hundreds of
> times
> is the hyperlinking of data - we click on links in the web browser.
>
> I think that would be pretty good for our apis as well.
> To take alerts as an example (see my other mail)
>
> I can go like GET /triggers/{id} to get a trigger with some data.
> Now to learn about the conditions I need to browse to the docs
> to potentially find out that I can get them at /triggers/{id}/conditions
>
> It would be good if we would add for each resource a "Links" section
> like:
>
> links: [
>   {
>    rel='dampening'
>    href=http://blabla/hawkular/alerts/triggers/{id}/dampening
>   },
>   {
>    rel='conditions'
>    href=http://blabla/hawkular/alerts/triggers/{id}/conditions
>   }
> ]
>
> This way it is relatively easy to follow those for humans, but also
> machines.
> _______________________________________________
> hawkular-dev mailing list
> hawkular-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hawkular-dev
>



-- 
Anton Hughes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hawkular-dev/attachments/20151110/82304081/attachment-0001.html 


More information about the hawkular-dev mailing list