您的位置:首页 > 其它

gitlab rest api

2016-12-20 17:47 197 查看
参考官方api网站:http://docs.gitlab.com/ce/api/groups.html

1 添加群组

http://ip:port/gitlab/api/v3/groups?private_token=Token&name=zhouTeam1Test123&path=zhouTeam1Test123

其中,Token必须为超级管理员的token,如果为普通管理员的token,会报403错误。

Token为gitlab中刚创建时的超超级管理员的Token才可以。

2 得到所有群组

GET /groups

会得到所有的api,但只能得到默认20条记录,因为如果记录较多,每页展示20条记录。

By default, groups only get 20 namespaces at a time because the API results are paginated.

To get more (up to 100), pass the following as an argument to the API call:

具体如:http://ip/gitlab/api/v3/groups?private_token=XXX&per_page=2000000000
/groups?per_page=100


And to switch pages add:
/groups?per_page=100&page=2
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  gitlab