1 Reply Latest reply on Jun 6, 2013 8:25 AM by jrenaud

    Web Services Delete Multiple Users

      Hey Everybody,

       

      I've got a case where a customer mistakenly sync'd their Development environment with the wrong corporate address list and now they have over 1,000 excess Users to remove.  We no longer recommend using SQL to remove Usernames because it can leave orphan data but using the API is fine.  Is it possible and how would one go about deleting multiple users using web services?

       

      I know you can delete a user, I'm fairly certain you could Get People sort by date created, in this case the user says all incorrect accounts Username's start with four zeroes ( 00001za1, 00002al1, ect.).

       

      Assuming we could get the list of bad users and we have a delete command what would need to happen next?  Some kind of script that Looks up a user, then runs the command to delete the user based on the results of the lookup?

       

       

       

       

       

      "Rats, but Thank you.

       

      1,187 Bad user accounts in my Jive, 1,187 bad user accounts.  I one down, stop and frown, 1,186 bad user accounts in my Jive -

      1,186 Bad user accounts in my Jive, 1,187 bad user accounts.  I one down, stop and frown, 1,185 bad user accounts in my Jive -

      1,185 Bad user accounts in my Jive, 1,187 bad user accounts.  I one down, stop and frown, 1,184 bad user accounts in my Jive -


      (sigh)" -check it out here.

        • Re: Web Services Delete Multiple Users
          jrenaud

          I'd presume this is a Jive 6 or cloud environment, where the v3 REST API is available Jive REST API v3.3

           

          For these sort of tasks, I'd be tempted to authenticate to the instance using an user with admin access to the site, and then run a javascript from a browser (from the Firebug console in Firefox or Chrome, or other similar tool). Being on already logged on the site, all API calls will use the current session's credentials.

           

          I'd then proceed, using the REST API through a script helped by a libraby such as jQuery to process ajax calls to automatically do the following: Use people search Jive REST API v3.3 → Search service according to the pattern described, probably check again the result's name to make sure they really fully fit the incorrect accounts pattern, and make the call to delete each of these resulting Person Jive REST API v3.3 → Person service.

           

          Of course, calls to the REST API could be made using other tools also.