I'm trying to fetch an appointment by uid using the SOAP API.
Here's a SSCCE using the php wrapper ( https://github.com/zimbra-api/zimbra-api ):
Code: Select all
<?php
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);
var_dump($result);
}
catch(Exception $ex) {
$client = $api->getClient();
echo $client->lastResponse();
}
Code: Select all
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header>
<context xmlns="urn:zimbra"><change token="1902"/></context>
</soap:Header>
<soap:Body>
<soap:Fault>
<soap:Code>
<soap:Value>soap:Sender</soap:Value>
</soap:Code>
<soap:Reason>
<soap:Text>no such appointment or task: 8705c923-0281-4cf7-80b9-3a4fa37f93ee</soap:Text>
</soap:Reason>
<soap:Detail>
<Error xmlns="urn:zimbra">
<Code>mail.NO_SUCH_CALITEM</Code>
<Trace>qtp1937601231-845243:https://... my zimbra server ... /service/soap:1487843590290:9167a921c22538c7</Trace>
<a t="STR" n="uid">8705c923-0281-4cf7-80b9-3a4fa37f93ee</a>
</Error>
</soap:Detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
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