[rest-practices] Media types

Bryan Kearney bkearney at redhat.com
Thu Apr 15 12:26:41 UTC 2010


On 04/15/2010 08:21 AM, Eoghan Glynn wrote:
>
>
>  > A single media type to describe all documents returned by the API
>
> Interesting question.
>
> My initial reaction is that the single
> application/vnd.com.redhat.rhevm.api+xml media type may indeed be better
> than a proliferation of more fine-grained types, as really what we're
> trying to capture here is the "application protocol", which could be
> thought of in a holistic sense as applying to the entire API.
>
> Whereas the individual fine-grained type could be inferred from the
> entity-body in any case, from say the schema identified in the root
> xmlns attribute or whatever. So this doesn't need to be necessarily
> specified in the Content-Type header.
>
> A single media type may well be easier to standardize also, if we ever
> need to evolve it out of the vendor-private space.
>

Is media type the preferred model for versioning rather than URL? I 
could also see /v1/xxxx and /v2/xxxx as means of supporting incompatible 
versions.

-- bk




More information about the rest-practices mailing list