How can I get the list of users in a project area using OSLC in RTC?
How can I get the list of users in a project area using OSLC in RTC?
|
6 answers
Takehiko Amano (1.3k●37●41)
| answered Jul 08 '13, 5:00 a.m.
JAZZ DEVELOPER edited Jul 08 '13, 5:01 a.m.
To access member info, use process RESTapi (note this is not OSLC).
For example, if you have jazzhub.example.com/ccm01 instance, then access like https://jazzhub.example.com/ccm01/process/project-areas/ This will list all projects that you can access. Then you can find member list access URL like this. https://jazzhub.example.com/ccm01/process/project-areas/_ZhogejmEeKhontp5lzEQ/members Where _Z** is a project ID. If your project is nested, then open team area, you will find similar structures. Hope this helps ! Comments
Kirk Woods
commented Aug 21 '20, 11:22 a.m.
This only gives the list of members that are at the top project area level. It does not list all users who have membership in the project area. One can be a member of a team area in the project and not show up as a member of the project area. |
by users if you mean members of a specific project area, they can be reached using:
https://localhost:9443/ccm/process/project-areas/_JQuZcFNcEeKhkuM6LJfdVw/members all users of the repository can be reached through: https://clm40.in.ibm.com:9443/ccm/oslc/users Discovery Mechanism: 1. Starting with CCM Root Services https://localhost:9443/ccm/rootservices 2. Find the Project Areas URL <jp06:projectAreas rdf:resource="https://localhost:9443/ccm/process/project-areas"/> 3. Find members URL against specificc project areas <jp06:project-areas> <jp06:project-area jp06:name="CustomReminderPoC"> <jp06:summary>CustomReminderPoC</jp06:summary> <jp06:description/> <jp06:url> https://localhost:9443/ccm/process/project-areas/_JQuZcFNcEeKhkuM6LJfdVw </jp06:url> <jp06:roles-url> https://localhost:9443/ccm/process/project-areas/_JQuZcFNcEeKhkuM6LJfdVw/roles </jp06:roles-url> <jp06:links-url> https://localhost:9443/ccm/process/project-areas/_JQuZcFNcEeKhkuM6LJfdVw/links </jp06:links-url> <jp06:members-url> https://localhost:9443/ccm/process/project-areas/_JQuZcFNcEeKhkuM6LJfdVw/members </jp06:members-url> 4. Using the jp06:members-url the list of members is reached: https://localhost:9443/ccm/process/project-areas/_JQuZcFNcEeKhkuM6LJfdVw/members Sample: <jp06:members jp:total-members="3"> <jp06:member> <jp06:url> hope it helps. |
Thank you Dinesh & Takehiko for very quick responses !
Yes, I mean members of a Project Area and in current situation I have been trying to list for RM Project. https://my.rmhost.ibm.com:19443/rm/process/project-areas/_z6ILABQKEeWGrt9v24XbYA/members I am able to see the data of members in the XML format. Is it possible to get it in user friendly format : .xls ? |
is it possible to fetch users without UUID? just by giving input as project area name? |
I have questions about what the true question is about. Why do you want to get the list of members of the project area? Do you also want the members of the team areas? Do you want to know what role the users have for a given team area? Is using a REST call the only option for getting the information or can you use the Java API?
Getting a full list of all users who have access to a project area requires traversing the team areas and getting those members also. If you can use the Plain Java API, it can be easier to get the information and format the output to what you need. If you have to use a REST call and don't want to traverse the team areas and/or deal with XML, you can create a server extension (using the SDK) to get all the user information in the format you desire and by project area name. How to make the REST call and it's function is up to you.
Having a server extension can be useful in that you can turn it into a query also to retrieve information about a single user (e.g. give me a list of all project and team areas with roles for a given user). I have done this kind of interface to find and remove users who have left the company or had a role change.
|
No need for all the OSLC mucking around, you can just use the Reportable REST API:
https://<server>/ccm/rpt/repository/foundation?fields=foundation/projectArea[name='<your project area name>']/teamMembers/*
If you want all the team areas then use allTeamAreas/teamMembers/* at the end
|
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.