6.0.0-alpha14
6/28/25

[#14080] XMLRPC: missing fields of events
Summary XMLRPC: missing fields of events
Queue Kronolith
Queue Version 4.2.8
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester inquisitor (at) goldmail (dot) de
Created 08/06/2015 (3614 days ago)
Due
Updated 08/13/2015 (3607 days ago)
Assigned 08/10/2015 (3610 days ago)
Resolved 08/13/2015 (3607 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
08/13/2015 03:13:01 PM Michael Rubinsky Comment #6
State ⇒ Not A Bug
Reply to this comment
Gotcha. Have fun :)
08/13/2015 02:57:45 PM inquisitor (at) goldmail (dot) de Comment #5 Reply to this comment
Hey Michael,

yes, it would help, but it's not worth the effort I think. I would 
like to retrieve the details for my home automation software, which 
then says "you have one appointment today: 
<!--a75c305b1c0a6022--><title> at <time>". The title I am able to get 
this way and the time is only an additional "goodie" :)

But thank you very much for the offer and all your horde work!!
I will consider parsing the calendar using the export function as 
well. Thanks for this hint!
08/13/2015 02:43:26 PM Michael Rubinsky Comment #4 Reply to this comment
What a pitty :(
Indeed...

You can grab the event details using Kronolith_Api::export, though 
you'll have to parse the vCalendar in your code.

Hm. Maybe we can add a 'hash' format to the export method as a 
stop-gap fix for this until Horde 6. This would add to your round trip 
calls (one to listEvents, then one for each actual event you are 
interested in). Would that help?
08/13/2015 02:36:25 PM inquisitor (at) goldmail (dot) de Comment #3 Reply to this comment
What a pitty :(
Thanks for your reply anyway!
08/10/2015 09:08:46 PM Michael Rubinsky Comment #2
State ⇒ Feedback
Reply to this comment
The problem is that the API method returns an array of 
Kronolith_Event_* objects, which contain properties such as Horde_Date 
objects that don't serialize when being called from outside of PHP. 
This can't be changed before Horde 6, to remain backward compatible. 
The entire API is going to be split into "externally safe" and 
internal-only calls anyway.
08/06/2015 05:54:15 PM inquisitor (at) goldmail (dot) de Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ XMLRPC: missing fields of events
Queue ⇒ Kronolith
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
Hi,

I am trying to retrieve calendar entries from kronolith using XML-RPC 
using a perl script. It seems that some fields are missing in the 
response: start and end properties, id. The returned data looks like 
this:
{
'OikjhrayPWVsxqZn6eCM5Zk' => {
                                                         'icon' => '',
                                                         '' => 'OikjhrayPWVsxqZn6eCM5Zk',
                                                         'baseid' => '',
                                                         'sequence' => '',
                                                         'status' => '2',
                                                         'modifiedby' => '',
                                                         'initialized' => 1,
                                                         'allday' => 0,
                                                         'stored' => 1,
                                                         'url' => '',
                                                         'methods' => '',
                                                         'alarm' => '0',
                                                         'createdby' => '',
                                                         'first' => 1,
                                                         'uid' => '20150806194100.I1-PHdvV3jJDHBC_aOIlGAC@mydomain',
                                                         'calendarType' => 'internal',
                                                         'location' => '',
                                                         'attendees' => [],
                                                         'timezone' => '',
                                                         'private' => 0,
                                                         'last' => 1,
                                                         'description' => '',
                                                         'recurrence' => '',
                                                         'calendar' => '36ItAzeA3490X4h6YKIelg1',
                                                         'modified' => '',
                                                         'end' => {
                                                                          '' => '2015'
                                                                        },
                                                         'created' => '',
                                                         'exceptionoriginaldate' => '',
                                                         'durMin' => '60',
                                                         'title' => 'test',
                                                         'start' => {
                                                                                '' => '2015'
                                                                          }
                                                   }
}

When you look at 'start' and 'end', it seems data is missing. Also the 
second parameter which should be the ID I guess.

Here is the script I am using:
#---------------------------------------------------------------------------------------------------------------
#!/usr/bin/perl -w
use strict;
use Data::Dumper;
use URI::Escape;
use HTTP::Cookies;

require RPC::XML;
require RPC::XML::Client;

# config
my $user = 'horde_login@my_domain';
my $pw = 'mypassword';
my $horde_api_url = 
"https://".uri_escape($user).":".uri_escape($pw)."\@www.hordeserver.com/horde/rpc.php";



# Prepare rpc call
my $rpc_call = RPC::XML::Client->new($horde_api_url, cookie_jar => 
HTTP::Cookies->new(ignore_discard => 1));

# Retrieve ID of own calendar to query
my $resp_calid = $rpc_call->send_request('calendar.listCalendars', 
'false', '4');
my $calid = @{$resp_calid->value}[0];
print "Retrieved calendar ID = $calid\n";

my $today = DateTime->today;
$today->set_locale('de_DE');
my $tomorrow = DateTime->today->add(days => 1);

my $resp_events = $rpc_call->send_request('calendar.listEvents', 
$today->epoch, $tomorrow->epoch, $calid );
print Dumper($resp_events->value);
#---------------------------------------------------------------------------------------------------------------

When testing make sure you have at least one event in your calendar 
for today. Otherwise of course nothing is returned in this case ;)


Versions:
- Horde Groupware Webmail Edition 5.2.7
- Kalender (kronolith) 4.2.8


Is there anything I am missing?
Thanks!

Saved Queries