Hi Andrew ,

  I wanted to quickly try the three options you provided. However the url's  
"https://services.enterprisecloud.terremark.com/api/v0.8b-ext2.8"
"https://services.enterprisecloud.terremark.com/api/version" are returning a 404 error.

I talked to the terremark support regarding login failure and They want me to follow the API updates and information at the following link:


http://support.theenterprisecloud.com/kb/default.asp?id=533&Lang=1&SID=


In the above link, I just noticed that today is the date for deprecation for couple of the supported API versions. Guessing that the 404 error might be due to the deprecation...

Rgds
Jai





On Sat, Aug 3, 2013 at 7:47 AM, Andrew Phillips <andrewp@apache.org> wrote:
Just to follow up: according to the vCloud Express (of which jclouds assumes eCloud is a flavour) documentation [1], the structure of the login request is as follows:

POST https://{Terremark URI}/login

As per the output of your Gist (thanks for that!), on of the available Terremark URIs is

https://services.enterprisecloud.terremark.com/api/v0.8b-ext2.8

so the URL at least looks correct. There are two potential differences, though.

1) The documentation mentions sending Content-Length: 0 as a header, which I can't see in the Gist
2) There may have been an issue with the basic auth encoding of the password?

Could you try, using cURL or a similar tool, to make the login request as outlined in the documentation, i.e.

POST https://services.enterprisecloud.terremark.com/api/v0.8b-ext2.8/login
Authorization: Basic {username:password}
Content-Length: 0

and (just to see if it makes any difference)

POST https://services.enterprisecloud.terremark.com/api/v0.8b-ext2.8/login HTTP/1.1
Authorization: Basic {username:password}
Content-Length: 0

and

POST https://services.enterprisecloud.terremark.com/api/v0.8b-ext2.8/login HTTP/1.1
Authorization: Basic {username:password}

If none of these work (even the one as described in Terremark's documentation), I'd suggest raising a support request with Terremark to figure out what the correct login request for your account should be.

Regards

ap

[1] https://community.vcloudexpress.terremark.com/en-us/product_docs/m/vcefiles/1639.aspx