Gitlab查询所有的项目和项目组

2020-08-17  本文已影响0人  戈壁堂

Gitlab : List all the projects and all the groups

分别调用projects接口和groups接口即可,类似——

curl --head "https://<host/api/v4/projects?private_token=<your private token>&per_page=100&page=<page_number>"

只返回head部分,其中包括X-TotalX-Total-Pages的值。默认page从1开始计算,默认每页返回20条,最大返回100个条目

官方推荐的gitlab api客户端实现


任务:将所有的项目平均分配给四个相同的服务实例分别处理。任务异步处理,时效要求不高,要所有的项目都完成后再统一发送结果


API提供接口进行任务初始化:

id ip startPage total finish status
15 10.19.3.130 25 2560 1005 1
上一篇 下一篇

猜你喜欢

热点阅读