简体   繁体   English

如何通过 API 在 gitlab 中获取名为“gpt”的组下的所有项目

[英]How to get all projects under a group called "gpt" in gitlab through API

My group has subgroups and projects.我的小组有子小组和项目。 How do I retrieve all projects under "gpt" group in gitlab through API.如何通过 API 检索 gitlab 中“gpt”组下的所有项目。

Gitlab Groups API for projects is paginated which means it gives max 100 records on 1 page.项目的 Gitlab 组 API 是分页的,这意味着它在一页上最多提供 100 条记录。 You need to check the 'X-Total-Pages' under the response header.您需要检查响应 header 下的“X-Total-Pages”。 X-Total-Pages are the total pages that you need to loop through. X-Total-Pages 是您需要循环浏览的总页数。

resp.headers["X-Total-Pages"] should get you the total pages. resp.headers["X-Total-Pages"] 应该为您提供总页数。

You will iterate through X-Total-Pages to get the all projects.您将遍历 X-Total-Pages 以获取所有项目。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何为gitlab组中的所有项目设置一个gitlab代理,将项目单独部署到kuberenetes集群 - How to setup one gitlab agent for all projects in gitlab group to deploy projects separately to the kuberenetes cluster 如何使用 GitPython 从 GitLab 组中读取项目列表? - How can I read the projects list from a GitLab group with GitPython? 如何在 Python-Gitlab 中列出项目中的所有用户及其权限? - How to list all users and their permissions from projects in Python-Gitlab? Angular Firestore Group collection 获取多个文档下的所有文档 - Angular Firestore Group collection get all docs under a multiple document 如何获取 GCP 中所有项目的所有 VM 信息 - How to get all the VM's information for all Projects in GCP 如何备份 gitlab 组? - How to make a backup of a gitlab group? 作为对整个实例没有管理员权限的用户,如何为 GitLab 上的所有新项目设置默认分支名称? - How can I set the default branch name for all new projects on GitLab, as an user without admin right over entire instance? 如何通过 GitLab V4 api 列出 gitlab 项目中的所有项目变量 - How to list all the project variables in a gitlab project via GitLab V4 api 如何删除 gitlab 中的组? - How can I delete group in gitlab? GiLab - 是否可以通过 GitLab API 获得 4 天前执行的项目的作业 ID - GiLab - is it possible to get job id of the project which was executed 4 days ago through GitLab API
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM