[rest-practices] Media types

Bryan Kearney bkearney at redhat.com
Thu Apr 15 13:03:55 UTC 2010


On 04/15/2010 08:53 AM, Eoghan Glynn wrote:
>
>
>  > Is media type the preferred model for versioning rather than URL?
>
> Well I guess the answer might be influenced by the choice between a
> single over-arching media type and many fine-grained types. Because if
> the former, then specifying the version in the Content-Type would imply
> the versions of all fine-grained types are rev'd in lock-step. Which may
> potentially be awkward to maintain.
>
>  > I could also see /v1/xxxx and /v2/xxxx as means of supporting
> incompatible versions.
>
> Might this approach lead to a higher likelihood of knowledge of the URI
> structure leaking out to the client side?

It may. I think that this is my one concern around REST as it is today. 
The client tools today make it easy to string up XML over HTTP iff the 
clients know the url structure. The lack of an HATEoAS server or client 
framework makes it much harder to gain adoption (today).

However, having said that, the client may know to only following links 
under /v1. So.. my diatrabe aside.. I think using the high level 
versions would not prohibit a true REST client.

-- bk




More information about the rest-practices mailing list