问题
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