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