I have Googled extensively and tried mining the Zimbra webmail front end for requests and responses to the Zimbra SOAP API but I can't find how to do the following:
- request all appointments for a calendar using XML (the request below is in JSON and returns XML, would be nice to be able to make the request in XML)
- for repeating appointments, obtain the repeating time interval
Below is an example of how it is done with JSON request (except that the JSON response does not appear to include the repeating time interval for repeating appointments).
The request below requests all appointments (between 1/1/1970 and 1/1/2114 = Unix dates 0 to 4544208000000 in MSEC) for the Calendar with ID=10.
The response (in XML) has 2 appointments, the first is a single appointment, the second is a daily repeating appointment but none of the properties seem to indicate the repeating time interval.
Request URL:
http://www.MyZimbraServer.com/service/soap/BatchRequest
Request:
{ "Body" : { "BatchRequest" : { "SearchRequest" : { "_jsns" : "urn:zimbraMail",
"calExpandInstEnd" : 4544208000000,
"calExpandInstStart" : 0,
"limit" : "500",
"locale" : { "_content" : "en_AU" },
"offset" : 0,
"query" : { "_content" : "inid:10" },
"sortBy" : "none",
"types" : "appointment"
},
"_jsns" : "urn:zimbra",
"onerror" : "continue"
} },
"Header" : { "context" : { "_jsns" : "urn:zimbra",
"account" : { "_content" : "ASample@account.com",
"by" : "name"
},
"authToken" : "A_valid_authToken_goes_here",
"format" : { "type" : "xml" },
"sessionId" : { "_content" : 14630204,
"id" : 14630204
},
"userAgent" : { "name" : "ZimbraWebClient",
"version" : "5.0"
}
} }
}
Response (content of <BatchResponse> only shown):
<BatchResponse xmlns="urn:zimbra">
<SearchResponse xmlns="urn:zimbraMail" more="0" sortBy="none" offset="0">
<appt alarm="1" loc="In the office" transp="O" fb="B" id="327" rev="804" isOrg="1" fba="B" score="1.0" t="" compNum="0" name="Subject for a single appointment" s="0" d="1375942257000" ms="900" md="1376003780" class="PUB" uid="e21505b9-c64a-42e0-abe6-07010f44f458" ptst="AC" status="CONF" cm="1" l="10" dur="3600000" sf="" f="" x_uid="e21505b9-c64a-42e0-abe6-07010f44f458" invId="327-326">
<or d="Joe Bloggs" a="ASample@account.com" url="ASample@account.com" />
<fr>These are notes for my single appointment</fr>
</appt>
<appt alarm="1" loc="On the beach" transp="O" fb="B" recur="1" id="338" rev="811" isOrg="1" fba="B" score="1.0" t="" compNum="0" name="Subject for a daily repeating appointment" s="0" d="1375944660000" ms="1004" md="1376011270" class="PUB" uid="921dc981-c9a6-4f11-9617-ccad3328c144" ptst="AC" cm="1" status="CONF" l="10" dur="3600000" sf="" f="" x_uid="921dc981-c9a6-4f11-9617-ccad3328c144" invId="338-337">
<or d="Joe Bloggs" a="ASample@account.com" url="ASample@account.com" />
<fr>These are notes for my repeating appointment</fr>
</appt>
</SearchResponse>
</BatchResponse>