Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
maxLevel3
typeflat

...

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.

Anchor
cp
cp
Creating a
project

The createProject operation creates project.

Code Block
languagexml
titlecreateProject
<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.

Anchor
req
req
Sample Request

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

Code Block
languagexml
titleSample 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

Anchor
up
up
Updating a
project

The updateProject operation updates a project.

Code Block
languagexml
titleupdateProject
<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.

Code Block
languagexml
titleSample 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

Anchor
dp
dp
Deleting a
project

The deleteProject operation deletes a project.

Code Block
languagexml
titledeleteProject
<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.

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

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

 

Anchor
gp
gp
Retrieving a project

The getProject operation retrieves a project of given id.

Code Block
languagexml
titlegetProject
<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.

Code Block
languagexml
titleSample 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

Anchor
gps
gps
Retrieving all projects

The getAllProjects operation retrieves all the projects.

Code Block
languagexml
titlegetAllProjects
<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.

Code Block
languagexml
titleSample 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

Anchor
gsp
gsp
Retrieving all starred projects

The getStarredProjects operation retrieves all the starred projects.

Code Block
languagexml
titlegetStarredProjects
<teamwork.getStarredProjects/>
Sample Request

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

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

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

Anchor
sp
sp
Star a project

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

Code Block
languagexml
titlestarAProject
<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.

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

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

Anchor
usp
usp
Unstar a project

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

Code Block
languagexml
titleunstarAProject
<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.

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

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

Anchor
sam
sam
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.

...