gitlab rest api
2016-12-20 17:47
197 查看
参考官方api网站:http://docs.gitlab.com/ce/api/groups.html
其中,Token必须为超级管理员的token,如果为普通管理员的token,会报403错误。
Token为gitlab中刚创建时的超超级管理员的Token才可以。
会得到所有的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
And to switch pages add:
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
相关文章推荐
- 持续交付系列之一:无人工干预持续交付
- centos 6.5安装GitLab全过程和问题记录
- 基于LDAP的用户系统
- 全新安装gitlab后出现504 bad gateway 及提示输入默认帐号错误
- Gitlab安装
- CentOS源码安装GitLab汉化版
- redhat6.3部署gitlab
- Git LFS(Large File Storage)
- 使用Gitlab和Gitlab CI做持续集成(理论篇)
- omnibus-gitlab迁移记录
- gitlab升级(Omnibus packages)
- 码云分布式之 Brzo 服务器
- www.zhangluya.com 相关技术分享
- gitlab的安装配置
- GitLab-CI与GitLab-Runner
- centos gitlab安装
- gitlab+jenkins的搭建
- 一键安装Gitlab后的备份、迁移与恢复
- gitlab 安装详解