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.
URL:
http://{domain_name}/{rest_context_name}/private/v1/calendar/calendars/{id}/events
Supported Format: JSON
Parameters:
Required (path parameters):
Parameter | Description |
---|---|
id | Identity of a calendar to search for events. |
Optional (query parameters):
Parameter | Description |
---|---|
startTime | Date that complies ISO8601 (YYYY-MM-DDThh:mm:ssTZD). Search for events from this date. Default: current server time. |
endTime | Date that complies ISO8601 (YYYY-MM-DDThh:mm:ssTZD). Search for events to this date. Default: current server time + 1 week. |
category | Search for this category only. If not specified, search events of all categories. |
offset | The starting point when paging the result. Default is 0. |
limit | Maximum number of events returned. If omitted or exceeds the query limit parameter configured for the class, query limit is used instead. |
fields | Comma-separated list of selective event properties to be returned. All returned if not specified. |
jsonp | The name of a JavaScript function to be used as the JSONP callback. If not specified, only JSON object is returned. |
expand | Used to ask for more attributes of a sub-resource, instead of its link only. This is a comma-separated list of event attribute names. For example: expand=calendar,categories. In case of collections, you can specify offset (default: 0), limit (default: querylimit ). For example, expand=categories(1,5). Instead of: { "calendar": "http://localhost:8080/rest/private/v1/calendar/calendars/john-defaultCalendarId", } It returns: { "calendar": { "editPermission": "", "viewPermission": "", "privateURL": null, "publicURL": null, "icsURL": "http://localhost:8080/rest/private/v1/calendar/calendars/john-defaultCalendarId/ics", "description": null, "color": "asparagus", "timeZone": "Europe/Brussels", "name": "John Smith", "type": "0", "owner": "john", "groups": null, "href": "http://localhost:8080/rest/private/v1/calendar/calendars/john-defaultCalendarId", "id": "john-defaultCalendarId" }, } |
returnSize | Default is false. If set to true, the total number of matched calendars will be returned in JSON, and a "Link" header is added. This header contains "first", "last", "next" and "previous" links. |
Request example:
{@code GET: http://localhost:8080/rest/private/v1/calendar/calendars/myCalId/events?category=meeting&expand=calendar,categories(1,5)}
Response:
{ "limit": 10, "data": [ { "to": "2015-07-24T01:30:00.000Z", "attachments": [], "from": "2015-07-24T01:00:00.000Z", "categories": [ "http://localhost:8080/rest/private/v1/calendar/categories/defaultEventCategoryIdAll" ], "categoryId": "defaultEventCategoryIdAll", "availability": "busy", "repeat": {}, "reminder": [], "privacy": "private", "recurrenceId": null, "participants": [ "john" ], "originalEvent": null, "description": null, "calendar": "http://localhost:8080/rest/private/v1/calendar/calendars/john-defaultCalendarId", "subject": "event123", "location": null, "priority": "none", "href": "http://localhost:8080/rest/private/v1/calendar/events/Eventa9c5b87b7f00010178ce661a6beb020d", "id": "Eventa9c5b87b7f00010178ce661a6beb020d" } ], "size": -1, "offset": 0 }