...
...
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.
Operation details
This section provides further details on the operations related to discussions.
Creating a project
The createProject
operation creates project.
Code Block |
---|
language | xml |
---|
title | 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.
Code Block |
---|
language | xml |
---|
title | 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"
} |
http://developer.teamwork.com/projectsapi#create_project
Updating a project
The updateProject
operation updates a project.
Code Block |
---|
language | xml |
---|
title | 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.
Code Block |
---|
language | xml |
---|
title | 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.
Code Block |
---|
language | xml |
---|
title | 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.
Code Block |
---|
language | xml |
---|
title | 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.
Code Block |
---|
language | xml |
---|
title | 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.
Code Block |
---|
language | xml |
---|
title | Sample request for getProject |
---|
|
{
"apiUrl":"https://wso2test.teamwork.com/",
"apiKey":"clark42ceiling",
"projectId":"90538",
"includePeople":"true"
} |
http://developer.teamwork.com/projectsapi#retrieve_a_single
Retrieving all projects
The getAllProjects
operation retrieves all the projects.
Code Block |
---|
language | xml |
---|
title | 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.
Code Block |
---|
language | xml |
---|
title | 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.
Code Block |
---|
language | xml |
---|
title | getStarredProjects |
---|
|
<teamwork.getStarredProjects/>
|
Sample Request
Following is a sample REST/JSON request that can be handled by the getStarredProjects
operation.
Code Block |
---|
language | xml |
---|
title | 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.
Code Block |
---|
language | xml |
---|
title | 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.
Code Block |
---|
language | xml |
---|
title | Sample request for starAProject |
---|
|
{
"apiUrl":"https://wso2test.teamwork.com/",
"apiKey":"clark42ceiling",
"projectId":"90538"
} |
http://developer.teamwork.com/projectsapi#star_a_project
Unstar a project
The unstarAProject
operation removes a project from the list of favourite projects.
Code Block |
---|
language | xml |
---|
title | 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.
Code Block |
---|
language | xml |
---|
title | 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.
...