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 Calendar Events in Teamwork
Overview
The following operations allow you to work with calendar events. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with attachments, see Sample configuration.
Operation | Description |
---|---|
createEvent | Create a calendar event. |
updateEvent | Edit a calendar event. |
deleteEvent | Delete a calendar event. |
getEvent | Returns the details about a specific event. |
getAllEvents | Returns all calendar events. |
getAllEventTypes | Returns details about event types. |
Operation details
This section provides further details on the operations related to discussions.
Creating an event
The create
Event operation creates a new calendar event.
<teamwork.createEvent> <start>{$ctx:start}</start> <end>{$ctx:end}</end> <allDay>{$ctx:allDay}</allDay> <title>{$ctx:title}</title> <description>{$ctx:description}</description> <where>{$ctx:where}</where> <type>{$ctx:type}</type> <projectId>{$ctx:projectId}</projectId> <showAsBusy>{$ctx:showAsBusy}</showAsBusy> <id>{$ctx:id}</id> <attendingUserIds>{$ctx:attendingUserIds}</attendingUserIds> <notifyUserIds>{$ctx:notifyUserIds}</notifyUserIds> <attendeesCanEdit>{$ctx:attendeesCanEdit}</attendeesCanEdit> <projectUsersCanEdit>{$ctx:projectUsersCanEdit}</projectUsersCanEdit> <reminderType>{$ctx:reminderType}</reminderType> <period>{$ctx:period}</period> <before>{$ctx:before}</before> </teamwork.createEvent>
Properties
start
: The start time of the event(YYYY-MM-DDThh:mm:ss).end
: The end time of the event(YYYY-MM-DDThh:mm:ss).allDay
:Whether the event last all day(true/false).title
: The title of the event.description
: The description of the event.where
:The venue of the event.type
:The type of the event.projectId
: The project id of the event.showAsBusy
:Whether show as busy(true/false).id
: The numeric calendarEventType id.attendinUserIds
: The attending user ids of the event.notifyUserIds
: The notify user ids of the event.attendeesCanEdit
: Whether attendees can edit(true/false).projectUsersCanEdit
: Whether project users can edit(true/false).reminderType
: The reminder type of the event(sms,email).period
: The period of the event(minutes,hours,days,weeks).before
: The numeric value of time to remind.
Sample Request
Following is a sample REST/JSON request that can be handled by the createEvent
operation.
{ "apiUrl":"https://wso2test.teamwork.com/", "apiKey":"clark42ceiling", "start": "2014-12-02T00:00", "end": "2014-12-03T00:00", "allDay": "true", "title": "CodeHour", "description": "Some event description", "where": "Some location", "type": "company", "projectId": "0", "showAsBusy": "true", "id": "0", "attendingUserIds": "149146", "notifyUserIds": "149195", "attendeesCanEdit": "false", "projectUsersCanEdit": "false", "reminderType": "sms", "period": "minutes", "before": "15" }
Related Teamwork documentation
http://developer.teamwork.com/events#create_event
Updating an event
The update
Event operation updates a calendar event.
<teamwork.updateEvent> <eventId>{$ctx:eventId}</eventId> <start>{$ctx:start}</start> <end>{$ctx:end}</end> <allDay>{$ctx:allDay}</allDay> <title>{$ctx:title}</title> <description>{$ctx:description}</description> <where>{$ctx:where}</where> <type>{$ctx:type}</type> <projectId>{$ctx:projectId}</projectId> <showAsBusy>{$ctx:showAsBusy}</showAsBusy> <id>{$ctx:id}</id> <attendingUserIds>{$ctx:attendingUserIds}</attendingUserIds> <notifyUserIds>{$ctx:notifyUserIds}</notifyUserIds> <attendeesCanEdit>{$ctx:attendeesCanEdit}</attendeesCanEdit> <projectUsersCanEdit>{$ctx:projectUsersCanEdit}</projectUsersCanEdit> <reminderType>{$ctx:reminderType}</reminderType> <period>{$ctx:period}</period> <before>{$ctx:before}</before> </teamwork.updateEvent>
Properties
eventId
: The id of the event.start
: The start time of the event(YYYY-MM-DDThh:mm:ss).end
: The end time of the event(YYYY-MM-DDThh:mm:ss).allDay
:Whether the event last all day(true/false).title
: The title of the event.description
: The description of the event.where
:The venue of the event.type
:The type of the event.projectId
: The project id of the event.showAsBusy
:Whether show as busy(true/false).id
: The numeric calendarEventType id.attendinUserIds
: The attending user ids of the event.notifyUserIds
: The notify user ids of the event.attendeesCanEdit
: Whether attendees can edit(true/false).projectUsersCanEdit
: Whether project users can edit(true/false).reminderType
: The reminder type of the event(sms,email).period
: The period of the event(minutes,hours,days,weeks).before
: The numeric value of time to remind.
Sample Request
Following is a sample REST/JSON request that can be handled by the updateEvent
operation.
{ "apiUrl":"https://wso2test.teamwork.com/", "apiKey":"clark42ceiling", "eventId":"236267", "start": "2014-12-02T00:00", "end": "2014-12-03T00:00", "allDay": "true", "title": "CodeHour", "description": "Some event description", "where": "Some location", "type": "company", "projectId": "0", "showAsBusy": "true", "id": "0", "attendingUserIds": "149146", "notifyUserIds": "149195", "attendeesCanEdit": "false", "projectUsersCanEdit": "false", "reminderType": "sms", "period": "minutes", "before": "15" }
Related Teamwork documentation
http://developer.teamwork.com/events#edit_event
Deleting an event
The delete
Event operation deletes a calendar event.
<teamwork.deleteEvent> <eventId>{$ctx:eventId}</eventId> </teamwork.deleteEvent>
Properties
eventId
: The id of the event.
Sample Request
Following is a sample REST/JSON request that can be handled by the deleteEvent
operation.
{ "apiUrl":"https://wso2test.teamwork.com/", "apiKey":"clark42ceiling", "eventId":"236267" }
Related Teamwork documentation
http://developer.teamwork.com/events#delete_event
Retrieving an event
The getEvent
operation retrieves the event of given id.
<teamwork.getEvent> <eventId>{$ctx:eventId}</eventId> </teamwork.getEvent>
Properties
eventId
: The id of the event.
Sample Request
Following is a sample REST/JSON request that can be handled by the getEvent
operation.
{ "apiUrl":"https://wso2test.teamwork.com/", "apiKey":"clark42ceiling", "eventId":"236267" }
Related Teamwork documentation
http://developer.teamwork.com/events#get_an_event
Retrieving all events
The getAllEvents
operation retrieves all the calendar events.
<teamwork.getAllEvents> <startDate>{$ctx:startDate}</startDate> <endDate>{$ctx:endDate}</endDate> <showDeleted>{$ctx:showDeleted}</showDeleted> <updatedAfterDate>{$ctx:updatedAfterDate}</updatedAfterDate> <page>{$ctx:page}</page> </teamwork.getAllEvents>
Properties
startDate
: The start date of the event(YYYYMMDD).endDate
: The end date of the event(YYYYMMDD).showDeleted:whether show the deleted events(true/false).
UpdatedAfterDate
: The date of events updated(YYYYMMDDHHMMSS).page
: The page no.
Sample Request
Following is a sample REST/JSON request that can be handled by the getEvents
operation.
{ "apiUrl":"https://wso2test.teamwork.com/", "apiKey":"clark42ceiling", "startDate":"20140101", "endDate":"20141201", "showDeleted":"true", "updatedAfterDate":"20140901102435", "page":"1" }
Related Teamwork documentation
http://developer.teamwork.com/events#get_events
Retrieving all event types
The getAllEventTypes
operation retrieves all the event types.
<teamwork.getAllEventTypes/>
Sample Request
Following is a sample REST/JSON request that can be handled by the getAllEventTypes
operation.
{ "apiUrl":"https://wso2test.teamwork.com/", "apiKey":"clark42ceiling" }
Related Teamwork documentation
http://developer.teamwork.com/events#get_event_types
Sample configuration
Following is a sample proxy service that illustrates how to connect to Teamwork with the init
operation and use the createEvent
operation. The sample request for this proxy can be found in createEvent sample request. You can use this sample as a template for using other operations in this category.
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="tw_createEvent" transports="https http" startOnLoad="true" trace="disable"> <description/> <target> <inSequence> <property name="apiUrl" expression="json-eval($.apiUrl)"/> <property name="apiKey" expression="json-eval($.apiKey)"/> <property name="start" expression="json-eval($.start)"/> <property name="end" expression="json-eval($.end)"/> <property name="allDay" expression="json-eval($.allDay)"/> <property name="title" expression="json-eval($.title)"/> <property name="description" expression="json-eval($.description)"/> <property name="where" expression="json-eval($.where)"/> <property name="type" expression="json-eval($.type)"/> <property name="projectId" expression="json-eval($.projectId)"/> <property name="showAsBusy" expression="json-eval($.showAsBusy)"/> <property name="id" expression="json-eval($.id)"/> <property name="attendingUserIds" expression="json-eval($.attendingUserIds)"/> <property name="notifyUserIds" expression="json-eval($.notifyUserIds)"/> <property name="attendeesCanEdit" expression="json-eval($.attendeesCanEdit)"/> <property name="projectUsersCanEdit" expression="json-eval($.projectUsersCanEdit)"/> <property name="reminderType" expression="json-eval($.reminderType)"/> <property name="period" expression="json-eval($.period)"/> <property name="before" expression="json-eval($.before)"/> <teamwork.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <apiKey>{$ctx:apiKey}</apiKey> </teamwork.init> <teamwork.createEvent> <start>{$ctx:start}</start> <end>{$ctx:end}</end> <allDay>{$ctx:allDay}</allDay> <title>{$ctx:title}</title> <description>{$ctx:description}</description> <where>{$ctx:where}</where> <type>{$ctx:type}</type> <projectId>{$ctx:projectId}</projectId> <showAsBusy>{$ctx:showAsBusy}</showAsBusy> <id>{$ctx:id}</id> <attendingUserIds>{$ctx:attendingUserIds}</attendingUserIds> <notifyUserIds>{$ctx:notifyUserIds}</notifyUserIds> <attendeesCanEdit>{$ctx:attendeesCanEdit}</attendeesCanEdit> <projectUsersCanEdit>{$ctx:projectUsersCanEdit}</projectUsersCanEdit> <reminderType>{$ctx:reminderType}</reminderType> <period>{$ctx:period}</period> <before>{$ctx:before}</before> </teamwork.createEvent> <respond/> </inSequence> <outSequence/> <faultSequence/> </target> </proxy>