Community Website

Calendar Resources

Calendar Rest services (V1)

Calendar Rest services (V1)

The document is currently under review. New versions will be deployed regularly.

This rest service class provides entry point for calendar resources.

Resource Description
GET /v1/calendar/ Returns all the available sub-resources of this API in JSON.
GET /v1/calendar/calendars/ Searches for calendars by a type (personal/group/shared), returns calendars that the user has access permission.
POST /v1/calendar/calendars/ Creates a calendar based on calendar attributes sent in the request body. Can be personal or group calendar. This accepts HTTP POST request, with JSON object (cal) represents a CalendarResource. Example: { name: "Calendar name", description: "Description of the calendar" }
GET /v1/calendar/calendars/{id} Search for a calendar by its id, in one of conditions: The authenticated user is the owner of the calendar, OR the user belongs to the group of the calendar, OR the calendar has been shared with the user or with a group of the user.
PUT /v1/calendar/calendars/{id} Update a calendar specified by id, in one of conditions: the authenticated user is the owner of the calendar, OR for group calendars, the authenticated user has edit permission on the calendar. This accepts HTTP PUT request, with JSON object (calObj) in the request body, and calendar id in the path. All the attributes of JSON object are optional, any absent/invalid ones will be ignored. id, href and URLs attributes are Read-only.
DELETE /v1/calendar/calendars/{id} Deletes a calendar specified by id, in one of conditions: - the authenticated user is the owner of the calendar. - for group calendars, the authenticated user has edit permission on the calendar. - if it is a shared calendar, the calendar is not shared anymore (but not deleted).
GET /v1/calendar/calendars/{id}/ics Exports a calendar specified by id into iCal formated file, with one of conditions: The calendar is public, OR the authenticated user is the owner of the calendar, OR the user belongs to the group of the calendar, OR the calendar has been shared with the user or with a group of the user.
GET /v1/calendar/events/{id} Searches for an event by id, in one of conditions: The calendar of the event is public, OR the authenticated user is the owner of the calendar, OR the user belongs to the group of the calendar, OR the user is a participant of the event, OR the calendar of the event has been shared with the user or with a group of the user.
PUT /v1/calendar/events/{id} Updates an event specified by id, in one of conditions: The authenticated user is the owner of the calendar of the event, OR for group calendars, the user has edit permission on the calendar, OR the calendar has been shared with the user, with edit permission, OR the calendar has been shared with a group of the user, with edit permission. This accepts HTTP PUT request, with JSON object (evObject) in the request body, and event id in the path. All the attributes of JSON object are optional, any absent/invalid ones will be ignored. Read-only attributes: id and href, originalEvent, calendar, recurrentId will be ignored too.
DELETE /v1/calendar/events/{id} Deletes an event specified by id, in one of conditions: The authenticated user is the owner of the calendar of the event, OR for group calendars, the user has edit permission on the calendar, OR the calendar has been shared with the user, with edit permission, OR the calendar has been shared with a group of the user, with edit permission.
GET /v1/calendar/events/{id}/attachments Returns attachments of an event specified by event id, in one of conditions: The calendar of the event is public, OR the authenticated user is the owner of the calendar, OR the user belongs to the group of the calendar, OR the user is a participant of the event, OR the calendar has been shared with the user or with a group of the user.
POST /v1/calendar/events/{id}/attachments Creates attachments for an event specified by id, in one of conditions: The authenticated user is the owner of the calendar of the event, OR for group calendars, the user has edit permission on the calendar, OR the calendar has been shared with the user, with edit permission, OR the calendar has been shared with a group of the user, with edit permission. This accepts HTTP POST request, with files in HTTP form submit request, and the event id in path.
GET /v1/calendar/calendars/{id}/events Returns events of a calendar specified by id, in one of conditions: The calendar is public, OR the authenticated user is the owner of the calendar, OR the user belongs to the group of the calendar, OR the user is a participant of the event, OR the calendar has been shared with the user or with a group of the user.
POST /v1/calendar/calendars/{id}/events Creates an event in a calendar specified by id, in one of conditions: The authenticated user is the owner of the calendar, OR for group calendars, the user has edit permission on the calendar, OR the calendar has been shared with the user, with edit permission, OR the calendar has been shared with a group of the user, with edit permission. This accepts HTTP POST request, with JSON object (evObject) in the request body.
GET /v1/calendar/events/{id}/occurrences Returns occurrences of a recurring event specified by id, in one of conditions: the calendar of the event is public, OR the authenticated user is the owner of the calendar, OR the user belongs to the group of the calendar, OR the user is a participant of the event, OR the calendar has been shared with the user or with a group of the user.
GET /v1/calendar/calendars/{id}/tasks Returns tasks of a calendar specified by id, in one of conditions: The calendar is public, OR the authenticated user is the owner of the calendar, OR the user belongs to the group of the calendar, OR the task is delegated to the user, OR the calendar has been shared with the user or with a group of the user.
POST /v1/calendar/calendars/{id}/tasks Creates a task for a calendar specified by id, in one of conditions: The user is the owner of the calendar, OR for group calendars, the user has edit permission on the calendar, OR the calendar has been shared with the user, with edit permission, OR the calendar has been shared with a group of the user, with edit permission. This accepts HTTP POST request, with JSON object (evObject) in the request body. Example: { "name": "...", "note": "...", "categoryId": "", "from": "...", "to": "...", "delegation": "...", "", "priority": "", "reminder": , "status": "" }
GET /v1/calendar/tasks/{id} Returns a task specified by id, in one of conditions: the calendar of the task is public; OR the authenticated user is the owner of the calendar; OR the user belongs to the group of the calendar; OR the task is delegated to the user; OR the calendar has been shared with the user or with a group of the user.
PUT /v1/calendar/tasks/{id} Updates a task specified by id, in one of conditions: the calendar of the task is public, OR the authenticated user is the owner of the calendar, OR the user belongs to the group of the calendar, OR the task is delegated to the user, OR the calendar has been shared with the user or with a group of the user. This accepts HTTP PUT request, with JSON object (evObject) in the request body, and task id in the path. All the attributes are optional, any absent/invalid attributes will be ignored. id, href, calendar are Read-only. For example: { "name": "...", "note": "...", "categoryId": "", "from": "...", "to": "...", "delegation": "...", "", "priority": "", "reminder": , "status": "" }
DELETE /v1/calendar/tasks/{id} Deletes a task specified by id, in one of conditions: the calendar of the task is public; OR the authenticated user is the owner of the calendar; OR the user belongs to the group of the calendar; OR the task is delegated to the user; OR the calendar has been shared with the user or with a group of the user.
GET /v1/calendar/attachments/{id} Queries an attachment (of an event/task) by attachment id, in one of conditions: The calendar of the event/task is public, OR the authenticated user is the owner of the calendar, OR the user belongs to the group of the calendar, OR the user is a participant of the event or is delegated to the task, OR the calendar has been shared with the user or with a group of the user.
DELETE /v1/calendar/attachments/{id} Deletes an attachment (of an event/task) specified by attachment id, in one of conditions: The calendar of the event/task is public, OR the authenticated user is the owner of the calendar, OR the user belongs to the group of the calendar, OR the user is a participant of the event or is delegated to the task, OR the calendar has been shared with the user or with a group of the user.
GET /v1/calendar/categories Returns the categories (common and personal categories).
GET /v1/calendar/categories/{id} Returns a category specified by id if it is a common category or is a personal category of the user.
GET /v1/calendar/feeds/{id} Gets a feed with the given id. The user must be the owner of the feed.
PUT /v1/calendar/feeds/{id} Updates a feed with the given id. The user must be the owner of the feed. This accepts HTTP PUT request, with JSON object (feedResource) in the request body, and feed id in the path. All the feed attributes are optional, any absent/invalid attributes will be ignored. id and href are auto-generated and cannot be edited by the users. For example: { "name": "..", "calendarIds": "...", "..." }
DELETE /v1/calendar/feeds/{id} Deletes a feed with the given id. The user must be the owner of the feed.
GET /v1/calendar/feeds/{id}/rss Gets the RSS stream of a feed with the given id. The user must be the owner of the feed.
GET /v1/calendar/invitations/{id} Returns an invitation with specified id if one of conditions: The authenticated user is the participant of the invitation, OR the user has edit permission on the calendar of the event of the invitation.
PUT /v1/calendar/invitations/{id} Replies to an invitation specified by id. The user must be the invitee.
DELETE /v1/calendar/invitations/{id} Deletes an invitation with specified id. The authenticated user must have edit permission on the calendar.
GET /v1/calendar/events/{id}/invitations/ Returns invitations of an event specified by id when: the authenticated user is the participant of the invitation, OR the authenticated user has edit permission on the calendar of the event.
POST /v1/calendar/events/{id}/invitations/ Creates an invitation in an event specified by event id, in one of conditions: the authenticated user is the participant of the event, OR the authenticated user has edit permission on the calendar of the event. This accepts invitation resource in request body, for example : {"participant":"root","status":""}.
Calendar Web services (DEPRECATED)

Calendar Web services (DEPRECATED)

This API is deprecated. Use the Calendar Rest services V1 instead!

The CalendarWebservice class contains services to interact with the Calendar application and its data in a RESTFull manner. These services are accessible applications inside and outside eXo Platform. For example, Gadgets and Mobile applications can use them.

Resource Description
GET /cs/calendar/checkPermission/{username}/{calendarId}/{type}/ Checks permission of the currently logged-in user on any calendar by the given calendar Id. The input parameters will be in the URL of the calendar.
GET /cs/calendar/event/{username}/{eventFeedName}/ Provides details of an event with the given username and the event Id. The returned data is in the XML format containing the details of the event, including the link to the event's ICS file.
GET /cs/calendar/feed/{username}/{feedname}/{filename}/ Returns the XML RSS feed data of one user's calendar.
GET /cs/calendar/subscribe/{username}/{calendarId}/{type} Provides an end-point to subscribe a calendar of the platform.
GET /cs/calendar/{username}/{calendarId}/{type} Generates the ICalendar data from a given calendar Id. The data content will be all events of the calendar. This service requires authentication and permission of the Users group only.
GET /cs/calendar/events/personal/{type}/{calids}/{from}/{to}/{limit} Gets a list of personal events by their type, calendar Ids, the starting/ending time, and the maximum number of returned events. This service requires authentication and permission of the Users group only.
GET /cs/calendar/getissues/{currentdatetime}/{type}/{limit} Lists upcoming events or tasks by the current date. This service requires authentication and permission of the Users group only.
GET /cs/calendar/updatestatus/{taskid}/{statusid} Allows users to update the status of a task. This service requires authentication and permission of the Users group only.
GET /cs/calendar/getcalendars Retrieves all data of a private (personal) calendar of a logged-in user. It requires authentication and permission of the Users group only.
GET /cs/calendar/getevent/{eventid} Produces the content of a given private event, based on its Id. It requires authentication and permission of the Users group only.
GET /cs/calendar/geteventbyid/{eventid} Returns the details of an event identified by its Id. It requires authentication and permission of the Users group only.
GET /cs/calendar/getoccurrence/{eventid}/{recurid} Produces the content of an occurrence of a repetitive event, based on its event Id and occurrence Id. It requires authentication and permission of the Users group only.
GET /cs/calendar/invitation/{calendarId}/{calType}/{eventId}/{inviter}/{invitee}/{eXoId}/{answer} Provides the end-point to answer or reply an invitation to join any given event by its Id.
Community Website
Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus