I am trying to use the CS 10.5 REST API to do a simple authentication of a user in Javascript. My code is:
function fAuthenticateUser ( ) {
var xmlhttp = new XMLHttpRequest();
var strPath = "http://ecm-dev/livelink/livelink.exe/api/v1/auth";
xmlhttp.open('POST', strPath, false);
var myBody = 'username=;password=';
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) {
alert('done. use firebug/console to see network response');
}
}
}
// Send the POST request
xmlhttp.setRequestHeader('Content-Type', 'text/xml');
xmlhttp.send(myBody);
alert(xmlhttp.responseText);
}
I am getting back the following error:
500 - Internal server error - There is a problem with the resource you are looking for, and it cannot be displayed.
I get the same error whether I leave the username / password blank (I'm trying to use integrated windows authentication) or put in a valid set of credentials.
Any input on why I'm running in to this error would be much appreciated. Thanks!