11-18-2016 02:53 AM
Hi,
How do i create user in alfresco using dotcmis
kindly suggest.
Regards,
Shiv
11-21-2016 01:58 PM
Cesar is correct, the CMIS specification does not provide for user or group management.
The Alfresco API can do what you need. You can write your own web script that leverages either the JavaScript API or the Java API to create users. Or you can leverage the out-of-the-box REST API to create people and assign them to groups.
You should be able to find a lot of examples of people creating users with the Alfresco REST API. Here is one.
11-18-2016 04:37 AM
Hi:
In principle CMIS 1.1 is very useful with id based CRUD on custom types and metadata operations (and more...), but CMIS is an standard with limited specs for DM and does not know about workflows in Alfresco for example. You can query users in CMIS 1.1, update some properties, or set simple ACLs... but I think it is not possible to create users, groups or assign users in groups. For these tasks, use REST API.
This post can help you to see some of the initial limitations of CMIS 1.0 and how to solve them via cmis:item support.
Cool things you can do in Alfresco with cmis:item support | ECM Architect
Regards.
--C.
11-18-2016 06:53 AM
can i use below API for create new user in alfresco
http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.0/atom
11-18-2016 01:52 PM
With CMIS 1.0, it is not possible.
Regards.
--C.
11-18-2016 10:36 PM
Then what is the solution for this..
Regards,
Shivkumar
11-21-2016 01:58 PM
Cesar is correct, the CMIS specification does not provide for user or group management.
The Alfresco API can do what you need. You can write your own web script that leverages either the JavaScript API or the Java API to create users. Or you can leverage the out-of-the-box REST API to create people and assign them to groups.
You should be able to find a lot of examples of people creating users with the Alfresco REST API. Here is one.
11-23-2016 06:16 AM
ok i understand but other than webscript can we use this api in C# and add user to alfresco it it possible
11-23-2016 08:57 AM
I was tried with below code but user not created
any solution please suggest..
var url = "http://127.0.0.1:8080/alfresco/service/api/people";//admin:nove
var userInfo = { userName: "testcreatesuer", password: "testpassword", firstName: "testfirst", lastName: "testlast", email: "testemail@test.com", disableAccount: false, quote: -1, groups: [] };
console.log(JSON.stringify(userInfo));
$.ajax({
headers: {
'Accept': 'application/json',
'Content-Type': 'text/plain'
},
username: 'admin',
password: 'nove',
type: 'POST',
url: url,
data: JSON.stringify(userInfo),
dataType: 'application/json',
success: function (response) {
console.log("success");
},
error: function (response) {
console.log("Error Occured");
}
});
11-23-2016 10:29 AM
You are setting your content-type to "text/plain" when it should be "application/json" because what you are posting is JSON, not plain text.
11-24-2016 03:04 AM
var url = "http://admin:nove@127.0.0.1:8080/alfresco/service/api/people";//admin:nove
var userInfo = { userName: "testcreatesuer123161", password: "testpassword", firstName: "testfirst", lastName: "testlast", email: "testemail@test.com", disableAccount: false, quote: -1, groups: [] };
$.ajax({
headers: {
'Content-Type': 'application/json'
},
type: 'POST',
url: url,
crossDomain: true,
asyn:false,
data: JSON.stringify(userInfo),
dataType: 'jsonp',
success: function (response) {
console.log("success");
},
error: function (response) {
console.log("Error Occured");
}
});
});
i am using jsonp also but still there is error like unexpected token
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.