Hi all
Could you help me with login operation?
The "versions" request works fine:
----
https://vcloudhttp.xxx.lan/api/versions
GET /api/versions HTTP/1.1
Host: vcloudhttp.xxx.lan
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7
DNT: 1
Connection: keep-alive
Authorization: Basic dmtlcm5lbDp2a2VybmVs
Cookie: vcloud_session_id=/vtwrKnTKASkBi3dv8Ol2eyGqSksDEE2dW6dwDWFTRg=
HTTP/1.1 200 OK
Date: Thu, 26 Jan 2012 08:53:57 GMT, Thu, 26 Jan 2012 08:53:58 GMT
Content-Type: application/xhtml+xml
Content-Length: 56414
----------------------------------------------------------
But the login request always returns the "401 Unauthorized" error. The user and password belongs to the user with role "System Administrator" ( I can login to the "https://vcloudhttp.xxx.lan/cloud" with these credentials)
----------------------------------------------------------
https://vcloudhttp.xxx.lan/api/sessions
POST /api/sessions HTTP/1.1
Host: vcloudhttp.xxx.lan
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7
DNT: 1
Connection: keep-alive
Authorization: Basic dmtlcm5lbDp2a2VybmVs
Content-Length: 0
Content-Type: text/plain; charset=UTF-8
Cookie: vcloud_session_id=/vtwrKnTKASkBi3dv8Ol2eyGqSksDEE2dW6dwDWFTRg=
Pragma: no-cache
Cache-Control: no-cache
HTTP/1.1 401 Unauthorized
Date: Thu, 26 Jan 2012 08:42:05 GMT
WWW-Authenticate: BASIC realm="vCloud"
Content-Length: 0
----------------------------------------------------------
https://vcloudhttp.xxx.lan/api/v1.0/login
POST /api/v1.0/login HTTP/1.1
Host: vcloudhttp.xxx.lan
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7
DNT: 1
Connection: keep-alive
Content-Length: 0
Content-Type: text/plain; charset=UTF-8
Cookie: vcloud_session_id=SSQQi/odxIJ35XBv0K+k6Fdi1y80u23IF5FcIVrQToo=
Pragma: no-cache, no-cache, no-cache
Cache-Control: no-cache, no-cache, no-cache
Authorization: Basic dmtlcm5lbDp2a2VybmVs
HTTP/1.1 401 Unauthorized
Date: Thu, 26 Jan 2012 09:00:00 GMT
WWW-Authenticate: BASIC realm="vCloud"
Content-Length: 0
----------------------------------------------------------
I tried these requests in FF 9.01 and IE 9.0
Thanks in advance
What user account are you using?
For a system level it needs to be:
"user@system"
for a specific org, it would be
"user@org"
If you are past this, sorry - but this seems to come up a bunch, so I figure I would add it to this post in case someone else has the issue (or it is the issue you are seeing).
What version of vCloud Director are you connecting to?
What user account are you using?
For a system level it needs to be:
"user@system"
for a specific org, it would be
"user@org"
If you are past this, sorry - but this seems to come up a bunch, so I figure I would add it to this post in case someone else has the issue (or it is the issue you are seeing).
Thanks!
I missed the "@system" postfix, now all works fine. I use the vCloud Director 1.5