AnsweredAssumed Answered

can't add person RESTful API

Question asked by khanh on Aug 13, 2012
Latest reply on Aug 14, 2012 by jpotts
i'm trying to create a new user using the REST javascript api.
but whenever I post to it, it always comes back with the logged in user info, and does not create the new user?

I've tried to append the alf_ticket to the url also and still doesn't create the user.
Can someone help?

ticket was generated from:


   function addperson(ticket){

      var url = "/alfresco/service/api/people?alf_ticket="+ticket;
      var userInfo = {userName : "testuser" , password: "testpassword" , firstName : "testfirst", lastName : "testlast", email : "",  disableAccount: false, quote: -1, groups: []};
            type: 'POST',
            url: url,
            data: JSON.stringify(userInfo) ,
            dataType: 'json',
            success: function (response) {
            error: function (response) {

if seems like the post is not going in and it just returning the admin user.