[SOLVED] get Appointment identification index in order to get appointment of sub-calendar

Have a great idea for extending Zimbra? Share ideas, ask questions, contribute, and get feedback.
G71
Posts: 23
Joined: Fri Aug 19, 2016 10:01 am

[SOLVED] get Appointment identification index in order to get appointment of sub-calendar

Postby G71 » Tue Sep 20, 2016 12:04 pm

Dear,

do you know how can catch the id of a Calendar in order to make the correct query below?

Infact init:10 is the ID of the main calendar. How can get the other sub-calendar IDs?

thanks a lot.

This is my request

Code: Select all

<axis2ns5:SearchRequest xmlns:axis2ns5="urn:zimbraMail" xmlns="urn:zimbraMail" xmlns:axis2ns6="urn:zimbraMail" calExpandInstEnd="1474390801000" calExpandInstStart="1474351201000" limit="10000" sortBy="dateDesc" types="appointment">
      <axis2ns6:query>inid:10</axis2ns6:query>
    </axis2ns5:SearchRequest>
 
Last edited by G71 on Thu Sep 22, 2016 1:50 pm, edited 1 time in total.


G71
Posts: 23
Joined: Fri Aug 19, 2016 10:01 am

Re: get Appointment identification index in order to get appointment of sub-calendar

Postby G71 » Wed Sep 21, 2016 8:57 am

G71 wrote:Dear,

do you know how can catch the id of a Calendar in order to make the correct query below?

Infact init:10 is the ID of the main calendar. How can get the other sub-calendar IDs?

thanks a lot.

This is my request

Code: Select all

<axis2ns5:SearchRequest xmlns:axis2ns5="urn:zimbraMail" xmlns="urn:zimbraMail" xmlns:axis2ns6="urn:zimbraMail" calExpandInstEnd="1474390801000" calExpandInstStart="1474351201000" limit="10000" sortBy="dateDesc" types="appointment">
      <axis2ns6:query>inid:10</axis2ns6:query>
    </axis2ns5:SearchRequest>
 


In other thread, I saw that I can add more than one calendar into the searchRequest:

Code: Select all

{_content: " (inid:"10" OR inid:"280")"}"
where 10, is the main calendar and 280 is ID of the other one calendar.

I don't know again how can know the IDs of the calendars . I mean, are there some "request" in order to have the IDs of "calendar" objects? Anyone can help me?
User avatar
Gren Elliot
Zimbra Employee
Zimbra Employee
Posts: 183
Joined: Tue Jun 10, 2014 4:45 am

Re: get Appointment identification index in order to get appointment of sub-calendar

Postby Gren Elliot » Wed Sep 21, 2016 10:08 am

You can use:

Code: Select all

 <GetFolderRequest view="appointment" xmlns="urn:zimbraMail"/>


Experimenting with my account, you can ignore the "/Trash" folder generally, what you are looking for is the values for attribute "id":

Code: Select all

zmsoap -v -t mail -z -m gren@example.com GetFolderRequest @view="appointment"
<GetFolderRequest view="appointment" xmlns="urn:zimbraMail"/>
<GetFolderResponse xmlns="urn:zimbraMail">
  <folder name="USER_ROOT" id="1">
    <folder i4ms="404" rev="1" i4next="281" f="#" ms="2" l="1" rgb="#FF0080" uuid="85e4c198-0922-4d86-94a8-dd7ce40f92b5" n="5" luuid="1508e24f-0b43-4826-9079-8a48eec5c115" activesyncdisabled="0" absFolderPath="/Calendar" view="appointment" s="0" name="Calendar" id="10" webOfflineSyncDays="0"/>
    <folder i4ms="388" rev="1" i4next="281" ms="1" l="1" uuid="103a9de6-5645-4d1a-82b5-fbe9ed54c876" n="2" luuid="1508e24f-0b43-4826-9079-8a48eec5c115" activesyncdisabled="0" absFolderPath="/Trash" s="9256" name="Trash" id="3" webOfflineSyncDays="30"/>
  </folder>
</GetFolderResponse>
G71
Posts: 23
Joined: Fri Aug 19, 2016 10:01 am

Re: get Appointment identification index in order to get appointment of sub-calendar

Postby G71 » Thu Sep 22, 2016 1:50 pm

Gren Elliot wrote:You can use:

Code: Select all

 <GetFolderRequest view="appointment" xmlns="urn:zimbraMail"/>


Experimenting with my account, you can ignore the "/Trash" folder generally, what you are looking for is the values for attribute "id":

Code: Select all

zmsoap -v -t mail -z -m gren@example.com GetFolderRequest @view="appointment"
<GetFolderRequest view="appointment" xmlns="urn:zimbraMail"/>
<GetFolderResponse xmlns="urn:zimbraMail">
  <folder name="USER_ROOT" id="1">
    <folder i4ms="404" rev="1" i4next="281" f="#" ms="2" l="1" rgb="#FF0080" uuid="85e4c198-0922-4d86-94a8-dd7ce40f92b5" n="5" luuid="1508e24f-0b43-4826-9079-8a48eec5c115" activesyncdisabled="0" absFolderPath="/Calendar" view="appointment" s="0" name="Calendar" id="10" webOfflineSyncDays="0"/>
    <folder i4ms="388" rev="1" i4next="281" ms="1" l="1" uuid="103a9de6-5645-4d1a-82b5-fbe9ed54c876" n="2" luuid="1508e24f-0b43-4826-9079-8a48eec5c115" activesyncdisabled="0" absFolderPath="/Trash" s="9256" name="Trash" id="3" webOfflineSyncDays="30"/>
  </folder>
</GetFolderResponse>



ok, works but I need to put calendar insted of appointment

Code: Select all

      <urn1:GetFolderRequest view="calendar" >


thanks a lot!

Return to “Developers”

Who is online

Users browsing this forum: No registered users and 2 guests