I was going to write my own API but found vmware's. I tried to just login and get this:
Fatal error: Uncaught exception 'VMware_VCloud_SDK_Exception' with message 'POST https://vc.usask.ca/api/login failed, return code: 400, error: , request data: ' in /var/www/ccc.usask.ca/lib/VMware/VCloud/ServiceAbstract.php:141 Stack trace: #0 /var/www/ccc.usask.ca/lib/VMware/VCloud/Service.php(108): VMware_VCloud_SDK_Service_Abstract->post('https://vcmanag...', 200) #1 /var/www/ccc.usask.ca/html/login.php(18): VMware_VCloud_SDK_Service->login('vc.usask...', Array, Array) #2 {main} thrown in /var/www/ccc.usask.ca/lib/VMware/VCloud/ServiceAbstract.php on line 141
I thought the login url in 1.5 was /api/sessions but see /api/login in the code....
here is my code:
config.php includes require_once 'VMware/VCloud/Helper.php';
---- code ---
include("/var/www/ccc.usask.ca/lib/config.php");
$username = $_POST['username'] . '@' . $_POST['org'];
$pswd = $_POST['password'];
$auth = array('username'=>$username, 'password'=>$pswd);
$service = VMware_VCloud_SDK_Service::getService();
$service->login($server, $auth, $httpConfig);
---code----