API get all my repos (also privates)

Hi,

I want to list all of my repos with curl from bash:

curl --header "PRIVATE-TOKEN: $TOKEN" https://gitlab.com/api/v3/projects

but I only receive 10 repos… and I have more than 10 - how can I increase number of returned repos?

OK seems it solves my case:

curl --header "PRIVATE-TOKEN: $TOKEN" "https://gitlab.com/api/v3/projects/?simple=yes&private=true&per_page=1000&page=1"

per_page max is 100 so you’ll probably only get the first 100 projects.
https://docs.gitlab.com/ee/api/README.html

Loop through to get all projects: (note that output would be concatenated json)
declare -r PER_PAGE=100
page=1
project=“dummy”

while [ "project" != "[]" ]; do project=(curl --header “PRIVATE-TOKEN: {PRIVATE_TOKEN}" --insecure "https://{GITLAB_URI}/api/v3/projects/?simple=yes&private=true&per_page={PER_PAGE}&page={page}”)
echo "project" >> projectList.txt page=((page+1))
done