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

How to get jts user license details using OSLC/ plain java API?

 Hi all,


I need to fetch all user details of CCM along with their email address, roles, license etc. Is it possible using OSLC or Java api? If yes please provide hint. Because as per my knowledge we can not query to JTS using OSLC

0 votes



One answer

Permanent link

You can use the repotools exportUser command for that. You can use the JAVA API e.g. https://rsjazz.wordpress.com/2017/03/29/managing-contributor-licenses-using-the-plain-java-client-libraries/ and other posts on that blog.

There is no OSLC mechanism as OSLC does not cover this. There are Web based APIs to do this however.


0 votes

Comments
Thanks @Ralph Schoon for your reply. My requirement is I want to export 

User name, email address, ALM application name,assigned licenses, team area(s), assigned role. What is the feasible way to export all this data in single code? Please provide suggestion. I have option plain java api, OSLC. Is there any other possibility 

My requirement is the answers I give to be read. The time spent on the answer is not free.
Again, you can

  1. Use repotools-jts exportUsers
  2. Use the plain Java Client Libraries see https://rsjazz.wordpress.com/2017/03/29/managing-contributor-licenses-using-the-plain-java-client-libraries/ for a code sample.


1 vote

Hi @Ralph Schoon thanks for your valuable time and support. I dont want to use reptool I started working on plain Java Api, suppose one user belongs to multiple applications i.e. ccm ,rqm, dng. Then is it possible to find user details along with its application which he is subscribed for? 

Java API is only available for RTC. It has worked in the past for RQM and RDNG I think, but there is no guarantee. The other link provides a good entry point with available code for RTC.

 @Ralph Schoon ...I tried your code snippet for get license details. But it shows all the license available in application. Is it possible to get license according to user basis. I want to  fetch information of users which he has assigned license

  @Ralph Schoon ...I tried your code snippet for get license details. But it shows all the license available in application. Is it possible to get license according to user basis. I want to  fetch information of users which he has assigned license

Sorry, that is what I have at the moment. It is certainly possible to query the system for a user ID ant the users licenses, using  com.ibm.team.repository.common.model.query.BaseLicenseAssignmentQueryModel.LicenseAssignmentQueryModel
but I have no simple example to share.

 @Ralph Schoon ... Following code I wrote for fetch user license details but code is throwing "null pointer exception" I also tried "getServiceInterface()" method also: I tried below code for client side plugin: Your suggestion is very valuable for me:

TeamRepository repo2 = (TeamRepository) repo;
IContributorLicenseType client = (IContributorLicenseType) repo2.getClientLibrary(IContributorLicenseType.class);
System.out.println("****Licenense***");
System.out.println("Licenense name :"+client.getDescription());

showing 5 of 8 show 3 more comments

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
× 10,937
× 7,495
× 1,700

Question asked: Jun 20 '18, 5:03 a.m.

Question was seen: 3,381 times

Last updated: Jun 27 '18, 4:18 a.m.

Confirmation Cancel Confirm