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/.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »



Overview

The following operations allow you to work with projects. 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.

OperationDescription
createProjectCreates a  project.
updateProjectModifies a project.
deleteProjectDeletes a project.
getProjectReturns a project identified by its id.
getAllProjectsRetrieves all accessible projects.
getStarredProjectsRetrieve all the projects, which have been starred.
starAProjectAdds a project to the list of favourite projects.
unstarAProjectRemoves a project from the list of favourite projects.

Operation details

This section provides further details on the operations related to discussions.

Creating a project

The createProject operation creates project.

createProject
<teamwork.createProject>
    <name>{$ctx:name}</name>
    <description>{$ctx:description}</description>
    <startDate>{$ctx:startDate}</startDate>
    <endDate>{$ctx:endDate}</endDate>
    <companyId>{$ctx:companyId}</companyId>
    <newCompany>{$ctx:newCompany}</newCompany>
	<categoryId>{$ctx:categoryId}</categoryId>
</teamwork.createProject>
Properties
  • name: The name of the project.
  • description: The description of the project.

  • startDate: The start date of the project(YYYYMMDD).

  • endDate: The end date of the project(YYYYMMDD)

  • companyId: The company id of the project

  • newCompany: The name of the company if creating a new company.

  • categoryId: The category id of the project.

Sample Request

Following is a sample REST/JSON request that can be handled by the createProject operation.

Sample request for createProject
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "name": "test",
  "description": "first project",
  "startDate": "20150122",
  "endDate": "20150422",
  "companyId": "39327",
  "newCompany": "Com",
  "categoryId": "0"
}
Related Teamwork documentation

http://developer.teamwork.com/projectsapi#create_project

Updating a project

The updateProject operation updates a project.

updateProject
<teamwork.updateProject>
	<projectId>{$ctx:projectId}</projectId>
	<name>{$ctx:name}</name>
    <description>{$ctx:description}</description>
    <startDate>{$ctx:startDate}</startDate>
    <endDate>{$ctx:endDate}</endDate>
    <companyId>{$ctx:companyId}</companyId>
    <newCompany>{$ctx:newCompany}</newCompany>
	<status>{$ctx:status}</status>
    <categoryId>{$ctx:categoryId}</categoryId>
</teamwork.updateProject>
Properties
  • projectId: The id of the project.
  • name: The name of the project.
  • description: The description of the project.

  • startDate: The start date of the project(YYYYMMDD).

  • endDate: The end date of the project(YYYYMMDD)

  • companyId: The company id of the project

  • newCompany: The name of the company if creating a new company.

  • status: The status of the project.
  • categoryId: The category id of the project.

Sample Request

Following is a sample REST/JSON request that can be handled by the updateProject operation.

Sample request for updateProject
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "projectId":"90538",
  "name": "test",
  "description": "first project",
  "startDate": "20150122",
  "endDate": "20150422",
  "companyId": "39327",
  "newCompany": "Com",
  "status": "active",
  "categoryId": "0"
}
Related Teamwork documentation

http://developer.teamwork.com/projectsapi#update_project

Deleting a project

The deleteProject operation deletes a project.

deleteProject
<teamwork.deleteProject>
	<projectId>{$ctx:projectId}</projectId>
</teamwork.deleteProject>
Properties
  • projectId: The id of the project.
Sample Request

Following is a sample REST/JSON request that can be handled by the deleteProject operation.

Sample request for deleteProject
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "projectId":"90538"
}
Related Teamwork documentation

http://developer.teamwork.com/projectsapi#delete_project

 

Retrieving a project

The getProject operation retrieves a project of given id.

getProject
<teamwork.getProject>
	<projectId>{$ctx:projectId}</projectId>
	<includePeople>{$ctx:includePeople}</includePeople>
</teamwork.getProject>
Properties
  • projectId: The id of the project.
  • includePeople: Show the people associated with the requested project(true/false).
Sample Request

Following is a sample REST/JSON request that can be handled by the getProject operation.

Sample request for getProject
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "projectId":"90538",
  "includePeople":"true"
}
Related Teamwork documentation

http://developer.teamwork.com/projectsapi#retrieve_a_single

Retrieving all projects

The getAllProjects operation retrieves all the projects.

getAllProjects
<teamwork.getAllProjects>
    <status>{$ctx:status}</status>
    <updatedAfterDate>{$ctx:updatedAfterDate}</updatedAfterDate>
    <updatedAfterTime>{$ctx:updatedAfterTime}</updatedAfterTime>
    <orderBy>{$ctx:orderBy}</orderBy>
    <createdAfterDate>{$ctx:createdAfterDate}</createdAfterDate>
    <createdAfterTime>{$ctx:createdAfterTime}</createdAfterTime>
    <includePeople>{$ctx:includePeople}</includePeople>
	<page>{$ctx:page}</page>
</teamwork.getAllProjects>
Properties
  • status: Retrieve projects filtered by status (ALL,ACTIVE,ARCHIVED).
  • updatedAfterDate: Retrieve projects filtered by the date of update(YYYYMMDD).

  • updatedAfterTime: Retrieve projects filtered by the time of update(HH:MM).

  • orderBy: Retrieve projects sorted(name,companyName,lastActivityDate).

  • createdAfterDate: Retrieve projects filtered by the date of creation(YYYYMMDD).

  • createdAfterTime: Retrieve projects filtered by the time of creation(HH:MM).

  • includePeople: Show the people associated with the requested project(true/false)

  • page: The page no.

Sample Request

Following is a sample REST/JSON request that can be handled by the getAllProjects operation.

Sample request for getAllProjects
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "status":"ALL",
  "updatedAfterDate": "20110603",
  "updatedAfterTime": "15:21",
  "orderBy": "lastActivityDate",
  "createdAfterDate": "20100603",
  "createdAfterTime": "20:40",
  "includePeople": "true",
  "page": "1"
}
Related Teamwork documentation

http://developer.teamwork.com/projectsapi#retrieve_all_proj

Retrieving all starred projects

The getStarredProjects operation retrieves all the starred projects.

getStarredProjects
<teamwork.getStarredProjects/>
Sample Request

Following is a sample REST/JSON request that can be handled by the getStarredProjects operation.

Sample request for getStarredProjects
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling"
}
Related Teamwork documentation

http://developer.teamwork.com/projectsapi#retrieve_your_sta

Star a project

The starAProject operation adds a project to the list of favourite projects.

starAProject
<teamwork.starAProject>
	<projectId>{$ctx:projectId}</projectId>
</teamwork.starAProject>
Properties
  • projectId: The id of the project.
Sample Request

Following is a sample REST/JSON request that can be handled by the starAProject operation.

Sample request for starAProject
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "projectId":"90538"
}
Related Teamwork documentation

http://developer.teamwork.com/projectsapi#star_a_project

Unstar a project

The unstarAProject operation removes a project from the list of favourite projects.

unstarAProject
<teamwork.starAProject>
	<projectId>{$ctx:projectId}</projectId>
</teamwork.starAProject>
Properties
  • projectId: The id of the project.
Sample Request

Following is a sample REST/JSON request that can be handled by the unstarAProject operation.

Sample request for unstarAProject
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "projectId":"90538"
}
Related Teamwork documentation

http://developer.teamwork.com/projectsapi#unstar_a_project

Sample configuration

Following is a sample proxy service that illustrates how to connect to Teamwork with the init operation and use the createProject operation. The sample request for this proxy can be found in createProject sample request. You can use this sample as a template for using other operations in this category.

Sample proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="tw_createProject"
       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="name" expression="json-eval($.name)"/>
         <property name="description" expression="json-eval($.description)"/>
         <property name="startDate" expression="json-eval($.startDate)"/>
         <property name="endDate" expression="json-eval($.endDate)"/>
         <property name="companyId" expression="json-eval($.companyId)"/>
         <property name="newCompany" expression="json-eval($.newCompany)"/>
         <property name="categoryId" expression="json-eval($.categoryId)"/>
         <teamwork.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <apiKey>{$ctx:apiKey}</apiKey>
         </teamwork.init>
         <teamwork.createProject>
            <name>{$ctx:name}</name>
            <description>{$ctx:description}</description>
            <startDate>{$ctx:startDate}</startDate>
            <endDate>{$ctx:endDate}</endDate>
            <companyId>{$ctx:companyId}</companyId>
            <newCompany>{$ctx:newCompany}</newCompany>
            <categoryId>{$ctx:categoryId}</categoryId>
         </teamwork.createProject>
         <respond/>
      </inSequence>
      <outSequence/>
      <faultSequence/>
   </target>
</proxy>


  • No labels