juju/juju — pull request #26 by jameinel (2014-06-05 11:04:11+00:00)
Title: Expose UUID in API URLs

This updates all of our API URLs to embed the environment UUID. For compatibility they still support the old locations. So we now expose:
https://host:port/log
https://host:port/charms
https://host:port/tools
https://host:port/
as well as the new form
https://host:port/environment/$UUID/log
https://host:port/environment/$UUID/charms
https://host:port/environment/$UUID/tools
https://host:port/environment/$UUID/api

I believe this addresses all of the questions brought up in the previous review:
https://codereview.appspot.com/102920048/

This also changes Login to return the environment UUID, and the client-side code to be able to cache it and pass it back in. It updates the client to default to connecting to host:port/environment/UUID/api but it doesn't change the log,tools,charms requests (because for old servers the former will work for Login, but the latter will break). Eventually we'll want to use the new URLs for log, etc once we have a good way to determine that the server supports it.