I`ve been using Gitlab CE for a few months and i need to change all users project creation limit to “0”. I know that i can change this on their settings, but there are a lot of users, is there a way that i can apply a script that do this for me? If so, how do i apply it? is there any API that i have to use or how do i excecute it?
for user_id in "{USER_IDS[@]}"; do
curl -H 'Content-Type:application/json' -H 'Accept:application/json' -X PUT -d '{"projects_limit":0}' http://<gitlab address>/api/v4/users/{user_id}?per_page=500&private_token=
done
Hello everyone from 2020!
Thanks for your help! Based on what I found here and on GitLab API Docs I wrote script that can be used to change any data for all users (in my case it was to change projects limit to 0 for all users).
Fell free to check it out: https://github.com/timaparf/Gitlab-API-User-Update-