[Hawkular-dev] REST-api and hyperlinks

Heiko W.Rupp hrupp at redhat.com
Mon Nov 9 02:10:00 EST 2015


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. 


More information about the hawkular-dev mailing list