Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Accessing Role Assignments of a specific team area via REST Api

 Hallo,


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?

0 votes

Comments

 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.



2 answers

Permanent link

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.
https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI#teamArea_type_com_ibm_team_proce

0 votes

Comments

 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. 

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.

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.

 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.

In that case, probably have a look at the internal API
/ccm/service/com.ibm.team.process.internal.service.web.IProcessWebUIService/teamAreaByUUIDWithLimitedMembers?processAreaItemId=<teamAreaUUID>

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.

Hi Marko,

I'm just curious whether you got a chance to obtain what you were looking for.

And if this is the case I'm really interested to know how you performed it.

Thanks for your feedback,
Fabien

showing 5 of 6 show 1 more comments

Permanent link

Hello Fabien,


Yes, we have got whatever we were expecting. And for this we have used the internal API -
/ccm/service/com.ibm.team.process.internal.service.web.IProcessWebUIService/teamAreaByUUIDWithLimitedMembers?processAreaItemId=<teamAreaUUID>.

As a response we will get a SOAP response, in which you have an element "<members>...</members>", as shown below - 
This will provide us a details, process roles assigned to each member of the team.

<members>
<itemId>_6JGiMbBTEeSuG621rZPROg</itemId>
<archived>false</archived>
<emailAddress>abc.com</emailAddress>
<name>abc</name>
<userId>abc@abc</userId>
<processRoles>
<description>
The default role, implicitly assigned to each user. This role cannot be assigned, removed, or reordered.
</description>
<id>default</id>
<label>default</label>
<cardinality>0</cardinality>
</processRoles>
</members>

and there will be an element <admins>...</admins> which explains the admin member details. as shown below -

<admins>
<itemId>_6JGiMbBTEeSuG621rZPROg</itemId>
<archived>false</archived>
<emailAddress>abc.com</emailAddress>
<name>abc</name>
<userId>abc@abc</userId>
<processRoles>
<description>
The default role, implicitly assigned to each user. This role cannot be assigned, removed, or reordered.
</description>
<id>default</id>
<label>default</label>
<cardinality>0</cardinality>
</processRoles>
</admins>.

We have used XPathExpression to resolve the xml to construct required POJO's.

Hope that answered your question.

Thank you,
Praveen S H

0 votes

Comments

Thanks for your help Praveen!!!

That will help us a lot.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,021

Question asked: Sep 21 '17, 3:12 a.m.

Question was seen: 3,611 times

Last updated: Nov 13 '17, 5:21 a.m.

Confirmation Cancel Confirm