VMware {code} Community
tangrui9105
Contributor
Contributor

What's the administrator credentials for "http://xxx.com/api/v0.9/admin"

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?

0 Kudos
4 Replies
smandar
Contributor
Contributor

Even I am searching for URL and credentials for admin operations..

can anyone give link where this info is available?

0 Kudos
vpopovski
Enthusiast
Enthusiast

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

0 Kudos
sharninder
Enthusiast
Enthusiast

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/...).

0 Kudos
admin
Immortal
Immortal

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.

0 Kudos