Service: zimbraAccount

Command: SyncGal
Namespace: urn:zimbraAccount
Description: Synchronize with the Global Address List
Properties:
Authorization token required true
Admin Authorization token required false

SyncGalRequest

    <SyncGalRequest [token="{previous-token}"] [galAcctId="{gal-sync-account-id}"] [idOnly="(0|1)"]
                       [getCount="{getCount.} (0|1)"] [limit="{limit} (Integer)"] /> ## SyncGalRequest

elements and attributes you can define within a <SyncGalRequest> element:

XPath Required / Optional Description
@token Optional (0 or 1) Type: String
The previous synchronization token if applicable
@galAcctId Optional (0 or 1) Type: String
GAL sync account ID
@idOnly Optional (0 or 1) Type: 0|1
Flag whether only the ID attributes for matching contacts should be returned.
If the request has idOnly set to 1 (true), then the response will contain the id attribute without all the contact fields populated. The sync client then should make a batch request to the server to fetch the contact fields with <GetContactsRequest/>.
Note: idOnly only works when GAL sync account is configured/enabled. If idOnly is specified and GAL sync account is not enabled, idOnly will be ignored.
@getCount Optional (0 or 1) Type: 0|1
Flag whether count of remaining records should be returned in response or not. Note: getCount works only when idOnly is set to true and GAL sync account is configured/enabled.
@limit Optional (0 or 1) Type: Integer
Page size control for SyncGalRequest. The maximum entries that can be returned for every SyncGal Request can be controlled by specifying this limit.

SyncGalResponse

    <SyncGalResponse [more="{more-flag} (0|1)"] [token="{new-token}"]
                        [galDefinitionLastModified="{galDefinitionLastModified}"] [throttled="{throttled-flag} (0|1)"]
                        [fullSyncRecommended="{fullSyncRecommended-flag} (0|1)"] [remain="{remain} (Integer)"]> ## SyncGalResponse
        List of any of: {
            <cn [sf="{contact-sort-field-value}"] [exp="(0|1)"] id="{contact-id}" [l="{contact-folder}"]
                    [f="{contact-flags}"] [t="..."] [tn="{contact-tag-names}"] [md="{contact-change-date} (Long)"]
                    [ms="{modified-seq-id} (Integer)"] [d="{contact-date} (Long)"] [rev="{contact-revision-id} (Integer)"]
                    [fileAsStr="{contact-fileAs}"] [email="{contact-email-1}"] [email2="{contact-email-2}"]
                    [email3="{contact-email-3}"] [type="{contact-type}"] [dlist="..."] [ref="{contact-ref}"]
                    [tooManyMembers="{contact-group-too-many-members} (0|1)"] [isOwner="{isOwner} (0|1)"]
                    [isMember="{isMember} (0|1)"]> ## ContactInfo
                (<meta [section="{metadata-section-key}"]> ## AccountCustomMetadata
                    (<a n="{key}">{value}</a> ## KeyValuePair)*
                  </meta>)*
                (<a [part="{contact-part-id}"] [ct="{contact-content-type}"] [s="{contact-size} (Integer)"]
                        [filename="{contact-content-filename}"] n="{key}" /> ## ContactAttr)*
                (<m type="{contact-group-member-type}" value="{contact-group-member-value}"> ## ContactGroupMember
                    <cn> ... </cn> ## See /cn [ ## ContactInfo] # [inside itself]
                  </m>)*
             </cn>
            <deleted [id="..."] /> ## Id
        }
    </SyncGalResponse>

elements and attributes you can define within a <SyncGalResponse> element:

XPath Required / Optional Description
@more Optional (0 or 1) Type: 0|1
Flags whether there are more results
@token Optional (0 or 1) Type: String
New synchronization token
@galDefinitionLastModified Optional (0 or 1) Type: String
galDefinitionLastModified is the time at which the GAL definition is last modified. This is returned if the sync does not happen using GAL sync account.
@throttled Optional (0 or 1) Type: 0|1
True if the SyncGal request is throttled
@fullSyncRecommended Optional (0 or 1) Type: 0|1
True if the fullSync is recommended
@remain Optional (0 or 1) Type: Integer
count of records still to be returned in paginated response
/cn Optional (0 or 1)
/cn@sf Optional (0 or 1) Type: String
Sort field value
/cn@exp Optional (0 or 1) Type: 0|1
/cn@id Required (only 1) Type: String
Contact ID
/cn@l Optional (0 or 1) Type: String
Folder
/cn@f Optional (0 or 1) Type: String
Flags
/cn@t Optional (0 or 1) Type: String
Tags (deprecated)
/cn@tn Optional (0 or 1) Type: String
Tag names
/cn@md Optional (0 or 1) Type: Long
Change date
/cn@ms Optional (0 or 1) Type: Integer
Modified sequence ID
/cn@d Optional (0 or 1) Type: Long
Contact date
/cn@rev Optional (0 or 1) Type: Integer
Revision ID
/cn@fileAsStr Optional (0 or 1) Type: String
FileAs string for contact
/cn@email Optional (0 or 1) Type: String
Email address 1
/cn@email2 Optional (0 or 1) Type: String
Email address 2
/cn@email3 Optional (0 or 1) Type: String
Email address 3
/cn@type Optional (0 or 1) Type: String
Contact type
Default value is "contact". If is present and set to "group", then the contact is a personal distribution list.
/cn@dlist Optional (0 or 1) Type: String
dlist - retained for backwards compatibility
/cn@ref Optional (0 or 1) Type: String
Reference
/cn@tooManyMembers Optional (0 or 1) Type: 0|1
Flag whether there were too many members.
If the number of members on a GAL group is greater than the specified max, no members are returned and this flag is set to 1 (true) instead.
/cn@isOwner Optional (0 or 1) Type: 0|1
For group entries, flags whether user is the owner of a group (type=group in attrs on a <cn>).
/cn@isMember Optional (0 or 1) Type: 0|1
For group entries, flags whether user is a member of a group (type=group in attrs on a <cn>).
/cn/meta Optional (0 or more) Custom metadata
/cn/meta@section Optional (0 or 1) Type: String
Metadata section key.
Must be no more than 36 characters long and must be in the format of {namespace}:{section-name}. Currently the only valid namespace is "zwc".

Normally present but sometimes an empty element is created to show that custom metadata info is present but there are no sections to report on.
/cn/meta/a Optional (0 or more) Type: {value}
Attributes specified as key value pairs
Description for element text content:Value
/cn/meta/a@n Required (only 1) Type: String
Key
/cn/a Optional (0 or more) Contact attributes
/cn/a@part Optional (0 or 1) Type: String
Part ID.
Can only specify a {contact-part-id} when modifying an existent contact
/cn/a@ct Optional (0 or 1) Type: String
Content type
/cn/a@s Optional (0 or 1) Type: Integer
Size
/cn/a@filename Optional (0 or 1) Type: String
Content filename
/cn/a@n Required (only 1) Type: String
Key
/cn/m Optional (0 or more) Contact group members
/cn/m@type Required (only 1) Type: String
Contact group member type
/cn/m@value Required (only 1) Type: String
Contact group member value
/cn/m/cn Optional (0 or 1) Contact
See /cn for more details.
/deleted Optional (0 or 1)
/deleted@id Optional (0 or 1) Type: String
ID