Hi!
I am trying to build a basic proof to call the REST web services and use them to show children of a node. First problem I am having is authentication. Seems like the way we are setup, this goes through a linux box:
this.GetAuthToken = function (user, pass) {
return $http({
method: 'POST',
url: 'https://[server]/otdsws/v1/authentication/credentials',
data: { user_name: user, password: pass },
headers: { "Content-Type" : "application/json" }
}).catch(function (err) {
alert("Error: " + err.data);
});
};
And that works as long as the user_name is in [domain]\[account] format.
However, now I want to get the children of nodes. The otdsws does not seem to have calls to access the data, so I went with the content server calls, which are on an IIS box.
this.GetNodeChildren = function (nodeId) {
return $http({
method: 'GET',
url: '[server]/otcs/llisapi.dll/api/v1/nodes/' + nodeId + '/nodes',
headers: { "Content-Type" : "application/json" }
}).catch(function (err) {
alert("Error: " + err.data);
});
};
However, I do not see a place to pass the auth token from the prevous call and continually get a popup for username/password which doesn't accept my username/password. I've also tried theapi/v1/auth on that same server, but continually get a IIS 500 error despite passing username, password, and even domain.
And ideas on how to propoerly authenticate so as to be able to call the nodes api?
Thanks!
Frank