It's all about the answers!

Ask a question

API query to list all project areas an user belongs to

Jitesh Saha (179) | asked May 03 '22, 2:43 a.m.

I am looking for ways to list down all project areas an user belongs to using RQM REST API/java API.

I know that this REST API query:  <server>/qm/service/ returns a list of all the projects present in the server but I want user to just view the project areas they are a member of.

Furthermore I am developing this functionality with JAVA backend so I believe a java api will also suffice.
Any hints on how to easily achieve this is appreciated.

Thank you in advance.

Accepted answer

permanent link
Ralph Schoon (63.2k33646) | answered May 03 '22, 4:45 a.m.
Since the question does not provide what the purpose of the endeavor is, here some summary of what could be looked at:

  1. The API landing page is here: check the available APIs
  2. The 4 APIS that are documented here contain the Reportable REST API and the OSLC API. The reportable RESt API mentions and also in 7.x filter capabilities. This might be a way. I am not sure if the OSLC API provides this information.
  3. ETM does not provide a JAVA API like EWM does, BUT parts of the EWM API covers the Jazz Foundation and it might be possible to use that against ETM. contains examples for finding such information in EWM.
  4. The Jazz Foundation API , might provide the desired information. I noticed that some of the user related queries do not work any more due to concerns with privacy.
Jitesh Saha selected this answer as the correct answer

Jitesh Saha commented May 10 '22, 3:31 a.m.
Hi Ralph,

Thanks for your input. The EWM API works perfectly with ETM and got the job done for me.

For anyone who is also looking for the same solution I am pasting the unit test i the next comment.

One other answer

permanent link
Jitesh Saha (179) | answered May 10 '22, 3:35 a.m.
Unit test to the solution:

  public void run() throws TeamRepositoryException {

    try {

      String repositoryURI = "" ;    //Your Repository Here
      String userId = "" ;                 //Your username Here
      String password = " " ;            //Your Password

     String memberUser = "" ;               // The user for whom you want the project areas to be listed

      ITeamRepository teamRepository = TeamPlatform.getTeamRepositoryService().getTeamRepository(repositoryURI);
      teamRepository.registerLoginHandler(new LoginHandler(userId, password));

      System.out.println("Logged in as: " + teamRepository.loggedInContributor().getName());

      if (projectAreaName == null) {
        // For all project areas
        IProcessItemService itemService =
            (IProcessItemService) teamRepository.getClientLibrary(IProcessItemService.class);
        List pAreas = itemService.findAllProjectAreas(null, null);
        for (Iterator iterator = pAreas.iterator(); iterator.hasNext();) {
          IProjectArea projectArea = (IProjectArea);
          IContributor user = teamRepository.contributorManager().fetchContributorByUserId(memberUser , null);

          if (projectArea.hasMember(user)) {



    catch (TeamRepositoryException x) {
    finally {


Your answer

Register or 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.