[openstack-dev] The Nova API in Kilo and Beyond

Chris Dent chdent at redhat.com
Fri Jun 5 14:34:11 UTC 2015


On Fri, 5 Jun 2015, Sean Dague wrote:

> Thanks for your time,

Thanks for writing that up.

I recognize that microversions exist and are as they are so I don't
want to derail, but my curiosity was piqued:

Riddle me this: If Microversions are kind of like content-negotiation
(and we love content-negotiation) for APIs, why not just use content-
negotiation instead of a header? Instead of:

    X-OpenStack-Nova-API-Version: 2.114

do (media type made up and not suggesting it as canonical):

    Accept: application/openstack-nova-api-2.114+json

or even

    Accept: application/vnd.openstack-nova-api+json; version=2.114

(and similar on the content-type header). There is precedent for
this sort of thing in, for example, the github api.

(I'll not[1] write about "srsly, can we please stop giving Jackson the
Absent so much freaking power".)

[1] whoops
-- 
Chris Dent tw:@anticdent freenode:cdent
https://tank.peermore.com/tanks/cdent



More information about the OpenStack-dev mailing list