---
title: Gitlab get repo urls
updated: 2021-05-20 12:31:48Z
created: 2021-05-07 21:05:39Z
tags:
  - IT/Tools/Gitlab
  - Development/REST
  - Development/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


