The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can i delete all unverified users in opsgenie via API?

Pavel Korostelev
August 8, 2021

I have 30-40 unverified users, and delete one by one a very long time...

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

2 votes
Answer accepted
Hana Kučerová
Community Champion
August 8, 2021

Hi @Pavel Korostelev ,

welcome to the Atlassian Community!

It looks like there's REST API endpoint for this, see here, section Delete User.

Please be aware I've never tested it myself.

Pavel Korostelev
August 9, 2021

Hi @Hana Kučerová  i need delete 40 unverified users by one click (one curl run)

Hana Kučerová
Community Champion
August 9, 2021

Hi @Pavel Korostelev ,

I don't think that's possible, I didn't find any endpoint for bulk delete.

You would probably need to:

  • send GET request to get all unverified users
  • go through all the unverified users
    • send DELETE request for each user 
Like Steffen Opel _Utoolity_ likes this
1 vote
connor mcguane
Contributor
August 9, 2021

We actually wrote a script to do this every 6 months.  When you pull down a list of all users, verified should be a field you could sort on from the payload (example payload).  Then just delete that subset of users through the API.

Pavel Korostelev
August 9, 2021

Hi, can you pls send an example script?

TAGS
AUG Leaders

Atlassian Community Events