Backport:  lp:1311227: API Endpoints

Addresses https://bugs.launchpad.net/juju-core/+bug/1311227