Re: Multiple representations of the same resource without content negotiation

hello armin.

>Of course content negotiation can be used to retrieve the different
>representations of the same object. However, how does the user know what
>representations do exist about this object?

ideally, you would expose that RESTfully through link relations, and many
RESTful data formats have ways of exposing "alternate" links to resources
("alternate" is one of the registered link relationships in the IANA link
registry 
http://www.iana.org/assignments/link-relations/link-relations.xml). so if
you GET a resource, links can be exposed in HTTP, allowing clients to
understand the available set of resources.

additionally, there's a "describedby" link relation (defined in POWDER),
and there's "describes" (draft
http://tools.ietf.org/html/draft-wilde-describes-link), which allow to
represent the relationships between described resources and description
resources independent of any specific resource representation. this is
important, because requiring clients to understand a specific format so
that they can decide how to find a format that they support and thus can
request would be a bit counterproductive. so my recommendation would be to
not encode fundamental discoverability issues like this in a specific
format, and instead rely on HTTP and link relations, so that you support a
bigger set of clients.

cheers,

dret.

Received on Monday, 24 September 2012 18:39:29 UTC