...
Table of Contents | ||||
---|---|---|---|---|
|
...
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.
Operation | Description |
---|---|
addUserToProject | Add a user to a project. |
removeUserFromProject | Removes a user from a project. |
updateUserPermissionOnProject | Sets the permissions of a given user on a given project. |
getUserPermissionsOnProject | Gets 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
add | |
add |
The addUserToProject
operation adds a user to project.
Code Block | ||||
---|---|---|---|---|
| ||||
<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 | ||||
---|---|---|---|---|
| ||||
{ "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
rem | |
rem |
The removeUserFromProject
operation removes a user to project.
Code Block | ||||
---|---|---|---|---|
| ||||
<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 | ||||
---|---|---|---|---|
| ||||
{ "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
upd | |
upd |
The updateUserPermissionOnProject
operation update the user permissions on project.
Code Block | ||||
---|---|---|---|---|
| ||||
<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
req | |
req |
Following is a sample REST/JSON request that can be handled by the updateUserPermissionOnProject
operation.
Code Block | ||||
---|---|---|---|---|
| ||||
{ "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
get | |
get |
The getUserPermissionsOnProject
operation retrieves the user's permissions on a project.
Code Block | ||||
---|---|---|---|---|
| ||||
<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 | ||||
---|---|---|---|---|
| ||||
{ "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
sam | |
sam |
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.
...