This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Jul 11, 2017, 11:51 AM
9 Posts

another case of strange behaviour

  • Category: Calendar
  • Platform: AIX
  • Release: 9.0.1
  • Role:
  • Tags: calendar service,rest api
  • Replies: 9

To my surprise the calendar api does not seem to have a documented method to create meeting invitations and so I checked, how they can be accessed. New meeting invitations created from the Notes Client show up in the /api/calendar/events response with a noticetype block, indicating that they are notices instead of regular event types:

      "x-lotus-noticetype": {
        "data":"I"
      },

If I try to access this notice via event-ID (/api/calendar/events/{id}), a com.ibm.domino.calendar.store.StoreException: Error reading event is returned, though (/api/calendar/notices/{id} works).

If I post an event message with this noticetype, this message is accepted by the server, however, it does not create a meeting invitation (as I hoped for) but creates a regular appointment of apptype 0 (without attendees) and not of apptype 3 as I requested. All this is quite confusing, isn't it?

Jul 12, 2017, 5:52 PM
19 Posts
Implicit scheduling
When using the REST calendar API, you don't explicitly create a notification.  Instead, you create (or otherwise operate on) a meeting and the API sends out any implied notices.  For example, if you create a meeting with one attendee, the API puts the meeting on the organizer's calendar and sends an invitation to the attendee.  If you then delete the meeting, the API removes the meeting from the organizer's calendar and sends a cancel notice.

See below for some more details.  I hope this helps.


-- Dave



Create a Meeting in JSON Format


To create a meeting you POST an event to the events resource (/{database}/api/calendar/events).  You must include a Content-Type header and a request body.  When using JSON, set Content-Type to application/json.  Here's the minimum JSON payload for a meeting with one attendee:


{
 "events": [

   {

     "summary": "Test meeting (JSON)",

     "location": "test location",

     "description": "test description",

     "start": {

       "date": "2017-07-13",

       "time": "13:00:00",

       "utc": true

     },

     "end": {

       "date": "2017-07-13",

       "time": "14:00:00",

       "utc": true

     },

     "attendees": [

       {

         "role": "req-participant",

         "status": "needs-action",

         "rsvp": true,

         "email": "DeanMelnyk@acme.com"

       }

     ],

     "organizer": {

       "email": "DukeLawson@acme.com"

     }

   }

 ]

}


One important caveat:  The organizer property must match the owner of the database as specified in the request URL (/{database}/api/calendar/events).  In this case, DukeLawson@acme.com is the Internat email address of the owner.



Create a Meeting in iCalendar Format


You can also create a meeting in iCalendar format.  You still POST the event to the events resource, but the Content-Type header should be text/calendar.  Here is the the minimum iCalendar payload for a meeting with one attendee:


BEGIN:VCALENDAR
VERSION:2.0

PRODID:-//My Client//0.0.1//EN

BEGIN:VEVENT

DTSTART:20170713T130000Z

DTEND:20170713T140000Z

ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION

;RSVP=TRUE:
mailto:DeanMelnyk@acme.com
DESCRIPTION:test description

SUMMARY:Test meeting (iCalendar)

LOCATION:test location

ORGANIZER:
mailto:DukeLawson@acme.com
END:VEVENT

END:VCALENDAR


Again the ORGANIZER property must match the owner of the database.

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal