I'm working on a RESTful service and have been focusing on Discoverability, Link relations - 'rel' and microformats. I'm not clear about the values of 'rel' in the context of REST - am I allowed to make use of any custom value, to provide richer semantics or should I only use the default values (which are very constraining)?
I am aware that microformats have indeed extended the values of 'rel', but I am not using any kind of microformat yet.
Any help is appreciated. Thanks.
Link Relations (rel) are one of the two ways that you can convey semantics to a client. The other way is media types.
The best spec to read on Web linking is here https://www.rfc-editor.org/rfc/rfc5988.
The link relation registry is here http://www.iana.org/assignments/link-relations/link-relations.xml.
And for an example of how to use link relations to convey semantics you can look a the Hal media type. It is a generic media type that uses link relations to convey all of its semantic meaning. http://stateless.co/hal_specification.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With