vault backup: 2025-12-10 11:37:35
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
---
|
||||
title: Gitlab get repo urls
|
||||
tags:
|
||||
- IT/Development/REST
|
||||
- IT/Tools/Gitlab
|
||||
- IT/Tools/Shell
|
||||
---
|
||||
|
||||
```bash
|
||||
curl --header "Private-Token: bFcsw1ebNhoFgKysksU1" https://gitlab.thpeetz.de/api/v4/projects/ | jq '.[] | { id: .id, url: .http_url_to_repo }'
|
||||
curl --header "Private-Token: aJVkcL2a6dDSVhJYzqEn" https://gitlab.thpeetz.de/api/v4/projects\?per_page=100 | jq '.[] | .http_url_to_repo'
|
||||
|
||||
for projectid in $(curl --header "Private-Token: aJVkcL2a6dDSVhJYzqEn" https://gitlab.thpeetz.de/api/v4/projects\?per_page\=100 | jq '.[] | .id')
|
||||
do curl --header "Private-Token: aJVkcL2a6dDSVhJYzqEn" https://gitlab.thpeetz.de/api/v4/projects/$projectid/hooks | jq
|
||||
done
|
||||
|
||||
```
|
||||
|
||||
## Links
|
||||
|
||||
- https://docs.gitlab.com/ee/api/index.html
|
||||
- https://docs.gitlab.com/ee/api/projects.html
|
||||
- https://docs.gitlab.com/ee/user/project/settings/project\_access\_tokens.html
|
||||
- https://docs.gitlab.com/ee/api/remote_mirrors.html
|
||||
|
||||
|
||||
Reference in New Issue
Block a user