XPages Extension Library Create an event with room reservation via Data Calendar Service API

爷,独闯天下 提交于 2020-01-02 13:31:22

问题


I'm trying to create an event with a room reservation via the Xpages Calendar Services APIs, with a valid JSON object.

Details of the request I am using :

URL : [server-path]/mail/administ.nsf/api/calendar/events
Operation : POST
Headers : Content-Type : application/json

JSON Body :

{
      "events":
      [
        {
          "summary": "Meeting 1 Added via API Call",
          "location": "Conference Room 2/Site@domain",
          "description": "Test description",
          "CalendarDateTime":{
            "date":"2014-02-11",
            "time":"17:00:00",
            "utc":true
          },
          "start": {
            "date":"2014-02-11",
            "time":"17:00:00",
            "utc":true
          },
          "end": {
            "date":"2014-02-11",
            "time":"17:30:00",
            "utc":true
          },
          "class":"public",
          "transparency":"opaque",
          "sequence":0,
          "x-lotus-noticetype":"I",
          "attendees": [
          {
          "displayName":"Administrator@domain",
          "email":"Administrator@domain",
            "role":"chair",
          "status":"accepted"
          },
            {
               "displayName":"testing",

              "email":"testing@domain"
            }
          ],
          "organizer": {
          "displayName":"Administrator@domain",
          "email":"Administrator@domain"
          },
          "x-lotus-room": {
            "data": "testing/TestSite@domain"
          }
        }
      ]
    }

The event is created but the room is not associated to the event.

The JSON body is copied from an event which was created with Lotus Notes and retrieved from the mail/administ.nsf/api/calendar/events api call.

I have search all over the internet for an example of how to make an api call to create an event with room registration/reservation but failed to get any info.

Notes :
The Domino/LotusNotes/XPages Extension Library pair is configured OK (hopefully).
The Reservation DB is OK, I am able to create meetings with the Lotus Client and retrieve them using api calls.


回答1:


I have managed to find a solution to this problem via the IBM Xpages support page.

In order to assign a room to a meeting you have to add the room email address to the list of attendees:

"attendees": [
    {
      "role": "req-participant",
      "status": "needs-action",
      "rsvp": true,
      "email": "administrator@domain"
    },
    {
      "role": "req-participant",
      "userType": "room",
      "status": "accepted",
      "rsvp": true,
      "email": "Conference_Room1@domain"
    }

  ],


来源:https://stackoverflow.com/questions/21726007/xpages-extension-library-create-an-event-with-room-reservation-via-data-calendar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!