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

RAM API to retrieve the users assigned to a particular User role?

Hello team,

We are looking for an API that will retrieve all the users who are assigned to a  User role in a community.

We tried the getUserIDs() RAM API but it gives null pointer exception error. We are using RAM 7.5.0.2. Please advise?

Snippet code

------------------

 try
  {
  RAMSession session = new RAMSession( "RAMURL", "ADMIN", "PASSWORD" );
  RAMCommunity community = session.getCommunity("COMMUNITY NAME");
  // Connect ram server
  RAM1 ram1 = new RAMClient(new URL( "RAMURL" ), "ADMIN", "PASSWORD", null).getRAM1Webservice();
  //Get User Roles for this community
  RoleSO[] rolesArray = ram1.getRoles(community.getId());
  //Get User IDs for each role
  for(int i=0; i<rolesArray.length; i++){

 System.out.println("Role Name: " + rolesArray[i].getName() + "     Number of Users: " + rolesArray[i].getUserIDs().length);
  }
  session.release();
  }
  catch(Exception e){e.printStackTrace();}

Thanks in advance,

Regards,

Sripriya

0 votes



One answer

Permanent link
Please do not use the new RAMClient directly. That is an entirely internal class and is not supported as API. Any methods on it at any release of RAM may become non-functional or even removed. That particular method isn't even used anymore so it has not been kept up to date.

That information isn't sent through any of the web/webservices/rest calls.

0 votes

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

Question asked: Apr 30 '13, 6:53 a.m.

Question was seen: 3,215 times

Last updated: Apr 30 '13, 6:08 p.m.

Confirmation Cancel Confirm