Delete inactive users (question about API)

Hi, with the influx of spam account that plagues our (but I suspect any) GitLab CE installation, I would like to automate the deletion of the accounts that have:

  1. Created the account, but never logged in more than once or never
  2. The last log time is more than month (or any other time limit) in the past
  3. They don’t have any activity in the GitLab, e.g. no comments, no MR, no nothing

I can do the first two (1 and 2) using the GitLab API, but I haven’t found the right API calls to get the information about the user activity. Is there such API call?

Hey @oerdnj, right now there is no such an option. However you can look at https://gitlab.com/gitlab-org/gitlab-ee/issues/1085, feel free to leave your comment in there as well so the feature proposal get’s some more attention.

Hi @dsumenkovic, thanks for the reply. Could you clarify what do you mean by “no such an option”?

Is there no such call in the API that can get me list of comments/MRs/etc… or do you mean there’s no automation in GitLab directly?

I am perfectly fine to use just API - I need to check spammy content in Bio and Website URLs anyway.

Found it. It’s Events API:

Thank you, Rubber Ducky :slight_smile: