How to archive a user with REST api
New users are imported automatically from LDAP, but deleting users is manual process.
Is the any way I can archive a user and thus release his license with the REST api? |
Accepted answer
Ralph Schoon (63.4k●3●36●46)
| answered Nov 21 '11, 8:49 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER New users are imported automatically from LDAP, but deleting users is manual process. Hi Anders, I searched the SDK and here is the code that should work also with the Plain Java Client Library.
Anders Truelsen selected this answer as the correct answer
|
8 other answers
Hi ,
i want delete workitems based on query result. Kindly help on this. Thanks Pugazh |
Ralph Schoon (63.4k●3●36●46)
| answered Mar 09 '12, 7:23 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
You can use the plain java client libraries to run a query and iterate the result.
this code should delete an IWorkitem.
I did not try this code myself. |
Hi,
i am new to RTC. so i am unable to execute this code. could you able to given me full java file and the instruction for executing this file. Thanks , Pugazh |
Hi Ralph Schoon,
check my code below. i am having error in the following places 1. workItem.getOrigin() 2. monitor 3. destWorkingCopy 4. dest import com.ibm.team.repository.client.ITeamRepository; import com.ibm.team.repository.client.TeamPlatform; import com.ibm.team.repository.common.TeamRepositoryException; import com.ibm.team.workitem.client.IDetailedStatus; import com.ibm.team.workitem.client.IWorkItemClient; import com.ibm.team.workitem.client.IWorkItemWorkingCopyManager; import com.ibm.team.workitem.client.WorkItemWorkingCopy; import com.ibm.team.workitem.common.model.IWorkItem; public class QueryDeletion { public static void main(String args[]) throws TeamRepositoryException { boolean result; TeamPlatform.startup(); try { result = run(args); } finally { TeamPlatform.shutdown(); } if (!result) System.exit(1); } private static boolean run(String[] args) { // TODO Auto-generated method stub IWorkItemClient workItemClient = (IWorkItemClient) ((ITeamRepository) workItem.getOrigin()).getClientLibrary(IWorkItemClient.class); IWorkItemWorkingCopyManager wcm = workItemClient.getWorkItemWorkingCopyManager(); wcm.connect(workItem, IWorkItem.FULL_PROFILE, null); try { WorkItemWorkingCopy workItemWorkingCopy = wcm.getWorkingCopy(workItem); workItemWorkingCopy.delete(monitor); IDetailedStatus s = destWorkingCopy.save(null); if (!s.isOK()) { throw new TeamRepositoryException("Error saving work item", s.getException()); } } finally { wcm.disconnect(dest); } return false; } } Thanks , Pugazh s |
Ralph Schoon (63.4k●3●36●46)
| answered Mar 13 '12, 8:09 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Please follow https://jazz.net/library/article/784 and https://jazz.net/wiki/bin/view/Main/RTCSDK20_DevelopmentEnvironmentSetup to setup your project for development.
I can't debug your code. Sorry. |
Hi Ralph ,
Thank you very. I have installed the plain java library Now its working fine. Thanks, Pugazh |
Can some tell me how to import User from LDAP to RTC server programmetically. I looked into call mechanism at RTC WebClient .It uses AdminRestService and IExternalUserRegistryRestService both of which have discouraged access over plugins\com.ibm.team.repository.service_1.1.1.v20110524_1821\repository_service.jar.
Can someone tell me an alternative way to import LDAP User to RTC server ? |
Can some tell me how to import User from LDAP to RTC server programmetically. I looked into call mechanism at RTC WebClient .It uses AdminRestService and IExternalUserRegistryRestService both of which have discouraged access over plugins\com.ibm.team.repository.service_1.1.1.v20110524_1821\repository_service.jar.
Can someone tell me an alternative way to import LDAP User to RTC server ? |
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.