Service: zimbraMail
Namespace: "urn:zimbraMail"
CreateWaitSet SOAP Command

Create a waitset to listen for changes on one or more accounts
Called once to initialize a WaitSet and to set its "default interest types"

WaitSet: scalable mechanism for listening for changes to one or more accounts

Authorization token required true
Admin Authorization token required false

CreateWaitSetRequest

    <CreateWaitSetRequest defTypes="{default-interests}" [allAccounts="{all-accounts} (0|1)"]> ## CreateWaitSetRequest
        <add>
            (<a [name="{waitset-name}"] [id="{waitset-id}"] [token="{last-known-sync-token}"] [types="{waitset-types}"] /> ## WaitSetAddSpec)*
        </add>
    </CreateWaitSetRequest>

The following table describes elements and attributes you can define within a <CreateWaitSetRequest> element:

XPath Required / Optional Description
@defTypes Required (only 1) Type:String
Default interest types: comma-separated list. Currently:
f folders
m messages
c contacts
a appointments
t tasks
d documents
all all types (equiv to "f,m,c,a,t,d")
@allAccounts Optional (0 or 1) Type:0|1
If {all-accounts} is set, then all mailboxes on the system will be listened to, including any mailboxes which are created on the system while the WaitSet is in existence. Additionally:
  • <add>, <remove> and <update> tags are IGNORED
  • The requesting authtoken must be an admin token

AllAccounts WaitSets are *semi-persistent*, that is, even if the server restarts, it is OK to call <WaitSetRequest> passing in your previous sequence number. The server will attempt to resynchronize the waitset using the sequence number you provide (the server's ability to do this is limited by the RedoLogs that are available)

/add Required (only 1)
/add/a Optional (0 or more)
/add/a@name Optional (0 or 1) Type:String
Name
/add/a@id Optional (0 or 1) Type:String
/add/a@token Optional (0 or 1) Type:String
Last known sync token
/add/a@types Optional (0 or 1) Type:String
interest types: comma-separated list. Currently:
f folders
m messages
c contacts
a appointments
t tasks
d documents
all all types (equiv to "f,m,c,a,t,d")

CreateWaitSetResponse

    <CreateWaitSetResponse waitSet="{waitset-id}" defTypes="{default-interests}" seq="{sequence} (int)"> ## CreateWaitSetResponse
        (<error id="..." type="..." /> ## IdAndType)*
    </CreateWaitSetResponse>

The following table describes elements and attributes you can define within a <CreateWaitSetResponse> element:

XPath Required / Optional Description
@waitSet Required (only 1) Type:String
WaitSet ID
@defTypes Required (only 1) Type:String
Default interest types: comma-separated list. Currently:
f folders
m messages
c contacts
a appointments
t tasks
d documents
all all types (equiv to "f,m,c,a,t,d")
@seq Required (only 1) Type:int
Sequence
/error Optional (0 or more) Error information
/error@id Required (only 1) Type:String
ID
/error@type Required (only 1) Type:String
Type