Rally - Web Services API: How to get all Project users and query by Permission
search cancel

Rally - Web Services API: How to get all Project users and query by Permission

book

Article ID: 111601

calendar_today

Updated On:

Products

Rally On-Premise Rally SaaS

Issue/Introduction

What are the permissions on Projects?
Can we use WSAPI to get all users of a Project?
Can we filter and get only users of certain permission of a Project?

Environment

Release:
Component: ACSAAS

Resolution

There are 3 permissions for Projects:  Viewer, Editor and Admin.

- The 'Admin' permission will grant the user a "Project Admin" privilege.
- The 'Editor' permission will allow the user to edit all project's artifacts. This is a minimum requirement to be a Team Member of this Project.
- The 'Viewer' permission will allow the user basic access to the project, without allowing editing any artifact.

These permissions are stored in the ProjectPermission endpoint. A combination of the User, the Project and the Workspace will constitute a unique entry in this endpoint. Such an entry marks the fact that this user has access to the Workspace. The specific level of permission ('Viewer', 'Editor' or 'Admin') is kept on the Role field.


WSAPI can be used to filter for Project users along with their permissions. Below are a few examples. All query examples should run against the ProjectPermission endpoint:

1. To get all Project Users (that is all users who have any access to the Project):
(Project.ObjectID = <PROJECT_OID>)

2. To get only Editors of a given Project:
((Project.ObjectID = <PROJECT_OID>) (and Role = "Editor"))

3. To get all non-admins users of a given Project:
((Project.ObjectID = <PROJECT_OID>) (and Role != "Admin"))

4. To get a list of Projects accessible by a specific user.
(User.username = "<USERNAME>")     - find by username
((User.FirstName = "<FIRST_NAME>") and (User.LastName = "<LAST_NAME>"))    - find by full name.
(User.ObjectID = <USER_OID>)

5. To get a list of all disabled users in a given Project:
((Project.ObjectID = <PROJECT_OID>) and (User.Disabled = True))

6. To get a list of all Project Admins of all projects in a given Workspace:
(Workspace.ObjectID = <WORKSPACE_OID>) and (Role = "Admin"))

7. To get a list of all Viewers or Editors of all Projects of all Workspaces):
((Role = "Viewer") or (Role = "Editor"))

8. To get a list of Project Admins of only Children Projects of a given Project:
((Project.Parent.ObjectID = <PARENT_PROJECT_OID>) and (Role = "Admin"))

9. To get a list of all users that have any access to a given projects and all its direct children projects:
((Project.ObjectID = <PARENT_PROJECT_OID>) or (Project.Parent.ObjectID = <PARENT_PROJECT_OID>))

10. To get all disabled users with permissions to a given Project or any of its Children Projects or any of its Grand-Children Projects:
((((Project.ObjectID = <TOP_PROJECT_OID>) or (Project.Parent.ObjectID = <TOP_PROJECT_OID>)) or (Project.Parent.Parent.ObjectID = <TOP_PROJECT_OID>)) and (User.Disabled = False))