Skip to content

Instantly share code, notes, and snippets.

@taylord0ng
Last active February 17, 2020 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taylord0ng/ce381982266be0b5b7f52cb54c98cee7 to your computer and use it in GitHub Desktop.
Save taylord0ng/ce381982266be0b5b7f52cb54c98cee7 to your computer and use it in GitHub Desktop.
gitlab api get all project
curl --location --request POST 'https://gitlab.com/api/graphql' \
--header 'Authorization: Bearer XXX' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query {\n group(fullPath: \"xxx-dev\") {\n id\n name\n projects {\n nodes {\n name\n httpUrlToRepo\n sshUrlToRepo\n }\n }\n }\n}","variables":{}}'
for i in m['data']['group']['projects']['nodes']:
print(i['sshUrlToRepo'] + ' ' + i['name'])
https://stackoverflow.com/questions/52554811/how-can-i-change-the-mirroring-settings-in-gitlab-over-the-api
https://docs.gitlab.com/ee/api/projects.html#edit-project
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment