This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Working with Events in Google Calendar



Overview

The following operations allow you to work with events. Click an operation name to see details on how to use it. 

OperationDescription
createEventCreates an event.
createQuickAddEventsCreates an event based on a simple text string.
deleteEventDeletes an event.
getEventReturns an event.
getEventInstancesReturns instances of the specified recurring event.
importEventsImports an event.
listEventsReturns events on a calendar.
moveEventMoves an event to another calendar.
patchEventsUpdates an event. This method supports patch semantics
updateEventsUpdates an event.

For a sample proxy service that illustrates how to work with event resources, see  Sample configuration .

Operation details

Following is more information about each of the operations.

Creating an event

To create an event, use googlecalendar.createEvent and specify the relevant properties.

createEvent
 <googlecalendar.createEvent>
	<calendarId>{$ctx:calendarId}</calendarId>
	<maxAttendees>{$ctx:maxAttendees}</maxAttendees>
	<sendNotifications>{$ctx:sendNotifications}</sendNotifications>
	<fields>{$ctx:fields}</fields>
	<anyoneCanAddSelf>{$ctx:anyoneCanAddSelf}</anyoneCanAddSelf>
	<attendeesOmitted>{$ctx:attendeesOmitted}</attendeesOmitted>
	<attendees>{$ctx:attendees}</attendees>
	<colorId>{$ctx:colorId}</colorId>
	<description>{$ctx:description}</description>
	<end>{$ctx:end}</end>
	<endTimeUnspecified>{$ctx:endTimeUnspecified}</endTimeUnspecified>
	<etag>{$ctx:etag}</etag>
	<extendedProperties>{$ctx:extendedProperties}</extendedProperties>
	<gadget>{$ctx:gadget}</gadget>
	<guestsCanInviteOthers>{$ctx:guestsCanInviteOthers}</guestsCanInviteOthers>
	<guestsCanSeeOtherGuests>{$ctx:guestsCanSeeOtherGuests}</guestsCanSeeOtherGuests>
	<iCalUID>{$ctx:iCalUID}</iCalUID>
	<id>{$ctx:id}</id>
	<kind>{$ctx:kind}</kind>
	<location>{$ctx:location}</location>
	<originalStartTime>{$ctx:originalStartTime}</originalStartTime>
	<privateCopy>{$ctx:privateCopy}</privateCopy>
	<recurrence>{$ctx:recurrence}</recurrence>
	<recurringEventId>{$ctx:recurringEventId}</recurringEventId>
	<reminders>{$ctx:reminders}</reminders>
	<sequence>{$ctx:sequence}</sequence>
	<source>{$ctx:source}</source>
	<start>{$ctx:start}</start>
	<status>{$ctx:status}</status>
	<summary>{$ctx:summary}</summary>
	<transparency>{$ctx:transparency}</transparency>
	<visibility>{$ctx:visibility}</visibility>
 </googlecalendar.createEvent>
Properties
  • calendarId: Required - The calendar identifier. 
  • maxAttendees: Optional - The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned.
  • sendNotifications: Optional - Whether to send notifications about the creation of the new event. The default value is False.
  • fields: Selector specifying which fields to include in a partial response.
  • anyoneCanAddSelf: Optional - Whether anyone can invite themselves to the event. The default value is False.
  • attendeesOmitted: Optional - Whether attendees may have been omitted from the event's representation. When retrieving an event, this may be due to a restriction specified by the maxAttendees property. When updating an event, this can be used only to update the participant's response. The default value is False.
  • attendees: The list of attendees of the event. 
  • colorId: Optional - The identifier of the event color. This is the ID that refers to an entry in the Event section of the colors definition. For more information on this property, see colors endpoint.
  • description: Optional - The description of the event.
  • end: Required - The exclusive end time of the event. For a recurring event, this is the end time of the first instance.
  • endTimeUnspecified: Whether the end time is actually unspecified. Even if the value of this propery is set to True, an end time is still provided for compatibility reasons. The default value is False.
  • etag: ETag of the resource.
  • extendedProperties: An object. Extended properties of the event.
  • gadget: An object. A gadget that extends this event.
  • guestsCanInviteOthers: Optional - Whether attendees other than the organizer can invite others to the event. The default value is True.
  • guestsCanSeeOtherGuests: Optional - Whether attendees other than the organizer can see the attendees of the event. The default value is True.
  • iCalUID: The event ID in the iCalendar format.
  • id: Identifier of the event. When creating a new single event or recurring events, you can specify their IDs. The IDs specified must adhere to the following rules:
    • Characters allowed in the ID are those used in base32hex encoding, i.e. lowercase letters a-v and digits 0-9, see section 3.1.2 in RFC2938.
    • The length of the ID must be between 5 and 1024 characters.
    • The ID must be unique per calendar.
      (Note: Due to the globally distributed nature of the system, we cannot guarantee that ID collisions will be detected at event creation time. To minimize the risk of collisions, we recommend using an established UUID algorithm such as the one described in  RFC4122.)
  • kind: The type of the resource.
  • location: Optional - The geographic location of the event as free-form text.
  • originalStartTime: For an instance of a recurring event, this is the time at which the event would start according to the recurrence data in the recurring event identified by the recurringEventId property. Immutable.
  • privateCopy: Optional - Whether this is a private event copy where changes are not shared with other copies on other calendars. Immutable. The default is False.
  • recurrence: List of RRULE, EXRULE, RDATE and EXDATE lines for a recurring event. This field is omitted for single events or instances of recurring events.
  • recurringEventId: For an instance of a recurring event, this is the event ID of the recurring event itself. Immutable.
  • reminders: An object. Information about the event's reminders for the authenticated user.
  • sequence: Sequence number as per iCalendar.
  • source: An object. The source of an event from which it was created. For example, a web page, an email message or any document identifiable by a URL using the HTTP/HTTPS protocol. Accessible only by the creator of the event.
  • start: Required - A nested object. The inclusive start time of the event. For a recurring event, this is the start time of the first instance.
  • status: Optional - The status of the event.
  • summary: Optional - The title of the event.
  • transparency: Optional - Whether the event blocks time on the calendar.
  • visibility: Optional - Visibility of the event.
Sample request

Following is a sample REST request that can be handled by the createEvent operation.

Sample Request for createEvent
{
	"apiUrl": "https://www.googleapis.com",
	"accessToken": "ya29.1.AADtN_XANN7ZP08GGZx24eN4mPGgLiyc4xltOoGIDSNDJso9xenf9vPfYD-r-8Z9gA4Fsoaw",
	"calendarId": "wso2connector.abc@gmail.com",
	"maxAttendees": 1,
	"sendNotifications": 0,
	"sequence": 1,
	"start": {
				"dateTime": "2014-03-19T12:36:54.371Z"
			}, 
	"end": {
				"dateTime": "2014-03-19T13:36:54.371Z"
			}
}

Following is more information about the parameters:

  • fields: Includes values such as anyoneCanAddSelf, attendees, attendeesOmitted, colorId, created, creator (displayName, email, self), description, end, endTimeUnspecified, etag, extendedProperties, gadget, guestsCanInviteOthers, guestsCanModify, guestsCanSeeOtherGuests, hangoutLink, htmlLink, iCalUID, id, kind, location, locked, organizer, originalStartTime, privateCopy, recurrence, recurringEventId, reminders, sequence, source, start, status, summary, transparency, updated, and visibility.
  • attendees
    • email: Required - The attendee's email address, if available. This field must be present when adding an attendee.
    • additionalGuests: Optional - Number of additional guests. The default value is 0.
    • comment: Optional - The attendee's response comment.
    • displayName: Optional - The attendee's name, if available.
    • optional Optional - Whether this is an optional attendee. The default value is False.
    • id: The attendee's Profile ID, if available.
    • organizer: Whether the attendee is the organizer of the event. Read-only. The default value is False.
    • resource: Whether the attendee is a resource. Read-only. The default value is False.
    • self: Whether this entry represents the calendar on which this copy of the event appears. Read-only. The default value is False.
    • responseStatus: The attendee's response status. Possible values are:
      • needsAction - The attendee has not responded to the invitation.
      • declined - The attendee has declined the invitation.
      • tentative - The attendee has tentatively accepted the invitation.
      • accepted - The attendee has accepted the invitation.
  • end
    • date: The date in the format yyyy-mm-dd, if it is an all-day event.
    • dateTime: The time, as a combined date-time value (formatted according to RFC 3339). A time zone offset is required unless a time zone is explicitly specified via the 'timeZone' property.
    • timeZone: Optional - The name of the time zone in which the time is specified. For example Europe/Zurich. The default value is the time zone of the calendar.
  • reminders
    • overrides: If the event does not use the default reminders, this lists the reminders specific to the event. If not set, it indicates that no reminders are set for this event.
      • method: Required - The method used by this reminder. Possible values are:
        • email - Reminders are sent via email.
        • sms - Reminders are sent via SMS.
        • popup - Reminders are sent via a UI popup.
      • minute: Required - Number of minutes before the start of the event when the reminder should be triggered.
    • useDefault: Whether the default reminders of the calendar apply to the event.
  • start
    • date: The date in the format yyyy-mm-dd, if this is an all-day event.
    • dateTime: The time, as a combined date-time value (formatted according to RFC 3339). A time zone offset is required unless a time zone is explicitly specified via the timeZone property.
    • timeZone: Optional. The name of the time zone in which the time is specified. For example Europe/Zurich. The default value is the time zone of the calendar.
  • extendedProperties
    • private: An obejct. Properties that are private to the copy of the event that appears on this calendar.
      • key: The name of the private property and the corresponding value.
    • shared: An object.Properties that are shared between copies of the event on calendars of other attendees.
      • key: The name of the shared property and the corresponding value.
  • gadget
    • height: Optional - The height of the gadget in pixels.
    • iconLink: The icon URL of the gadget.
    • link: The URL of the gadget.
    • preferences:
      • key: The preference name and corresponding value.
    • title: The title of the gadget.
    • type: The type of the gadget.
    • width: Optional - The width of the gadget in pixels.
  • orginalStartTime
    • date: The date in the format yyyy-mm-dd, if this is an all-day event.
    • dateTime: The time, as a combined date-time value (formatted according to RFC 3339). A time zone offset is required unless a time zone is explicitly specified via the timeZone property.
    • timeZone: Optional. The name of the time zone in which the time is specified. For example Europe/Zurich. The default value is the time zone of the calendar.
  • source
    • title: The title of the source. For example a title of a web page or the title of an email subject.
    • url: The URL of the source pointing to a resource. The protocol of the URL must be HTTP or HTTPS.
  • status: The possible values are:
    • confirmed - The event is confirmed. This is the default status.
    • tentative - The event is tentatively confirmed.
    • cancelled - The event is canceled.
  • transparency: Possible values are:
    • opaque - The event blocks time on the calendar. This is the default value.
    • transparent - The event does not block time on the calendar.
  • visibility: The possible parameters are:
    • default -  Uses the default visibility for events on the calendar. This is the default value.
    • public - The event is public and the event details are visible to all readers of the calendar.
    • private - The event is private and only event attendees can view event details.
    • confidential- The event is private. This value is provided for compatibility reasons.

Out of all the fields that are listed under Events resource, some fields are read-only.  Following is a list of fields specified as read-only fields in the API documentation.

  • created
  • creator
  • hangoutLink
  • htmlLink
  • locked
  • organizer
  • updated

Note

In the createEvent operation, you cannot send values through the request for the read-only fields.

Related Google Calendar documentation:

https://developers.google.com/google-apps/calendar/v3/reference/events/insert

Creating quick add events

To create an event based on a simple text string, use googlecalendar.createQuickAddEvent and specify the relevant properties.

createQuickAddEvents
<googlecalendar.createQuickAddEvents>
     <text>{$ctx:text}</text>
     <calendarId>{$ctx:calendarId}</calendarId>
     <sendNotifications>{$ctx:sendNotifications}</sendNotifications>
     <fields>{$ctx:fields}</fields>
</googlecalendar.createQuickAddEvents>
Properties
  • text: Required - The text describing the event to be created.
  • calendarId: Required - The calendar identifier.
  • sendNotifications: Optional - Whether to send notifications about the creation of the event. The default value is False.
  • fields: Optional - Selector specifying which fields to include in a partial response.

Sample request

Following is a sample REST request that can be handled by the createQuickAddEvents operation. 

Sample Request for createQuickAddEvents
{
	"apiUrl":"https://www.googleapis.com",
	"accessToken":"ya29.1.AADtN_VsfmzdqOl6S4mFMadfBkJju_QFroZuP5AsWG2KpvzBkjaVnsqSwulCHzsWZA",
	"calendarId":"rimfjm16ep828l07n9fefef8@group.calendar.google.com",
	"sendNotifications":true,
	"fields":"anyoneCanAddSelf,creator,description,end,endTimeUnspecified,etag",
	"text":"TEST 101"
}

Following is more information about the fields parameter in the sample request:

  • fields: This includes values such as description, etag, id, kind, location, summary and timeZone.
Related Google Calendar documentation:

https://developers.google.com/google-apps/calendar/v3/reference/events/quickAdd

Deleting an event

To delete an event, use googlecalendar.deleteEvent and specify the relevant properties.

deleteEvent
<googlecalendar.deleteEvent>
	<calendarId>{$ctx:calendarId}</calendarId>
	<eventId>{$ctx:eventId}</eventId>
	<sendNotifications>{$ctx:sendNotifications}</sendNotifications>    
</googlecalendar.deleteEvent>
Properties
  • calendarId: Required - The calendar identifier.
  • eventId: Required - The event identifier.
  • sendNotifications: Optional - Whether to send notifications about the deletion of the event. The default value is False.
Sample request

Following is a sample REST request that can be handled by the deleteEvent operation.

Sample Request for deleteEvent
 {
	"apiUrl": "https://www.googleapis.com",
	"accessToken": "ya29.1.AADtN_XFmeIA2K8ZJSwLL3OafkFiCa20VpNV57cMaC_aq8Z2Aas5WzSW1iLH70U2XLQLzc9F",
	"calendarId": "wso2connector.abca@gmail.com",
	"eventId": "uefim1oij6phjg2i35jq66b59g",
	"sendNotifications": true
}
Related Google Calendar documentation: 

https://developers.google.com/google-apps/calendar/v3/reference/events/delete

Returning an event

To return an event, use googlecalendar.getEvent and specify the relevant properties.

getEvent
<googlecalendar.getEvent>
	<calendarId>{$ctx:calendarId}</calendarId>
    <eventId>{$ctx:eventId}</eventId>
	<alwaysIncludeEmail>{$ctx:alwaysIncludeEmail}</alwaysIncludeEmail>
	<maxAttendees>{$ctx:maxAttendees}</maxAttendees>
    <timeZone>{$ctx:timeZone}</timeZone>
    <fields>{$ctx:fields}</fields>    
</googlecalendar.getEvent>
Properties
  • calendarId: Required - The calendar identifier.
  • eventId: Required - The event identifier.
  • alwaysIncludeEmail: Optional - Whether to always include a value in the email field for the organizer, creator and attendees, even if a valid email is not available. This means that a generated, non-working value will be provided. The use of this property is discouraged and should only be used when a value for the email field cannot be absent. The default value is False.
  • maxAttendees: Optional - The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned.
  • timeZone: Optional - The time zone used in the response. The default value is the time zone of the calendar.
  • fields: Optional - Selector specifying which fields to include in a partial response.
Sample Request

Following is a sample REST request that can be handled by the getEvent operation. 

Sample Request for getEvent
 {
	"apiUrl":"https://www.googleapis.com",
	"accessToken":"ya29.1.AADtN_Xe5ANZsLYtIRq2Gx97ivcO9WkGkkmmsgqL1R7bSNknYzu8y0CqH9FG_zmscpJQEpLP",
	"calendarId":"gneps282ikku4s1t87j52e7sgc@group.calendar.google.com",
	"eventId":"idecatmre2quar3b6ojlaqdl60",
	"alwaysIncludeEmail":true,
	"timeZone":"UTC",
	"maxAttendees":10,
	"fields":"colorId,created,creator(displayName,email,self),description,endTimeUnspecified,etag,extendedProperties,gadget,guestsCanInviteOthers,guestsCanModify,guestsCanSeeOtherGuests,hangoutLink,htmlLink,iCalUID,id,kind,location,locked,organizer,originalStartTime,privateCopy,recurrence,recurringEventId,reminders,sequence,source,start,status,summary,transparency,updated,visibility"
}

Following is more information about the fields parameter in the sample request:

  • fields -  This includes values such as anyoneCanAddSelf, attendees, id, attendeesOmitted, colorId, created, creator (displayName, email, self), description, end, endTimeUnspecified, etag, extendedProperties, gadget, guestsCanInviteOthers, guestsCanModify, guestsCanSeeOtherGuests, hangoutLink, htmlLink, iCalUID, id, kind, location, locked, organizer, originalStartTime, privateCopy, recurrence, recurringEventId, reminders, sequence, source, start, status, summary, transparency, updated and visibility.
Related Google Calendar documentation:

https://developers.google.com/google-apps/calendar/v3/reference/events/get

Returning event instances

To return instances of a specified recurring event, use googlecalendar.getEventInstances and specify the relevant properties.

getEventInstances
<googlecalendar.getEventInstances>
	<calendarId>{$ctx:calendarId}</calendarId>
    <eventId>{$ctx:eventId}</eventId>
	<alwaysIncludeEmail>{$ctx:alwaysIncludeEmail}</alwaysIncludeEmail>
    <timeMin>{$ctx:timeMin}</timeMin>
    <originalStart>{$ctx:originalStart}</originalStart>
    <timeZone>{$ctx:timeZone}</timeZone>
    <pageToken>{$ctx:pageToken}</pageToken>
    <showDeleted>{$ctx:showDeleted}</showDeleted>
    <timeMax>{$ctx:timeMax}</timeMax>
    <maxResults>{$ctx:maxResults}</maxResults>
    <fields>{$ctx:fields}</fields>
    <maxAttendees>{$ctx:maxAttendees}</maxAttendees>
</googlecalendar.getEventInstances>
Properties
  • calendarId: Required - The calendar identifier.
  • eventId: Required - The event identifier.
  • alwaysIncludeEmail: Optional - Whether to always include a value in the email field for the organizer, creator and attendees, even if a valid email is not available. This means that a generated, non-working value will be provided. The use of this property is discouraged and should only be used when a value for the email field cannot be absent. The default value is False.
  • timeMin: Optional - Lower bound (inclusive) for an event's end time to filter by. The default is not to filter by end time.
  • originalStart: Optional - The original start time of the instance in the result.
  • timeZone: Optional - The time zone used in the response. The default is the time zone of the calendar.
  • pageToken: Optional - The token specifying which result page to return.
  • showDeleted: Optional - Whether to include deleted events with the canceled status in the result. Canceled instances of recurring events will still be included if the singleEvents property is False. The default value is False.
  • timeMax: Optional - Upper bound (exclusive) for an event's start time to filter by. The default is not to filter by start time.
  • maxResults: Optional - Maximum number of events returned on one result page.
  • fields: Optional - Selector specifying which fields to include in a partial response.
  • maxAttendees: Optional - The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned.
Sample request

Following is a sample REST request that can be handled by the getEventInstances operation. 

Sample Request for getEventInstances
 {
	"apiUrl": "https://www.googleapis.com",
	"accessToken": "ya29.1.AADtN_U8dgBC-6ddTMfBAUizBFpDYq2IfX6k2EwzriVqstIwq91mp_AnXNY3R_YXJ0wLenvC",
	"calendarId": "wso2connector.abdera@gmail.com",
	"eventId": "test1"
}
Related Google Calendar documentation:

https://developers.google.com/google-apps/calendar/v3/reference/events/instances

Importing events

To import an event, use googlecalendar.importEvents and specify the relevant properties. You can use this operation if you need to add a private copy of an existing event to a calendar.

importEvents
  <googlecalendar.importEvents>
	<calendarId>{$ctx:calendarId}</calendarId>
	<fields>{$ctx:fields}</fields>
	<anyoneCanAddSelf>{$ctx:anyoneCanAddSelf}</anyoneCanAddSelf>
	<attendeesOmitted>{$ctx:attendeesOmitted}</attendeesOmitted>
	<attendees>{$ctx:attendees}</attendees>
	<colorId>{$ctx:colorId}</colorId>
	<description>{$ctx:description}</description>
	<end>{$ctx:end}</end>
	<endTimeUnspecified>{$ctx:endTimeUnspecified}</endTimeUnspecified>
	<etag>{$ctx:etag}</etag>
	<extendedProperties>{$ctx:extendedProperties}</extendedProperties>
	<gadget>{$ctx:gadget}</gadget>
	<guestsCanInviteOthers>{$ctx:guestsCanInviteOthers}</guestsCanInviteOthers>
	<guestsCanSeeOtherGuests>{$ctx:guestsCanSeeOtherGuests}</guestsCanSeeOtherGuests>
	<iCalUID>{$ctx:iCalUID}</iCalUID>
	<id>{$ctx:id}</id>
	<kind>{$ctx:kind}</kind>
	<location>{$ctx:location}</location>
	<originalStartTime>{$ctx:originalStartTime}</originalStartTime>
	<privateCopy>{$ctx:privateCopy}</privateCopy>
	<recurrence>{$ctx:recurrence}</recurrence>
	<recurringEventId>{$ctx:recurringEventId}</recurringEventId>
	<reminders>{$ctx:reminders}</reminders>
	<sequence>{$ctx:sequence}</sequence>
	<source>{$ctx:source}</source>
	<start>{$ctx:start}</start>
	<status>{$ctx:status}</status>
	<summary>{$ctx:summary}</summary>
	<transparency>{$ctx:transparency}</transparency>
	<visibility>{$ctx:visibility}</visibility>
  </googlecalendar.importEvents>
Properties
  • calendarId: Required - The calendar identifier.
  • fields: Optional - Selector specifying which fields to include in a partial response.
  • anyoneCanAddSelf: Optional - Whether anyone can invite themselves to the event. The default value is False.
  • attendeesOmitted: Optional - Whether attendees may have been omitted from the event's representation. When retrieving an event, this may be due to a restriction specified by the maxAttendee query parameter. When updating an event, this can be used to only update the participant's response. The default value is False.
  • attendees: Optional - A list of attendees of the event.
  • colorId: Optional - The identifier of the event color. This is the ID that refers to an entry in the Event section of the colors definition. For more information on this property, see colors endpoint.
  • description: Optional - Description of the event.
  • end: Required- A nested object. It describes the exclusive end time of the event. For a recurring event this is the end time of the first instance.
  • endTimeUnspecified: Optional - Whether the end time is actually unspecified. An end time is still provided for compatibility reasons, even if this attribute is set to True. The default value is False.
  • etag: Optional - ETag of the resource.
  • extendedProperties: Optional - An object of extended properties of the event.
  • gadget: Optional - An object describes a gadget that extends this event.
  • guestsCanInviteOthers: Optional - Whether attendees other than the organizer can invite others to the event. The default value is True.
  • guestsCanSeeOtherGuests: Optional - Whether attendees other than the organizer can see the other attendees of the event. The default value is True.
  • iCalUID: Required - Event ID in the iCalendar format.
  • id: Optional: Identifier of the event. When creating new single or recurring events, you can specify their IDs. Provided IDs must follow these rules:
    • Characters allowed in the ID are those used in base32hex encoding, i.e. lowercase letters a-v and digits 0-9, see section 3.1.2 in RFC2938
    • The length of the ID must be between 5 and 1024 characters
    • The ID must be unique per calendar
      (Note: Due to the globally distributed nature of the system, we cannot guarantee that ID collisions will be detected at event creation time. To minimize the risk of collisions, we recommend using an established UUID algorithm such as the one described in RFC4122.)
  • kind: Optional - Type of resource.
  • location: Optional - Geographic location of the event as free-form text.
  • originalStartTime: A nested object. For an instance of a recurring event, this is the time at which this event would start according to the recurrence data in the recurring event identified by recurringEventId property. Immutable.
  • privateCopy: Optional - Whether this is a private event copy where changes are not shared with other copies on other calendars. Immutable. The default value is False.
  • recurrence: List of RRULE, EXRULE, RDATE and EXDATE lines for a recurring event. This field is omitted for single events or instances of recurring events.
  • recurringEventId: For an instance of a recurring event, this is the event ID of the recurring event itself. Immutable.
  • reminders: An object. Information about the event's reminders for the authenticated user.
  • sequence: Sequence number as per iCalendar.
  • source: An object. The source of an event from which it was created. For example, a web page, an email message or any document identifiable by a URL using the HTTP/HTTPS protocol. Accessible only by the creator of the event.
  • start: Required - A nested object. The inclusive start time of the event. For a recurring event, this is the start time of the first instance.
  • status: Optional - The status of the event.
  • summary: Optional - The title of the event.
  • transparency: Optional - Whether the event blocks time on the calendar.
  • visibility: Optional - Visibility of the event.
Sample request

Following is a sample REST request that can be handled by the importEvents operation. 

Sample Request for importEvents
{
	"apiUrl": "https://www.googleapis.com",
	"accessToken": "ya29.1.AADtN_XANN7ZP08GGZx24eN4mPGgLiyc4xltOoGIDSNDJso9xenf9vPfYD-r-8Z9gA4Fsoaw",
	"calendarId": "wso2connector.abc@gmail.com",
	"end": {
		"dateTime": "2014-03-19T13:36:54.371Z"	
	},
	"iCalUID": "16iucoarlm18mqihj3tsn5rsjc",
	"start": {
		"dateTime": "2014-03-19T12:36:54.371Z"		
	},
	"sequence": 1
}

Following is more information about the parameters:

  • fields: Selector specifying which fields to include in a partial response.
  • attendees
    • email: Required - The attendee's email address, if available. This field must be present when adding an attendee.
    • additionalGuests: Optional - Number of additional guests. The default value is 0.
    • comment: Optional - The attendee's response comment.
    • displayName: Optional - The attendee's name, if available.
    • optional Optional - Whether this is an optional attendee. The default value is False.
    • responseStatus: The attendee's response status. Possible values are:
      • needsAction - The attendee has not responded to the invitation.
      • declined - The attendee has declined the invitation.
      • tentative - The attendee has tentatively accepted the invitation.
      • accepted - The attendee has accepted the invitation.
  • extendedProperties
    • private: An obejct. Properties that are private to the copy of the event that appears on this calendar.
      • key: The name of the private property and the corresponding value.
    • shared: An object.Properties that are shared between copies of the event on calendars of other attendees.
      • key: The name of the shared property and the corresponding value.
  • end
    • date: The date in the format yyyy-mm-dd, if it is an all-day event.
    • dateTime: The time, as a combined date-time value (formatted according to RFC 3339). A time zone offset is required unless a time zone is explicitly specified via the 'timeZone' property.
    • timeZone: Optional - The name of the time zone in which the time is specified. For example Europe/Zurich. The default value is the time zone of the calendar.
  • gadget
    • height: Optional - The height of the gadget in pixels.
    • iconLink: The icon URL of the gadget.
    • link: The URL of the gadget.
    • preferences:
      • key: The preference name and corresponding value.
    • title: The title of the gadget.
    • type: The type of the gadget.
    • width: Optional - The width of the gadget in pixels.
  • orginalStartTime
    • date: The date in the format yyyy-mm-dd, if this is an all-day event.
    • dateTime: The time, as a combined date-time value (formatted according to RFC 3339). A time zone offset is required unless a time zone is explicitly specified via the timeZone property.
    • timeZone: Optional. The name of the time zone in which the time is specified. For example Europe/Zurich. The default value is the time zone of the calendar.
  • reminders
    • overrides: If the event does not use the default reminders, this lists the reminders specific to the event. If not set, it indicates that no reminders are set for this event.
      • method: Required - The method used by this reminder. Possible values are:
        • email - Reminders are sent via email.
        • sms - Reminders are sent via SMS.
        • popup - Reminders are sent via a UI popup.
      • minute: Required - Number of minutes before the start of the event when the reminder should be triggered.
    • useDefault: Whether the default reminders of the calendar apply to the event.
  • source
    • title: The title of the source. For example a title of a web page or the title of an email subject.
    • url: The URL of the source pointing to a resource. The protocol of the URL must be HTTP or HTTPS.
  • start
    • date: The date in the format yyyy-mm-dd, if this is an all-day event.
    • dateTime: The time, as a combined date-time value (formatted according to RFC 3339). A time zone offset is required unless a time zone is explicitly specified via the timeZone property.
    • timeZone: Optional. The name of the time zone in which the time is specified. For example Europe/Zurich. The default value is the time zone of the calendar.
  • status: The possible values are:
    • confirmed - The event is confirmed. This is the default status.
    • tentative - The event is tentatively confirmed.
    • cancelled - The event is canceled.
  • visibility: The possible parameters are:
    • default -  Uses the default visibility for events on the calendar. This is the default value.
    • public - The event is public and the event details are visible to all readers of the calendar.
    • private - The event is private and only event attendees can view event details.
    • confidential- The event is private. This value is provided for compatibility reasons.
  • transparency: Possible values are:
    • opaque - The event blocks time on the calendar. This is the default value.
    • transparent - The event does not block time on the calendar.

Out of all the fields that are listed under Events resource, some fields are read-only.  Following is a list of fields specified as read-only fields in the API documentation.

  • created
  • creator
  • hangoutLink
  • htmlLink
  • locked
  • organizer
  • updated

Note

In the importEvent operation, you cannot send values through the request for the read-only fields.

Related Google Calendar documentation:

https://developers.google.com/google-apps/calendar/v3/reference/events/import

Listing events

To return events on a specified calendar, use googlecalendar.listEvents and specify the relevant properties.

listEvents
<googlecalendar.listEvents>
	<alwaysIncludeEmail>{$ctx:alwaysIncludeEmail}</alwaysIncludeEmail>
    <calendarId>{$ctx:calendarId}</calendarId>
    <orderBy>{$ctx:orderBy}</orderBy>
    <timeZone>{$ctx:timeZone}</timeZone>
    <singleEvents>{$ctx:singleEvents}</singleEvents>
    <pageToken>{$ctx:pageToken}</pageToken>
   	<showHiddenInvitations>{$ctx:showHiddenInvitations}</showHiddenInvitations>
   	<maxResults>{$ctx:maxResults}</maxResults>
    <maxAttendees>{$ctx:maxAttendees}</maxAttendees>
    <sharedExtendedProperty>{$ctx:sharedExtendedProperty}</sharedExtendedProperty>
    <timeMin>{$ctx:timeMin}</timeMin>
    <q>{$ctx:q}</q>
   	<iCalUID>{$ctx:iCalUID}</iCalUID>
    <privateExtendedProperty>{$ctx:privateExtendedProperty}</privateExtendedProperty>
    <showDeleted>{$ctx:showDeleted}</showDeleted>
   	<timeMax>{$ctx:timeMax}</timeMax>
   	<fields>{$ctx:fields}</fields>
    <updatedMin>{$ctx:updatedMin}</updatedMin>
</googlecalendar.listEvents>
Properties
  • alwaysIncludeEmail: Optional - Whether to always include a value in the email field for the organizer, creator and attendees, even if a valid email is not available. This means that a generated, non-working value will be provided. The use of this property is discouraged and should only be used when a value for the email field cannot be absent. The default value is False.
  • calendarId: Required - The calendar identifier. 
  • orderBy: Optional - The order of the events returned in the result. The default is an unspecified, stable order.
  • timeZone: Optional - The time zone used in the response. The default value is the time zone of the calendar.
  • singleEvents: Optional - Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves. The default value is False.
  • pageToken: Optional - Token specifying which result page to return.
  • showHiddenInvitations: Optional - Whether to include hidden invitations in the result. The default value is False.
  • maxResults: Optional - Maximum number of events returned on one result page.
  • maxAttendees: Optional - The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned.
  • sharedExtendedProperty: Optional - Extended properties constraint specified as propertyName=value. Matches only shared properties. This parameter might be repeated multiple times to return events that match all given constraints.
  • timeMin: Optional - Lower bound (inclusive) for an event's end time to filter by. The default is not to filter by end time.
  • q: Optional - Free text search terms to find events that match these terms in any field, except for extended properties.
  • iCalUID: Optional - Specifies iCalendar UID (iCalUID) of events to be included in the response.
  • privateExtendedProperty: Optional - Extended properties constraint specified as propertyName=value. Matches only private properties. This parameter might be repeated multiple times to return events that match all given constraints.
  • showDeleted: Optional - Whether to include deleted events with the canceled status in the result. Canceled instances of recurring events (but not the underlying recurring event) will still be included if the showDeleted property and singleEvents property are both False. If the showDeleted property and singleEvents property are both True, only single instances of deleted events (but not the underlying recurring events) are returned. The default value is False
  • timeMax: Optional - Upper bound (exclusive) for an event's start time to filter by. The default is not to filter by start time.
  • fields: Optional - Selector specifying which fields to include in a partial response.
  • updatedMin: Optional - Lower bound for an event's last modification time (as a RFC 3339 timestamp) to filter by. The default is not to filter by the last modification time.
Sample request

Following is a sample REST request that can be handled by the listEvents operation.

Sample Request for listEvents
 {
"apiUrl":"https://www.googleapis.com",
"accessToken":"ya29.1.AADtN_Xe5ANZsLYtIRq2Gx97ivcO9WkGkkmmsgqL1R7bSNknYzu8y0CqH9FG_zmscpJQEpLP",
"calendarId":"rimfjm16ep828l07n9pgg0qm68@group.calendar.google.com",
"fields":"accessRole,defaultReminders,description,items,kind,nextPageToken,summary,timeZone,updated",
"alwaysIncludeEmail":true,
"iCalUID":"",
"maxAttendees":100,
"maxResults":100,
"orderBy":"startTime",
"pageToken":"",
"q":"",
"privateExtendedProperty":"",
"sharedExtendedProperty":"",
"showDeleted":true,
"showHiddenInvitations":true,
"singleEvents":true,
"timeMax":"",
"timeMin":"",
"timeZone":"UTC",
"updatedMin":"",
"fields":"accessRole,defaultReminders,description,items,kind,nextPageToken,etag,summary,timeZone,updated"
}

Following is more information about the fields parameter in the sample request:    

  • fields: This includes values such as accessRole, defaultReminders, description, items, kind, nextPageToken, etag, summary, timeZone and updated.
Related Google Calendar documentation:

https://developers.google.com/google-apps/calendar/v3/reference/events/list

Moving an event

To move an event to another calendar, use googlecalendar.moveEvent and specify the relevant properties. This changes an event's organizer.

moveEvent
<googlecalendar.moveEvent>
	<calendarId>{$ctx:calendarId}</calendarId>
	<eventId>{$ctx:eventId}</eventId>
	<destination>{$ctx:destination}</destination>
    <sendNotifications>{$ctx:sendNotifications}</sendNotifications>    
    <fields>{$ctx:fields}</fields>    
</googlecalendar.moveEvent>
Properties
  • calendarId: Required - Calendar identifier of the source calendar where the event is currently.
  • eventId: Required - Event identifier.
  • destination: Required - Calendar identifier of the target calendar where the event is to be moved to.
  • sendNotifications: Optional - Whether to send notifications about the change of the event's organizer. The default value is False.
  • fields: Optional - Selector specifying which fields to include in a partial response.
Sample request

Following is a sample REST request that can be handled by the moveEvent operation.

Sample Request for moveEvent
 {
"apiUrl":"https://www.googleapis.com",
"accessToken":"ya29.1.AADtN_VsfmzdqOl6S4mFMadfBkJju_QFroZuP5AsWG2KpvzBkjaVnsqSwulCHzsWZA",
"calendarId":"rimfjm16ep828l07n9pgg0qm68@group.calendar.google.com",
"eventId":"idecatmre2quar3b6ojlaqdl60",
"destination":"pa76dcsrgf8o9udhaqnpqsmslc@group.calendar.google.com",
"sendNotifications":true,
"fields":"anyoneCanAddSelf,id,attendees,attendeesOmitted,colorId,created,creator(displayName,email,self),description,end,endTimeUnspecified,etag,extendedProperties,gadget,guestsCanInviteOthers,guestsCanModify,guestsCanSeeOtherGuests,hangoutLink,htmlLink,iCalUID,id,kind,location,locked,organizer,originalStartTime,privateCopy,recurrence,recurringEventId,reminders,sequence,source,start,status,summary,transparency,updated,visibility"
}

Following is more information about the fields parameter in the sample request:

  • fields: This includes values such as anyoneCanAddSelf, id, attendees, attendeesOmitted, colorId, created, creator (displayName, email, self), description, end, endTimeUnspecified, etag, extendedProperties, gadget, guestsCanInviteOthers, guestsCanModify, guestsCanSeeOtherGuests, hangoutLink, htmlLink, iCalUID, id, kind, location, locked, organizer, originalStartTime, privateCopy, recurrence, recurringEventId, reminders, sequence, source, start, status, summary, transparency, updated and visibility. 
Related Google Calendar documentation:

https://developers.google.com/google-apps/calendar/v3/reference/events/move

Updating an event (Patch)

To update an event and support patch semantics, use googlecalendar.patchEvents and specify the relevant properties.

patchEvents
<googlecalendar.patchEvents>
	<alwaysIncludeEmail>{$ctx:alwaysIncludeEmail}</alwaysIncludeEmail>
	<calendarId>{$ctx:calendarId}</calendarId>
	<sendNotifications>{$ctx:sendNotifications}</sendNotifications>
	<eventId>{$ctx:eventId}</eventId>
	<fields>{$ctx:fields}</fields>
	<maxAttendees>{$ctx:maxAttendees}</maxAttendees>		
	<anyoneCanAddSelf>{$ctx:anyoneCanAddSelf}</anyoneCanAddSelf>
	<attendees>{$ctx:attendees}</attendees>
	<attendeesOmitted>{$ctx:attendeesOmitted}</attendeesOmitted>
	<colorId>{$ctx:colorId}</colorId>
	<description>{$ctx:description}</description>
	<end>{$ctx:end}</end>
	<endTimeUnspecified>{$ctx:endTimeUnspecified}</endTimeUnspecified>
	<etag>{$ctx:etag}</etag>
	<extendedProperties>{$ctx:extendedProperties}</extendedProperties>
	<gadget>{$ctx:gadget}</gadget>
	<guestsCanInviteOthers>{$ctx:guestsCanInviteOthers}</guestsCanInviteOthers>
	<guestsCanSeeOtherGuests>{$ctx:guestsCanSeeOtherGuests}</guestsCanSeeOtherGuests>
	<iCalUID>{$ctx:iCalUID}</iCalUID>
	<id>{$ctx:id}</id>
	<kind>{$ctx:kind}</kind>
	<location>{$ctx:location}</location>
	<originalStartTime>{$ctx:originalStartTime}</originalStartTime>
	<privateCopy>{$ctx:privateCopy}</privateCopy>
	<recurrence>{$ctx:recurrence}</recurrence>
	<recurringEventId>{$ctx:recurringEventId}</recurringEventId>
	<reminders>{$ctx:reminders}</reminders>
	<sequence>{$ctx:sequence}</sequence>
	<source>{$ctx:source}</source>
	<start>{$ctx:start}</start>
	<status>{$ctx:status}</status>
	<summary>{$ctx:summary}</summary>
	<transparency>{$ctx:transparency}</transparency>
	<visibility>{$ctx:visibility}</visibility>	
 </googlecalendar.patchEvents>
Properties
  • alwaysIncludeEmail: Optional - Whether to always include a value in the email field for the organizer, creator and attendees, even if a valid email is not available. This means that a generated, non-working value will be provided. The use of this property is discouraged and should only be used when a value for the email field cannot be absent. The default value is False.
  • calendarId: Required - Calendar identifier.
  • sendNotifications: Optional - Whether to send notifications about the event update such as attendee's responses, title changes, etc. The default value is False.
  • eventId: Required - The event identifier.
  • fields: Selector specifying which fields to include in a partial response.
  • maxAttendees: Optional - The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned.
  • anyoneCanAddSelf: Optional - Whether anyone can invite themselves to the event. The default value is False.
  • attendees: Optional - The list of attendees of the event. 
  • attendeesOmitted: Optional - Whether attendees may have been omitted from the event's representation. When retrieving an event, this may be due to a restriction specified by the maxAttendees property. When updating an event, this can be used only to update the participant's response. The default value is False.
  • colorId: Optional - The identifier of the event color. This is the ID that refers to an entry in the Event section of the colors definition. For more information on this property, see colors endpoint.
  • description: Optional - The description of the event. To set an empty description, a space has to be sent as the description. i.e., description:" ".
  • end: Required - A nested object. Describes the exclusive end time of the event. For a recurring event, this is the end time of the first instance.
  • endTimeUnspecified: Whether the end time is actually unspecified. Even if the value of this propery is set to True, an end time is still provided for compatibility reasons. The default value is False.
  • etag: ETag of the resource.
  • extendedProperties: An object. Extended properties of the event.
  • gadget: An object. A gadget that extends this event.
  • guestsCanInviteOthers: Optional - Whether attendees other than the organizer can invite others to the event. The default value is True.
  • guestsCanSeeOtherGuests: Optional - Whether attendees other than the organizer can see the attendees of the event. The default value is True.
  • iCalUID: The event ID in the iCalendar format.
  • id: Identifier of the event. When creating a new single event or recurring events, you can specify their IDs. The IDs specified must adhere to the following rules:
    • Characters allowed in the ID are those used in base32hex encoding, i.e. lowercase letters a-v and digits 0-9, see section 3.1.2 in RFC2938.
    • The length of the ID must be between 5 and 1024 characters.
    • The ID must be unique per calendar.
      (Note: Due to the globally distributed nature of the system, we cannot guarantee that ID collisions will be detected at event creation time. To minimize the risk of collisions, we recommend using an established UUID algorithm such as the one described in  RFC4122.)
  • kind: The type of the resource.
  • location: Optional - The geographic location of the event as free-form text. To set an empty location, a space needs to be sent as the location. i.e.,location:" ".
  • originalStartTime: For an instance of a recurring event, this is the time at which the event would start according to the recurrence data in the recurring event identified by the recurringEventId property. Immutable.
  • privateCopy: Optional - Whether this is a private event copy where changes are not shared with other copies on other calendars. Immutable. The default is False.
  • recurrence: List of RRULE, EXRULE, RDATE and EXDATE lines for a recurring event. This field is omitted for single events or instances of recurring events.
  • recurringEventId: For an instance of a recurring event, this is the event ID of the recurring event itself. Immutable.
  • reminders: An object. Information about the event's reminders for the authenticated user.
  • sequence: Sequence number as per iCalendar.
  • source: An object. The source of an event from which it was created. For example, a web page, an email message or any document identifiable by a URL using the HTTP/HTTPS protocol. Accessible only by the creator of the event.
  • start: Required - A nested object. The inclusive start time of the event. For a recurring event, this is the start time of the first instance.
  • status: Optional - The status of the event.
  • summary: Optional - The title of the event. To set an empty summary, a space has to be sent as the summary. i.e., summary:" ".
  • transparency: Optional - Whether the event blocks time on the calendar.
  • visibility: Optional - Visibility of the event.
Sample request

Following is a sample REST request that can be handled by the patchEvents operation. 

Sample Request for patchEvents
{
	"apiUrl":"https://www.googleapis.com",
	"accessToken":"ya29.1.AADtN_VsfmzdqOl6S4mFMadfBkJju_QFroZuP5AsWG2KpvzBkjaVnsqSwulCHzsWZA",
	"calendarId":"4jcu43dbms1p4en0mpmcfgflis@group.calendar.google.com",
	"alwaysIncludeEmail":true,
	"maxAttendees":100,
	"sendNotifications":true,
	"fields":"anyoneCanAddSelf,attendees,creator,description,end,endTimeUnspecified,etag,gadget,guestsCanInviteOthers,guestsCanModify,guestsCanSeeOtherGuests,hangoutLink,htmlLink,iCalUID,id,kind,location,locked,organizer,originalStartTime,privateCopy,recurrence,recurringEventId,reminders,sequence,source,start,status,summary,transparency,updated,visibility",
	"params":{"id":"test"},
	"recurrence":["test1",
  	"test2"],
	"attendees":[{
    "displayName": "Name",
    "id": "id"
  	}
  ]
}

Following is more information about the parameters:

  • fields: Includes values such as anyoneCanAddSelf, attendees, attendeesOmitted, colorId, created, creator, description, end, endTimeUnspecified, etag, extendedProperties, gadget, guestsCanInviteOthers, guestsCanModify, guestsCanSeeOtherGuests, hangoutLink, htmlLink, iCalUID, id, kind, location, locked, organizer, originalStartTime, privateCopy, recurrence, recurringEventId, reminders, sequence, source, start, status, summary, transparency, updated and visibility.
  • attendees
    • email: Required - The attendee's email address, if available. This field must be present when adding an attendee.
    • additionalGuests: Optional - Number of additional guests. The default value is 0.
    • comment: Optional - The attendee's response comment.
    • displayName: Optional - The attendee's name, if available.
    • optional Optional - Whether this is an optional attendee. The default value is False.
    • responseStatus: The attendee's response status. Possible values are:
      • needsAction - The attendee has not responded to the invitation.
      • declined - The attendee has declined the invitation.
      • tentative - The attendee has tentatively accepted the invitation.
      • accepted - The attendee has accepted the invitation.
  • extendedProperties
    • private: An obejct. Properties that are private to the copy of the event that appears on this calendar.
      • key: The name of the private property and the corresponding value.
    • shared: An object.Properties that are shared between copies of the event on calendars of other attendees.
      • key: The name of the shared property and the corresponding value.
  • end
    • date: The date in the format yyyy-mm-dd, if it is an all-day event.
    • dateTime: The time, as a combined date-time value (formatted according to RFC 3339). A time zone offset is required unless a time zone is explicitly specified via the 'timeZone' property.
    • timeZone: Optional - The name of the time zone in which the time is specified. For example Europe/Zurich. The default value is the time zone of the calendar.
  • gadget
    • height: Optional - The height of the gadget in pixels.
    • iconLink: The icon URL of the gadget.
    • link: The URL of the gadget.
    • preferences:
      • key: The preference name and corresponding value.
    • title: The title of the gadget.
    • type: The type of the gadget.
    • width: Optional - The width of the gadget in pixels.
  • orginalStartTime
    • date: The date in the format yyyy-mm-dd, if this is an all-day event.
    • dateTime: The time, as a combined date-time value (formatted according to RFC 3339). A time zone offset is required unless a time zone is explicitly specified via the timeZone property.
    • timeZone: Optional. The name of the time zone in which the time is specified. For example Europe/Zurich. The default value is the time zone of the calendar.
  • reminders
    • overrides: If the event does not use the default reminders, this lists the reminders specific to the event. If not set, it indicates that no reminders are set for this event.
      • method: Required - The method used by this reminder. Possible values are:
        • email - Reminders are sent via email.
        • sms - Reminders are sent via SMS.
        • popup - Reminders are sent via a UI popup.
      • minute: Required - Number of minutes before the start of the event when the reminder should be triggered.
    • useDefault: Whether the default reminders of the calendar apply to the event.
  • source
    • title: The title of the source. For example a title of a web page or the title of an email subject.
    • url: The URL of the source pointing to a resource. The protocol of the URL must be HTTP or HTTPS.
  • start
    • date: The date in the format yyyy-mm-dd, if this is an all-day event.
    • dateTime: The time, as a combined date-time value (formatted according to RFC 3339). A time zone offset is required unless a time zone is explicitly specified via the timeZone property.
    • timeZone: Optional. The name of the time zone in which the time is specified. For example Europe/Zurich. The default value is the time zone of the calendar.
  • status: The possible values are:
    • confirmed - The event is confirmed. This is the default status.
    • tentative - The event is tentatively confirmed.
    • cancelled - The event is canceled.
  • visibility: The possible parameters are:
    • default -  Uses the default visibility for events on the calendar. This is the default value.
    • public - The event is public and the event details are visible to all readers of the calendar.
    • private - The event is private and only event attendees can view event details.
    • confidential- The event is private. This value is provided for compatibility reasons.
  • transparency: Possible values are:
    • opaque - The event blocks time on the calendar. This is the default value.
    • transparent - The event does not block time on the calendar.

Out of all the fields that are listed under Events resource, some fields are read-only.  Following is a list of fields specified as read-only fields in the API documentation.

  • created
  • creator
  • hangoutLink
  • htmlLink
  • locked
  • organizer
  • updated

Note

In the  patchEvent  operation, you cannot send values through the request for the read-only fields.

Related Google Calendar documentation:

https://developers.google.com/google-apps/calendar/v3/reference/events/patch

Updating an event

To update an event and support patch semantics, use googlecalendar.updateEvents and specify the relevant properties.

updateEvents
<googlecalendar.updateEvents>
    <alwaysIncludeEmail>{$ctx:alwaysIncludeEmail}</alwaysIncludeEmail>
    <calendarId>{$ctx:calendarId}</calendarId>
    <sendNotifications>{$ctx:sendNotifications}</sendNotifications>
    <eventId>{$ctx:eventId}</eventId>
    <fields>{$ctx:fields}</fields>
    <maxAttendees>{$ctx:maxAttendees}</maxAttendees>        
    <anyoneCanAddSelf>{$ctx:anyoneCanAddSelf}</anyoneCanAddSelf>
    <attendees>{$ctx:attendees}</attendees>
    <attendeesOmitted>{$ctx:attendeesOmitted}</attendeesOmitted>
    <colorId>{$ctx:colorId}</colorId>
    <description>{$ctx:description}</description>
    <end>{$ctx:end}</end>
    <endTimeUnspecified>{$ctx:endTimeUnspecified}</endTimeUnspecified>
    <etag>{$ctx:etag}</etag>
    <extendedProperties>{$ctx:extendedProperties}</extendedProperties>
    <gadget>{$ctx:gadget}</gadget>
    <guestsCanInviteOthers>{$ctx:guestsCanInviteOthers}</guestsCanInviteOthers>
    <guestsCanSeeOtherGuests>{$ctx:guestsCanSeeOtherGuests}</guestsCanSeeOtherGuests>
    <iCalUID>{$ctx:iCalUID}</iCalUID>
    <id>{$ctx:id}</id>
    <kind>{$ctx:kind}</kind>
    <location>{$ctx:location}</location>
    <originalStartTime>{$ctx:originalStartTime}</originalStartTime>
    <privateCopy>{$ctx:privateCopy}</privateCopy>
    <recurrence>{$ctx:recurrence}</recurrence>
    <recurringEventId>{$ctx:recurringEventId}</recurringEventId>
    <reminders>{$ctx:reminders}</reminders>
    <sequence>{$ctx:sequence}</sequence>
    <source>{$ctx:source}</source>
    <start>{$ctx:start}</start>
    <status>{$ctx:status}</status>
    <summary>{$ctx:summary}</summary>
    <transparency>{$ctx:transparency}</transparency>
    <visibility>{$ctx:visibility}</visibility>  
 </googlecalendar.updateEvents>

Properties
  • alwaysIncludeEmail: Optional - Whether to always include a value in the email field for the organizer, creator and attendees, even if a valid email is not available. This means that a generated, non-working value will be provided. The use of this property is discouraged and should only be used when a value for the email field cannot be absent. The default value is False.
  • calendarId: Required - Calendar identifier.
  • sendNotifications: Optional - Whether to send notifications about the event update such as attendee's responses, title changes, etc. The default value is False.
  • eventId: Required - The event identifier.
  • fields: Selector specifying which fields to include in a partial response.
  • maxAttendees: Optional - The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned.
  • anyoneCanAddSelf: Optional - Whether anyone can invite themselves to the event. The default value is False.
  • attendees: Optional - The list of attendees of the event. 
  • attendeesOmitted: Optional - Whether attendees may have been omitted from the event's representation. When retrieving an event, this may be due to a restriction specified by the maxAttendees property. When updating an event, this can be used only to update the participant's response. The default value is False.
  • colorId: Optional - The identifier of the event color. This is the ID that refers to an entry in the Event section of the colors definition. For more information on this property, see colors endpoint.
  • description: Optional - The description of the event. To set an empty description, a space has to be sent as the description. i.e., description:" ".
  • end: Required - A nested object. Describes the exclusive end time of the event. For a recurring event, this is the end time of the first instance.
  • endTimeUnspecified: Whether the end time is actually unspecified. Even if the value of this propery is set to True, an end time is still provided for compatibility reasons. The default value is False.
  • etag: ETag of the resource.
  • extendedProperties: An object. Extended properties of the event.
  • gadget: An object. A gadget that extends this event.
  • guestsCanInviteOthers: Optional - Whether attendees other than the organizer can invite others to the event. The default value is True.
  • guestsCanSeeOtherGuests: Optional - Whether attendees other than the organizer can see the attendees of the event. The default value is True.
  • iCalUID: The event ID in the iCalendar format.
  • id: Identifier of the event. When creating a new single event or recurring events, you can specify their IDs. The IDs specified must adhere to the following rules:
    • Characters allowed in the ID are those used in base32hex encoding, i.e. lowercase letters a-v and digits 0-9, see section 3.1.2 in RFC2938.
    • The length of the ID must be between 5 and 1024 characters.
    • The ID must be unique per calendar.
      (Note: Due to the globally distributed nature of the system, we cannot guarantee that ID collisions will be detected at event creation time. To minimize the risk of collisions, we recommend using an established UUID algorithm such as the one described in  RFC4122.)
  • kind: The type of the resource.
  • location: Optional - The geographic location of the event as free-form text. To set an empty location, a space needs to be sent as the location. i.e.,location:" ".
  • originalStartTime: For an instance of a recurring event, this is the time at which the event would start according to the recurrence data in the recurring event identified by the recurringEventId property. Immutable.
  • privateCopy: Optional - Whether this is a private event copy where changes are not shared with other copies on other calendars. Immutable. The default is False.
  • recurrence: List of RRULE, EXRULE, RDATE and EXDATE lines for a recurring event. This field is omitted for single events or instances of recurring events.
  • recurringEventId: For an instance of a recurring event, this is the event ID of the recurring event itself. Immutable.
  • reminders: An object. Information about the event's reminders for the authenticated user.
  • sequence: Sequence number as per iCalendar.
  • source: An object. The source of an event from which it was created. For example, a web page, an email message or any document identifiable by a URL using the HTTP/HTTPS protocol. Accessible only by the creator of the event.
  • start: Required - A nested object. The inclusive start time of the event. For a recurring event, this is the start time of the first instance.
  • status: Optional - The status of the event.
  • summary: Optional - The title of the event. To set an empty summary, a space has to be sent as the summary. i.e., summary:" ".
  • transparency: Optional - Whether the event blocks time on the calendar.
  • visibility: Optional - Visibility of the event.
Sample request

Following is a sample REST request that can be handled by the updateEvents operation.

Sample Request for updateEvents
{
    "apiUrl":"https://www.googleapis.com",
    "accessToken":"ya29.1.AADtN_VsfmzdqOl6S4mFMadfBkJju_QFroZuP5AsWG2KpvzBkjaVnsqSwulCHzsWZA",
    "calendarId":"4jcu43dbms1p4en0mpmcfgflis@group.calendar.google.com",
    "alwaysIncludeEmail":true,
    "maxAttendees":100,
    "sendNotifications":true,
    "fields":"anyoneCanAddSelf,attendees,creator,description,end,endTimeUnspecified,etag,gadget,guestsCanInviteOthers,guestsCanModify,guestsCanSeeOtherGuests,hangoutLink,htmlLink,iCalUID,id,kind,location,locked,organizer,originalStartTime,privateCopy,recurrence,recurringEventId,reminders,sequence,source,start,status,summary,transparency,updated,visibility",
    "params":{"id":"test"},
    "recurrence":["test1",
    "test2"],
    "attendees":[{
    "displayName": "Name",
    "id": "id"
    }
  ]
}
Related Google Calendar documentation:

https://developers.google.com/google-apps/calendar/v3/reference/events/update

Sample configuration

Following is a sample proxy service that illustrates how to connect to Google Calendar with the init operation as well as how to use the createQuickAddEvents operation to create an event based on a simple text string.

To view the sample request for this proxy, see sample request for the createQuickAddEvents operation. You can use this sample as a template for using other operations in this category.

As a best practice, create a separate sequence for handling the response payload for errors. In the following sample, this sequence is faultHandlerSeq.

Sample Proxy
<proxy xmlns="http://ws.apache.org/ns/synapse" name="googlecalendar_createQuickAddEvents" transports="https,http" statistics="disable" trace="disable" startOnLoad="true">
  <target>
    <inSequence onError="faultHandlerSeq">
	  <property name="apiUrl" expression="json-eval($.apiUrl)"/>
      <property name="accessToken" expression="json-eval($.accessToken)"/>
      <property name="calendarId" expression="json-eval($.calendarId)"/>
      <property name="text" expression="json-eval($.text)"/>
      <property name="sendNotifications" expression="json-eval($.sendNotifications)"/>
      <property name="fields" expression="json-eval($.fields)"/>
      <googlecalendar.init>
      <apiUrl>{$ctx:apiUrl}</apiUrl>
      <accessToken>{$ctx:accessToken}</accessToken>
      </googlecalendar.init>
      <googlecalendar.createQuickAddEvents>
        <text>{$ctx:text}</text>
        <calendarId>{$ctx:calendarId}</calendarId>
        <sendNotifications>{$ctx:sendNotifications}</sendNotifications>
        <fields>{$ctx:fields}</fields>
      </googlecalendar.createQuickAddEvents>
	  <respond></respond>
    </inSequence>
    <outSequence>
      <send></send>
    </outSequence>
	<faultSequence>
		 <property name="ERROR_CODE" value="600500"/>
		 <property name="ERROR_MESSAGE" value="Internal Server Error"/>
		 <property name="messageType" value="application/json" scope="axis2"/>
         <sequence key="faultHandlerSeq"/>
    </faultSequence>
  </target>
</proxy>