title: Ajax code for calling Cloudify Rest API responds with error "undefined"
body: <p>I am trying to call a REST API post method to Cloudify.</p>
  
  <p>I can run this successfully from commandline. Please see the command.</p>
  
  <pre><code>curl -X POST --header "Tenant: default_tenant" --header "Content-Type: application/json" -u admin:admin -d '{"deployment_id": "OSCreateVM", "workflow_id": "install"}' "http://xxxxxxxxx/api/v3.1/executions?_include=id"
  </code></pre>
  
  <p>However when I create an AJAX REST API call from my html, I am getting an "undefined" error. What went wrong here? Can someone help please?</p>
  
  <pre><code>function ajaxFunction(){
  var parameters= {"deployment_id": "OSCreateVM", "workflow_id": "install"};
   $.ajax({
          type: "POST",
          url: "http://xxxxxxxxx/api/v3.1/executions?_include=id",
          headers: {
          'Tenant': 'default_tenant',
          'Content-Type': 'application/json'
          },
          data: JSON.stringify(parameters),
          crossDomain: true,
          dataType: "json",
          username: "admin",
          password: "admin",
          success: function (responseData, status, jqXHR) {
              alert ("Request for VM Creation is Succcessfully submitted");
           },
          error: function (request, status, error) {
               // error handler
               alert(request.responseText);
           }
        });
  }
  </code></pre>