Bulk delete users from Crucible Database

I accidentally imported my entire corporate LDAP user database into my Crucible-Fisheye instance, which makes user management extremely difficult.


I want to do a bulk delete of all users who have never actually used the system (less than 150 of the ~10k loaded users have ever actually used the system).  Is the best way to do this via SQL scripts?  I am in the process of creating a local group that contains everyone who has ever registered activity, so I could just delete all users not in that group, but I'm worried about linkages between tables and the best way to do it.


Any suggestions on how to get this done, I'm a SQL novice other than generating simple queries, so all help would be much appreciated. 

1 answer

Hi Matt,

Please try to use the Admin Rest API:

To get a list of all users: 

GET /rest-service-fecru/admin/users 

More details: https://docs.atlassian.com/fisheye-crucible/latest/wadl/fecru.html#rest-service-fecru:admin:users

To get users in the active group:

GET /rest-service-fecru/admin/groups/{active group name}/users

More details: https://docs.atlassian.com/fisheye-crucible/latest/wadl/fecru.html#rest-service-fecru:admin:groups:name:users

Then you can delete all users which are not in the {active group name}  with:

DELETE /rest-service-fecru/admin/users/{user name}

More details: https://docs.atlassian.com/fisheye-crucible/latest/wadl/fecru.html#rest-service-fecru:admin:users:name

You may want to use the FeCru Admin REST python client when writing the script: https://bitbucket.org/atlassian/fecru-rest-examples/src/master/python/


Suggest an answer

Log in or Join to answer
Community showcase
Alexey Matveev
Published Saturday in Jira

How to run Jira in a docker container

Everything below is tested on Ubuntu 17.10. I prefer to use Jira in a docker container because: 1. I can install Jira with a couple of commands. 2. I can start and stop Jira just by starting and s...

506 views 6 8
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot