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.

URL:

http://{domain_name}/{rest_context_name}/private/v1/calendar/calendars/{id}/tasks

Supported Format: JSON

Parameters:

  • Required (path parameters):

Parameter Description
id Identity of the calendar.
  • Optional (query parameters):

Parameter Description
startTime Date complies ISO8601 (YYYY-MM-DDThh:mm:ssTZD). Search for tasks from this date. Default: current server time.
endTime Date complies ISO8601 (YYYY-MM-DDThh:mm:ssTZD). Search for tasks to this date. Default: current server time + 1 week.
category Filter the tasks by this category if specified.
offset The starting point when paging the result. Default is 0.
limit Maximum number of tasks returned. If omitted or exceeds the query limit parameter configured for the class, query limit is used instead.
fields Comma-separated list of selective task attributes 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 property 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:

 GET: {@code http://localhost:8080/rest/private/v1/calendar/myCalId/tasks?category=meeting&expand=calendar,categories(1,5)}

Response:

 {
   "limit": 10,
   "data": [
     {
       "to": "2015-07-18T12:00:00.000Z",
       "attachments": [],
       "from": "2015-07-18T11:30:00.000Z",
       "categories": [
         "http://localhost:8080/rest/private/v1/calendar/categories/defaultEventCategoryIdAll"
       ],
       "categoryId": "defaultEventCategoryIdAll",
       "reminder": [],
       "delegation": [
         "john"
       ],
       "calendar": "http://localhost:8080/rest/private/v1/calendar/calendars/john-defaultCalendarId",
       "name": "caramazov",
       "priority": "none",
       "note": null,
       "status": "",
       "href": "http://localhost:8080/rest/private/v1/calendar/tasks/Event99f63db07f0001016dd7a4b4e0e7125c",
       "id": "Event99f63db07f0001016dd7a4b4e0e7125c"
     }
   ],
   "size": -1,
   "offset": 0
 }

Copyright ©2018. All rights reserved. eXo Platform SAS
blog comments powered byDisqus