Page 1 of 1

GetAppointment by uid using SOAP API

Posted: Thu Feb 23, 2017 10:26 am
by catone.cremonesi
Hello all,

I'm trying to fetch an appointment by uid using the SOAP API.

Here's a SSCCE using the php wrapper ( ):

Code: Select all


require 'vendor/autoload.php';

use Zimbra\Enum\AccountBy;
use Zimbra\Mail\MailFactory;
use Zimbra\Struct\AccountSelector;

$api = MailFactory::instance('https://... my zimbra server ...');
try {
    $account = new AccountSelector(AccountBy::NAME(), '... my user name ...');
    $api->auth($account, '...  my password ..');

    $result = $api->getAppointment(null, null, null, '8705c923-0281-4cf7-80b9-3a4fa37f93ee', null);
catch(Exception $ex) {
    $client = $api->getClient();
    echo $client->lastResponse();

When the uid refers to an appointment contained in a local calendar the code works correctly, when the uid refers to an appointment in a shared calendar (not owned by the account that performs the request) I get the following error:

Code: Select all

<soap:Envelope xmlns:soap="">
        <context xmlns="urn:zimbra"><change token="1902"/></context>
                <soap:Text>no such appointment or task: 8705c923-0281-4cf7-80b9-3a4fa37f93ee</soap:Text>
                <Error xmlns="urn:zimbra">
                    <Trace>qtp1937601231-845243:https://... my zimbra server ... /service/soap:1487843590290:9167a921c22538c7</Trace>
                    <a t="STR" n="uid">8705c923-0281-4cf7-80b9-3a4fa37f93ee</a>

It's working as it should or am I missing something?

I need some kind of id to fetch a specific appointment using the GetAppointment method, the id can't change in time and I need to use the same id to fetch the appointment from different zimbra accounts who share calendars with each others.

Thank you

Re: GetAppointment by uid using SOAP API

Posted: Fri Jun 09, 2017 9:28 am
by shrikant-prasad
uid is present in metadata of the appointment created in owner's mailbox and it's not present in metadata of the appointment in other user's mailbox with whom calendar has been shared. That's why search with uid works for items in local folder and doesn't for shared folder.
You should use "id" instead of uid to get appointments in shared folder.
id format would be "<accountIdOfOwner>:<itemIdInOwnerMailbox>"

when id is used the request will get proxied to the owner mailbox for appointment search and result would be returned.