I have a Zimbra installation and I need to programmaticaly update contacts in it. It seems that its REST interface is only working to add new contacts, but I need to update existing ones. Is there a way, tool or something, open-source, to do that ?
Well, I have an answer to my question : you may use the "zmmailbox" command. Under the Zimbra system user, it is possible to modify content in a mailbox. Since quite everything is stored in the Zimbra mailbox, contacts can be edited. I need now to find a way to use this :
box$ zmmailbox help contact
autoComplete(ac) [opts] {query}
-v/--verbose verbose output
autoCompleteGal(acg) [opts] {query}
-v/--verbose verbose output
createContact(cct) [opts] [attr1 value1 [attr2 value2...]]
-i/--ignore ignore unknown contact attrs
-f/--folder <arg> folder-path-or-id
-T/--tags <arg> list of tag ids/names
deleteContact(dct) {contact-ids}
flagContact(fct) {contact-ids} [0|1*]
getAllContacts(gact) [opts] [attr1 [attr2...]]
-f/--folder <arg> folder-path-or-id
-v/--verbose verbose output
getContacts(gct) [opts] {contact-ids} [attr1 [attr2...]]
-v/--verbose verbose output
modifyContactAttrs(mcta) [opts] {contact-id} [attr1 value1 [attr2 value2...]]
-i/--ignore ignore unknown contact attrs
-r/--replace replace contact (default is to merge)
moveContact(mct) {contact-ids} {dest-folder-path}
tagContact(tct) {contact-ids} {tag-name} [0|1*]
There's actually also a SOAP interface in Zimbra but from what I've been able to tell by reading the forums at zimbra.com/forums, for some reason they "could not" (?!) document it properly, nor generate any WSDL file; thus I've never used it.
Apparently one would have to study the Java source code of Zimbra to see what's available.
If you have a recent install of Zimbra, you should be able to find the SOAP docs in /opt/zimbra/docs. I've not tried to use it yet myself....it's still Greek to me.
Matt
You can send SOAP to ZCS, the details are in soap.txt (located under /opt/zimbra/docs). To modify a contact see ModifyContactRequest. You'll need to authenticate first using AuthRequest. Tons of good Zimbra developer information is here: http://www.zimbra.com/forums/developers/