Delete Inactive Users From Gallery
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi all!
I am trying to delete a list of inactive users, users that haven't accessed to the gallery in the last year. I don't know which is the most effective way. I know that there is an API to delete the users but the idea is do it in a massive way and, in the future, maybe have a workflow that I can run and automatically delete a list of users.
Is there any recommendation on how to do that?
Thank you for your help! 😃
- Labels:
- Gallery
- Optimization
- Server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
If you are struggling with how to identify 'inactive' users, you can use Server API 'GET /v3/users'.
Here is snapshot of Swagger of GET /v3/users. In the API response, there is "lastloginDateTime" that has information when that user logged in Gallery at last. By using this information, you can identify inactive users with your own criteria.
Do not forget to explicitly set API parameter "view"="Full", otherwise "lastloginDateTime" are not included in the response.
When it comes to deleting users, as you said, you can use another API. As cautioned in Swagger, users who already have any assets cannot be deleted.
 
Instead of deleting users, it is also good option to change role of inactive users to "No Access" so you can make them revival gain any time.
This is helpful when you use Windows auth for gallery, and some users are already retired and does not exist but still persist as Alteryx Server users. In my understanding, for "No Access" users, Alteryx Server will not attempt to send LDAP query to Active Directory so less likely to have trouble due to non-existing users.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @gawa
Thanks for your help. Do you know if it is possible to pass a list of users using the API or does it have to be done one by one?
On the other hand, my intention was to delete them in order to free up space in the database, just those users that are inactive and don't have any workflows nor collections. That's why I wanted to delete them.
Thank you! 😃
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@SSorianoA OK, so you are concerning about bulk operation.
It depends on which platform you use to call Server API. If Alteryx Designer, you can create multiple rows of API request for each user, and feed to single Download tool. Then, API will be sent to Alteryx Server one by one for each row.(As a general practice, do recommend to throttle records in Download tool to avoid excess load on Server)
If Python or some programming language, you can use FOR loop to call API for each user.
I'm not sure Server API can accept list of json [{user1...},{user2...}] with single API call. If it works, it's easier than what I said above.(Sorry, could not confirm how it works actually)
