Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Deleting a user in Fisheye/Crucible via the REST API

Hi,

It is possible to delete a user from Fisheye/Crucible via the admin interface. If the given user has one or more active reviews you will get a warning before finally clicking delete.

When using the rest interface: http://codereview/rest-service-fecru/admin/users/{username}

then the user is deleted without any warning.

I have tried with these ones to find reviews for a user:
http://codereview/rest-service/reviews-v1/filter/details?author=bola&states=Draft,Approval,Review,Summarize,Unknown

http://codereview/rest-service/reviews-v1/filter/details?moderator=bola&states=Draft,Approval,Review,Summarize,Unknown

http://codereview/rest-service/reviews-v1/filter/details?creator=bola&states=Draft,Approval,Review,Summarize,Unknown

http://codereview/rest-service/reviews-v1/filter/details?reviewer=bola&states=Draft,Approval,Review,Summarize,Unknown

If one of the above returns data the user should not be deleted.

Is it possible to use the Fisheye/Crucible REST API to find out if a user has active reviews in a more simple way ?

1 answer

1 accepted

2 votes
Answer accepted

Hi Claus,

You can use the same approach as you're using to verify whether there are reviews or not for a given user, but you can do it all in a single query by using the orRoles parameter set to true. This is one of the parameters that can be used in the /rest-service/reviews-v1/filter/details function, and by setting it to true you can put all the roles on the same request, and the concatenator between them will be read as OR, so you could have a request like the following:

http://codereview/rest-service/reviews-v1/filter/details?author=bola&moderator=bola&creator=bola&reviewer=bola&orRoles=true&states=Draft,Approval,Review,Summarize,Unknown

Regards,

Gustavo Refosco

Thanks a lot - just what I was looking for :-)

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Bitbucket Smart Commits vs. Genius Commits - What's the difference?

If you already heard about Smart Commits in Bitbucket, know that you just stumbled upon something even better (and smarter!): Genius Commits by Better DevOps Automation for Jira Data Center (+ Server...

114 views 0 2
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you