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 vote
connor mcguane 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?

1 vote
Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events