Recent searches


No recent searches

Are there any ways to list soft deleted users via API or any workaround?



Posted Aug 30, 2022

Hello team,

I'm trying to implement an app to show soft deleted users and to delete them permanently.

 

Endpoint below returns results include permanently deleted user:

GET /api/v2/deleted_users

If I exclude users whose name are "Permanently Deleted User", I can get soft deleted users list though, there are 2 problems.

1. Renaming to "Permanently Deleted User" takes time after permanent deletion, which cause my app still display permanently deleted users as soft deleted users until the name will be changed.

2. My customer who will use this app need to delete thousands of users per week. The number of permanently deleted users will be accumulated, which means more time and API credit are required to get soft deleted users from result of the endpoint above.

 

I wondered that no particular API to get soft deleted users even though there is admin UI to see them.

Any help would be appreciated.

Best regards,

Yusuke


0

2

2 comments

image avatar

Tipene Hughes

Zendesk Developer Advocacy

Hi test user,

Thanks for reaching out!

Unfortunately there isn't an endpoint which returns only soft-deleted users. As you mentioned, the deleted_users endpoint will return a list of both soft-deleted and permanently deleted users. The best option I can suggest would be to iterate over the array of users that is returned and filter out any users with the name "Permanently Deleted User".

Sorry I couldn't be more help! Let me know if you have any questions.

Tipene

1


Hi Tipene,

Thanks for your reply.

I understood your suggestion is the best option.

Yusuke

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post