TIL how to archive all projects in a Gitlab group

rndmh3ro - May 19 '23 - - Dev Community

Gitlab does not yet allow archiving all projects in a group at once. To do this, you can either manually archive every project in the frontend, our you can do it via the API. Here’s an API-call to archive all projects within a group (using the gitlab-cli).

for id in $(glab api groups/:project_id/projects | jq .[].id); do glab api -X POST /projects/$id/archive; done

Enter fullscreen mode Exit fullscreen mode

Just replace :project_id with the ID of your group and run the command.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player