On Fri, 2010-04-09 at 21:22 +0100, Eoghan Glynn wrote:
But here's another slightly related point, how about indicating a
more
informative type than "application/xml" via the type attribute, say
something vendor-specific like "application/vnd.com.redhat.rhevm.api+xml" or
even "application/vnd.com.redhat.rhevm.api.VM+xml"?
The reason being that this would make it absolutely explicit we're not just
talking plain ol' XML, but rather an application-specific hypermedia type.
This type may also be explicitly advertized in the Content-Type header of
the response when the link is dereferenced, which kinda makes our
application protocol manifest at the standard HTTP level, as opposed to just
embedding this same info in the entity-body (say in the root namespace of
the XML payload).
What's that they say about great minds thinking alike? I have this on
the TODO list already:
https://fedorahosted.org/rhevm-api/wiki/RestApiTodo
Should we define a versionable media type rather than just using e.g.
application/xml
The ability to bump the version in future if we really need to is what
most appeals to me e.g.
application/vnd.com.redhat.rhevm.api.VM+xml;version=1.1
See p115 in bburke's book
Cheers,
Mark.