How to update contacts in Zimbra using scripts?

I have a Zimbra installation, and I need to programmatically update the contacts in it. It seems that its REST interface only works for adding new contacts, but I need to update existing ones. Is there an open source way, tool or something like that?

+3
source share
4 answers

Ok, I have an answer to my question: you can use the "zmmailbox" command. As a user of the Zimbra system, you can change the contents in the mailbox. Since everything is stored in the Zimbra mailbox, the contacts can be edited. I need 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*]
+2
source

SOAP ZCS, soap.txt( /opt/zimbra/docs ). , . ModifyContactRequest. , AuthRequest. Zimbra : http://www.zimbra.com/forums/developers/

+2

SOAP- Zimbra, , , zimbra.com/forums, - " " (?!) - WSDL; .

-, Java Zimbra, , .

0

Zimbra, SOAP /opt/zimbra/docs. ... - .

Matt

0

Source: https://habr.com/ru/post/1698178/


All Articles