Bulk Creation

Andy Kopciuch akopciuch at bddf.ca
Sun Oct 4 03:18:11 CEST 2015


On Wednesday September 30 2015 11:42:12 signaldeveloper at gmail.com wrote:
> Hello,
> 
> We are migrating about users from our exchange to Kolab 3.4. Is there any
> way to mass create email addresses? I know this question has been asked
> before but I would like a script example if possible and a short how-to
> 
> Thanks again guys!!!!
> 

https://docs.kolab.org/architecture-and-design/kolab-wap-api.html

You can pretty much accomplish anything you want using the API available.  The 
kolab command line is a python implementation making use of the API.   The 
documentation has examples for both python and PHP.

I went a different route, writing my own in PHP using the PEAR/Http_Request2 
module.   I found it made for a much easier to understand, and re-useable 
object oriented approach.  You could, in theory though, script things in any 
programming language you choose making calls to the API on your kolab server.

The deployment I was working on had a time constraint, and I wrote this to 
serve my specific needs.   So things like type IDs on the user creation, or 
group creation are hard coded.  This could be made much more generic, and 
extended to all API calls.   I only implemented what I required.

KolabWebService.php - Class implementing parts of the kolab API.

I have attached examples demonstrating the use.



Andy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: KolabWebService.php
Type: application/x-php
Size: 19651 bytes
Desc: not available
URL: <http://lists.kolab.org/pipermail/users/attachments/20151003/776fe8a9/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: addgroup.php
Type: application/x-php
Size: 638 bytes
Desc: not available
URL: <http://lists.kolab.org/pipermail/users/attachments/20151003/776fe8a9/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: adduser.php
Type: application/x-php
Size: 430 bytes
Desc: not available
URL: <http://lists.kolab.org/pipermail/users/attachments/20151003/776fe8a9/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: createAccounts.php
Type: application/x-php
Size: 1524 bytes
Desc: not available
URL: <http://lists.kolab.org/pipermail/users/attachments/20151003/776fe8a9/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logon.php
Type: application/x-php
Size: 374 bytes
Desc: not available
URL: <http://lists.kolab.org/pipermail/users/attachments/20151003/776fe8a9/attachment-0009.bin>


More information about the users mailing list