object userdirectory.create(object/array userDirectory)
This method allows to create new user directories.
This method is only available to Super admin user type.
(object/array)
User directories to create.
The method accepts user directories with the standard user directory properties.
(object)
Returns an object containing the IDs of the created user directories under the userdirectoryids
property. The order of the returned IDs matches the order of the passed user directories.
Create a user directory to authenticate users with StartTLS over LDAP.
Request:
{
"jsonrpc": "2.0",
"method": "userdirectory.create",
"params": {
"name": "LDAP API server #1",
"host": "ldap://local.ldap",
"port": "389",
"base_dn": "ou=Users,dc=example,dc=org",
"bind_dn": "cn=ldap_search,dc=example,dc=org",
"bind_password": "ldapsecretpassword",
"search_attribute": "uid",
"start_tls": "1"
},
"auth": "038e1d7b1735c6a5436ee9eae095879e",
"id": 1
}
Response:
CUserDirectory::create() in ui/include/classes/api/services/CUserDirectory.php.