It's all about the answers!

Ask a question

Accessing Role Assignments of a specific team area via REST Api

Vladislav Ladyzhenskiy (63) | asked Sep 21, 3:12 a.m.
edited Sep 21, 5:00 a.m.


for my current project i need to get all contributor roles of a team area and team area only using REST api. I tried to get them using Process Api and Reportable REST Api, but every time i get all contributor roles for the entire hierarchy in wich particular team area is part of. 

The two calls i am using look like this:

  • Process Api          https://[serverpath]/ccm/process/project-areas/[projectAreaUUID]/team-areas/[teamAreaUUID]/members/[userID]/role-assignment

  • Reportable REST:    https://[serverpath]/ccm/rpt/repository/foundation?fields=foundation/teamArea[itemId=%27teamAreaUUID%27]/roleAssignments[contributor/userId='userID']/(contributorRoles/id)
I know that by using JAVA Api i can get roles for specific process area. Is it possible to do the same with any particular REST Api?

Marko Tomljenovic commented Sep 21, 5:12 a.m. | edited Sep 21, 5:12 a.m.

 The problem here is that we want the roles that are explicitly assigned to the user in the given team area. But what we get is the number of roles that the user in the end has in the context of the team area.

One answer

permanent link
Donald Nong (12.9k29) | answered Sep 21, 8:04 p.m.

Isn't /ccm/rpt/repository/foundation?fields=foundation/teamArea[itemId=%27teamAreaUUID%27]/roles just what you want? I'm not quite sure why you included contributors/users in your example.

Vladislav Ladyzhenskiy commented Sep 22, 3:10 a.m.

 Hello Donald. Thank you for your answer. 

As Marko mentioned we want only the roles which contributers have in the specific team area. Your suggestion would retrieve the pool of roles defined for this team area, from wich roles are assigned to process members. 

Marko Tomljenovic commented Sep 22, 3:13 a.m.

We do not need the information which roles are available in the context of a specific team area.

What we need is to know which roles are explicitly assigned to the users that are explicit members of a given team/project area.

Donald Nong commented Sep 22, 5:08 a.m.

Now I understand what you try to do. So, if user Marko has Team Member role in the project area, while having Scrum Master role in a team area, you want to show him having just the Scrum Master role in the team area, just like what the Manage Team Area page shows, not effectively having both Team Member and Scrum Master roles. Correct?

What is the purpose of knowing such role assignments? In most cases, knowing the effective role(s) will be more beneficial, and your use case may be quite unique.

Marko Tomljenovic commented Sep 22, 5:31 a.m.

 Due to our highly complex CLM setup and usage we need to develop our own CLM user administration tool. And this tool needs to know the exact role assignments and not the effective ones.

Donald Nong commented Sep 22, 6:13 a.m.

In that case, probably have a look at the internal API

It is called when you open the Manage Team Area page.

Generally speaking, using internal APIs is not recommended, as they may change without notice, and you cannot get any support on them.

Your answer

Register or to post your answer.