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 project permissions. 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
addUserToProjectAdd a user to a project.
removeUserFromProjectRemoves a user from a project.
updateUserPermissionOnProjectSets the permissions of a given user on a given project.
getUserPermissionsOnProjectGets the details and permissions for a given user on a given project.

Operation details

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

Anchor
add
add
Adding a user to project

The addUserToProject operation adds a user to project.

Code Block
languagexml
titleaddUserToProject
<teamwork.addUserToProject>
    <projectId>{$ctx:projectId}</projectId>
	<userId>{$ctx:userId}</userId>
</teamwork.addUserToProject>
Properties
  • projectId: The id of the project.

  • userId: The id of the user.

Sample Request

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

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

http://developer.teamwork.com/permissions#add_a_new_user_to

Anchor
rem
rem
Removing a user from project

The removeUserFromProject operation removes a user to project.

Code Block
languagexml
titleremoveUserFromProject
<teamwork.addUserToProject>
    <projectId>{$ctx:projectId}</projectId>
	<userId>{$ctx:userId}</userId>
</teamwork.addUserToProject>
Properties
  • projectId: The id of the project.

  • userId: The id of the user.

Sample Request

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

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

http://developer.teamwork.com/permissions#remove_a_user_fro

Anchor
upd
upd
Updating user's permissions on project

The updateUserPermissionOnProject operation update the user permissions on project.

Code Block
languagexml
titleupdateUserPermissionOnProject
<teamwork.updateUserPermissionOnProject>
    <projectId>{$ctx:projectId}</projectId>
    <userId>{$ctx:userId}</userId>
    <viewMessagesAndFiles>{$ctx:viewMessagesAndFiles}</viewMessagesAndFiles>
    <viewTasksAndMilestones>{$ctx:viewTasksAndMilestones}</viewTasksAndMilestones>
    <viewTime>{$ctx:viewTime}</viewTime>
    <viewNotebooks>{$ctx:viewNotebooks}</viewNotebooks>
    <viewRiskRegister>{$ctx:viewRiskRegister}</viewRiskRegister>
    <viewInvoices>{$ctx:viewInvoices}</viewInvoices>
    <viewLinks>{$ctx:viewLinks}</viewLinks>
    <addTasks>{$ctx:addTasks}</addTasks>
    <addMilestones>{$ctx:addMilestones}</addMilestones>
    <addTaskLists>{$ctx:addTaskLists}</addTaskLists>
    <addMessages>{$ctx:addMessages}</addMessages>
    <addFiles>{$ctx:addFiles}</addFiles>
    <addTime>{$ctx:addTime}</addTime>
    <addNotebooks>{$ctx:addNotebooks}</addNotebooks>
    <addLinks>{$ctx:addLinks}</addLinks>
    <setPrivacy>{$ctx:setPrivacy}</setPrivacy>
    <canBeAssignedToTasksAndMilestones>{$ctx:canBeAssignedToTasksAndMilestones}</canBeAssignedToTasksAndMilestones>
    <projectAdministrator>{$ctx:projectAdministrator}</projectAdministrator>
	<addPeopleToProject>{$ctx:addPeopleToProject}</addPeopleToProject>
</teamwork.updateUserPermissionOnProject>
Properties
  • projectId: The id of the project.

  • userId: The id of the user.

  • viewMessagesAndFiles: Whether user can view messages and files of the project.
  • viewTasksAndMilestones: Whether user can view tasks and milestones of the project.

  • viewTime: Whether user can view time of the project.

  • viewNotebooks: Whether user can view notebooks of the project.

  • viewRiskRegister: Whether user can view risk register of the project.

  • viewInvoices: Whether user can view invoices of the project.

  • viewLinks: Whether user can view links of the project.

  • addTasks: Whether user can add tasks to the project.

  • addMilestones: Whether user can add milestones to the project.

  • addTaskLists: Whether user can add task lists the project.

  • addMessages: Whether user can add messages to the project.

  • addFiles: Whether user can add files to the project.

  • addTime: Whether user can add time the project.

  • addNotebooks: Whether user can add notebooks to the project.

  • addLinks: Whether user can add links to the project.

  • setPrivacy: Whether user can set privacynto the project.

  • canBeAssignedToTasksAndMilestones: Whether user can assigned to tasks and milestones of the project.

  • projectAdministrator: Whether user can be administrator of the project.

  • addPeopleToProject: Whether user can add people to the project.

Anchor
req
req
Sample Request

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

Code Block
languagexml
titleSample request for updateUserPermissionOnProject
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "projectId":"90538",
  "userId":"149146",
  "viewMessagesAndFiles": "1",
  "viewTasksAndMilestones": "1",
  "viewTime": "1",
  "viewNotebooks": "1",
  "viewRiskRegister": "1",
  "viewInvoices": "1",
  "viewLinks": "1",
  "addTasks": "1",
  "addMilestones": "1",
  "addTaskLists": "1",
  "addMessages": "1",
  "addFiles": "1",
  "addTime": "1",
  "addNotebooks": "1",
  "addLinks": "1",
  "setPrivacy": "1",
  "canBeAssignedToTasksAndMilestones": "1",
  "projectAdministrator": "1",
  "addPeopleToProject": "1"
}
Related Teamwork documentation

http://developer.teamwork.com/permissions#update_a_users_pe

Anchor
get
get
Retrieving user permission on project

The getUserPermissionsOnProject operation retrieves the user's permissions on a project.

Code Block
languagexml
titlegetUserPermissionsOnProject
<teamwork.getUserPermissionsOnProject>
    <projectId>{$ctx:projectId}</projectId>
	<userId>{$ctx:userId}</userId>
</teamwork.getUserPermissionsOnProject>
Properties
  • projectId: The id of the project.

  • userId: The id of the user.

Sample Request

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

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

http://developer.teamwork.com/permissions#get_a_users_permi

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 updateUserPermissionOnProject operation. The sample request for this proxy can be found in updateUserPermissionOnProject sample request. You can use this sample as a template for using other operations in this category.

...