[openstack-dev] Specifying Tenant-ID in Openstack REST API URLs and Quatum 2.0 APIs
Steve Baker
sbaker at redhat.com
Mon Nov 12 17:35:20 UTC 2012
On 11/13/2012 04:19 AM, Zane Bitter wrote:
>
> Currently:
> /{tenant_id}/stacks/{name}
> redirects to:
> /{tenant_id}/stacks/{name}/{uuid}
>
> One option would be to change it so that e.g.
> /tenants/{tenant_id}/stacks/{name}
> redirects to:
> /stacks/{uuid}
>
> That does solve one problem - namely that it's nicer to work with
> stacks by name, but client libraries in OpenStack have traditionally
> referenced such things only by ID so it's good to be able to find the
> stack in a single step starting with only the UUID.
>
> However it would mean that "GET /stacks" would either need a query
> parameter to specify the tenant id or it would have to redirect to
> "/tenants/{tenant_id}/stacks". As noted below, it also means we'd miss
> out on being able to look up the endpoint complete with tenant_id from
> the Keystone service catalog.
>
> Thoughts?
Jay makes a good point though. This option is now growing on me.
/stacks?tenant_id={tenant_id}
/stacks/{uuid}
/stacks/{name}?tenant_id={tenant_id}
And yes, clients will have to figure out their tenant_id. Although for
heat they could probably safely add it as a parameter to every request.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20121113/5fb58128/attachment.html>
More information about the OpenStack-dev
mailing list