It's all about the answers!

Ask a question

Programmatically create users (application server)


0
1
Chetna Warade (106123) | asked Oct 22 '08, 9:41 p.m.
JAZZ DEVELOPER
I am trying to programmatically create new application server users in RTC. Currently, a user can log into the url https://localhost:9443/jazz and Click User Management and add users by hand. I need to create hundreds of users which is cumbersome. I am playing with the RTC server to see if I can programmatically create new users.

As a start, any http server accepts either GET or POST messages. It is possible to use java.net technique, to open a connection (URLConnection) with the http server and manipulate the server to serve the request. I have had success with many commercial websites.

In context of RTC E,g. When I create a user by hand a url like this is autogenerated in the JavaScript and POST message is sent, so the server can process the request.

https://9.34.120.71:9443/jazz/service/com.ibm.team.repository.service.internal.IAdminRestService/contributor?emailAddress=st3&itemId=new&jsonLicenses=%7B%22add%22%3A%20%5B%22com.ibm.team.rtc.developer%22%5D%2C%20%22remove%22%3A%20%5B%5D%7D&jsonRoles=%5B%22JazzAdmins%22%2C%20%22JazzUsers%22%5D&name=st3&userId=st3

I wrote a plain java client to handle this via SSL (IBM JSSE Provider com.ibm.jsse) since now https:// is being provided with RTC. I created a client keystore file from the server keystore file and imported server keys/certificates. I am not getting any errors, but neither am I seeing any results. Nothing particular in the tomcat logs. I can post the code on request. I was looking if this is the way to go. Any alternative ideas..? Thanks for your time.

23 answers



permanent link
Chetna Warade (106123) | answered Nov 19 '08, 10:21 p.m.
JAZZ DEVELOPER
ILicenseAdminService adminService = (ILicenseAdminService) ((TeamRepository)repository).getServiceInterface(ILicenseAdminService.class);

works super!.

permanent link
Andrew Freed (21311214) | answered Feb 16 '11, 3:45 p.m.
JAZZ DEVELOPER
I created a defect since this approach relies on an internal api (TeamRepository class is in internal package)

http://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=153784

permanent link
Andrew Freed (21311214) | answered Feb 25 '11, 9:13 a.m.
JAZZ DEVELOPER
RTC suggests the use of repotools rather than Java API:
"We do a provide the ability to import users through the -createUsers command in repotools. The link to the documentation for that command is http://publib.boulder.ibm.com/infocenter/clmhelp/v3r0/topic/com.ibm.jazz.install.doc/topics/r_repotools_createusers.html"

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.