Hi,Rather than going with webservice I would suggest to use the existing webscript found in the package -http://localhost:8080/alfresco/service/index/package/org/alfresco/repository/person
Here below is the CURL command to first create a person ["enabled": true,] check this property which shows account is enabled] and then disabling it- [h4]To create an account:[/h4]
[spillai@laughlin ~]$ curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"userName":testuser1@gmail.com,"firstName":test,"lastName":user1,"email":testuser1@gmail.com,"password":testuser123}' –user admin:admin123 http://192.168.227.1:8080/alfresco/service/api/people
{
"url": "\/alfresco\/service\/api\/person\/testuser1@gmail.com",
"userName": "testuser1@gmail.com",
"enabled": true,
"firstName": "test",
"lastName": "user1",
"jobtitle": null,
"organization": null,
"location": null,
"telephone": null,
"mobile": null,
"email": "testuser1@gmail.com",
"companyaddress1": null,
"companyaddress2": null,
"companyaddress3": null,
"companypostcode": null,
"companytelephone": null,
"companyfax": null,
"companyemail": null,
"skype": null,
"instantmsg": null,
"userStatus": null,
"userStatusTime": null,
"googleusername": null,
"quota": -1,
"sizeCurrent": 0,
"emailFeedDisabled": false,
"persondescription": null
}
[h4]To disable an account:[/h4][spillai@laughlin ~]$ curl -H "Accept: application/json" -H "Content-type: application/json" -X PUT -d '{"disableAccount":true}' –user admin:admin123 http://192.168.227.1:8080/alfresco/service/api/people/testuser1@gmail.com
{
"url": "\/alfresco\/service\/api\/person\/testuser1@gmail.com",
"userName": "testuser1@gmail.com",
"enabled": false, "firstName": "test",
"lastName": "user1",
"jobtitle": null,
"organization": null,
"location": null,
"telephone": null,
"mobile": null,
"email": "testuser1@gmail.com",
"companyaddress1": null,
"companyaddress2": null,
"companyaddress3": null,
"companypostcode": null,
"companytelephone": null,
"companyfax": null,
"companyemail": null,
"skype": null,
"instantmsg": null,
"userStatus": null,
"userStatusTime": null,
"googleusername": null,
"quota": -1,
"sizeCurrent": 0,
"emailFeedDisabled": false,
"persondescription": null
}
Hope so that helps you!!!