--- 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