CalendarServiceImpl

This group contains the following resources:

/calendar/events

URI: /api/v1/calendar/events

GET

Get the events of the calendar. If there isn't any parameter it return all the events of the current week. The user must have given the application the grant READ to use these operation.

Parameters

Name Description Type Default Value
start Start date in ISO8601 format (optional). If end parameter is not informed it returns the events of the next 30 days. query
end End date in IS08601 format (optional). If start parameter is not informed it returns the events of the previous 30 days. query

Response Body

element: eventList
EventList object with calendar's events. Represents a list of events
Properties
Property Type Description
events array of (event) Event list.

Status Codes - Errors

The HTTP call return a status code depending on the result of the operation. These codes are listed below
Code Description
200 Success Call
401 Not authorized. Maybe you have to authorize the user o the OAuth token has expired

Example

HTTP Call Example
GET http://denver.uoc.es:8080/webapps/uocapi/v1/calendar/events
Response Example (XML)
<?xml version="1.0" encoding="UTF-8"?> <eventList> <events> <id>...</id> <url>...</url> <summary>...</summary> <start>...</start> <end>...</end> </events> <events> <!--...--> </events> <!--...more "events" elements...--> </eventList>
Response Example (JSON)
{ "events" : [ { "id" : "...", "url" : "...", "summary" : "...", "start" : "...", "end" : "..." }, ... ] }

Links

iOS: https://github.com/UOC/openapidemos/tree/master/Exemple%20CalendarEventsGet  

POST

Creates a new event. The user must have given the application the grant WRITE to use these operation.

Request Body

element: event
Event to create.

Response Body

element: event
Event created. Represents an event of the calendar.
Properties
Property Type Description
id string Identifier of the event.
url string URL of the event.
summary string Summary of the event.
start dateTime Start date.
end dateTime End date.

Status Codes - Errors

The HTTP call return a status code depending on the result of the operation. These codes are listed below
Code Description
200 Success Call
401 Not authorized. Maybe you have to authorize the user o the OAuth token has expired

Example

HTTP Call Example
POST http://denver.uoc.es:8080/webapps/uocapi/v1/calendar/events
Response Example (XML)
<?xml version="1.0" encoding="UTF-8"?> <event> <id>...</id> <url>...</url> <summary>...</summary> <start>...</start> <end>...</end> </event>
Response Example (JSON)
{ "id" : "...", "url" : "...", "summary" : "...", "start" : "...", "end" : "..." }

Links

iOS: https://github.com/UOC/openapidemos/tree/master/Exemple%20CalendarEventsPost

/calendar/events/{id}

URI: /api/v1/calendar/events/{id}

GET

Get an event from the calendar. The event's date must be between the current date and 6 months earlier. The user must have given the application the grant READ to use these operation.

Parameters

Name Description Type Default Value
id Event identifier. path

Response Body

element: event
Event object with event's data or null if event can't be found. Represents an event of the calendar.
Properties
Property Type Description
id string Identifier of the event.
url string URL of the event.
summary string Summary of the event.
start dateTime Start date.
end dateTime End date.

Status Codes - Errors

The HTTP call return a status code depending on the result of the operation. These codes are listed below
Code Description
200 Success Call
401 Not authorized. Maybe you have to authorize the user o the OAuth token has expired

Example

HTTP Call Example
GET http://denver.uoc.es:8080/webapps/uocapi/v1/calendar/events/123
Response Example (XML)
<?xml version="1.0" encoding="UTF-8"?> <event> <id>...</id> <url>...</url> <summary>...</summary> <start>...</start> <end>...</end> </event>
Response Example (JSON)
{ "id" : "...", "url" : "...", "summary" : "...", "start" : "...", "end" : "..." }

Links

iOS: https://github.com/UOC/openapidemos/tree/master/Exemple%20CalendarEventsIdGet