Programmatically create users (application server)
![](http://jazz.net/_images/myphoto/6896a44922841807c39bc22b903c2c45.jpg)
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.
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
![](http://jazz.net/_images/myphoto/6896a44922841807c39bc22b903c2c45.jpg)
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"
"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"
page 3of 1 pagesof 2 pagesof 3 pages