[openstack-dev] [heat] Is it time for a v2 Heat API?

Zane Bitter zbitter at redhat.com
Wed Nov 27 17:02:27 UTC 2013

On 27/11/13 16:27, Steven Hardy wrote:
> I've raised this BP:
> https://blueprints.launchpad.net/heat/+spec/v2api
> And started a WIP wiki page where we can all work on refining what changes
> need to be made:
> https://wiki.openstack.org/wiki/Heat/Blueprints/V2API

The current (v1) API design is based around having the tenant in the URL 
and stack names that are unique per-tenant. So a URL of the form:

     GET /v1/{tenant_id}/stacks/{stack_name}

uniquely identifies a stack (even though it redirects to a longer URL 
including the stack_id).

Your proposal on the wiki page retains this URL but removes the tenant ID:

    GET /v2/stacks/{stack_name}

This now no longer uniquely identifies a stack, and is therefore not ReST.

So if we drop the tenant_id then we should also start addressing stacks 
only by UUID:

     GET v2/stacks/{stack_id}

and do lookups by name using stack list or something. However other 
projects do it.

This seems clearly worse than the API we have, but it would at least be 
consistent with other OpenStack projects. For them this API makes more 
sense, because they don't enforce unique names for things in a tenant 
and probably couldn't start if they wanted to. This was IMHO a mistake, 
and one that Heat avoided, but I accept that it's hard to escape gravity 
on this. I, for one, welcome our new UUID overlords.


More information about the OpenStack-dev mailing list