AnsweredAssumed Answered

Delete folder with REST+Javascript

Question asked by luca.de.michele on Nov 21, 2014
Latest reply on Nov 26, 2014 by luca.de.michele
Hi to All!
I'm trying to realize these three steps:

<strong>1) create a user for example "TOM"</strong> (done succesfully as shown here):


$.ajax({
    type : 'POST',
    async : false,
    url : "/alfresco/service/api/people",
    data : JSON.stringify({
        "userName": "TOM",
        "firstName": "testfirst",
        "lastName": "testlast",
        "email": "m1350@t.it",
        "password": "password",
        "disableAccount": false,
        "quota": -1,
        "groups": ""
    }),
    dataType : 'json',
    contentType : 'application/json',
    success : function(response) {
        alert(response);
    },
    error : function(response) {
        alert(response);
    }
});


<strong>2) delete a user, like "TOM"</strong> (done succesfully as shown here):


$.ajax({
    type : 'DELETE',
    async : false,
    url : "/alfresco/service/api/people/TOM",
    dataType : 'json',
    contentType : 'application/json',
    success : function(response) {
        alert(response);
    },
    error : function(response) {
        alert(response);
    }
});


<strong>3) now i would like to delete also the "TOM" directory from repository</strong> (how can I do it??? can someone show it to me???):


(how can I do it??? can someone show it to me???)







thaks!!!

Outcomes