There is a administrator account "admin:password", when I want to use "http://xxx.com/api/v0.9/admin" to list the top-level administrative entities in a vCloud, I run this command:
curl -u admin:password http://xxx.com/api/v0.9/admin
But it returned 403 forbidden. Is anyone know what the right command is?
Even I am searching for URL and credentials for admin operations..
can anyone give link where this info is available?
I believe you should first login, get the cookie and use that cookie with the admin operation
Here is an example:
curl --url https://host/api/v0.9/login -u <username>@<organization>:<password> -k -v
as a result you will see the "Set-Cookie" header:
Set-Cookie: vcloud-token=aaaabbbbccccddddeeeeffff
then you have to pass the cookie in .../admin request:
curl --url https://host/api/v0.9/admin -b vcloud-token=aaaabbbbccccddddeeeeffff -k -v
What if the system administrator and another user have the same username ?
Using the UI, this is possible because admins and org users login to different portals (vcloud/org/...) vs (/vcloud/...).
For authentication you provide user@org:password and since you cannot have multipler users with the same username in the same org, you're fine.