gitlab api

来源:互联网 发布:windows优化大师 win7 编辑:程序博客网 时间:2024/06/09 21:46

前置工作:获取private token, http://gitlabhost/profile/account

这里写图片描述

1 查看用户基本信息(more: http://gitlabhost/help/api/users.md)

curl -H "PRIVATE-TOKEN:xxxxxx" "http://gitlabhost/api/v3/user" 

2 查看当前用户是成员的所有工程信息(more: http://gitlabhost/help/api/projects.md)

curl -H "PRIVATE-TOKEN:xxxxxx" "http://gitlabhost/api/v3/projects" 

3 查看所有可见的分组(more: http://gitlabhost/help/api/groups.md)

curl -H "PRIVATE-TOKEN:xxxxxx" "http://gitlabhost/api/v3/groups" 

4 查看namespace(more: http://gitlabhost/help/api/namespaces.md)

curl -H "PRIVATE-TOKEN:xxxxxx" "http://gitlabhost/api/v3/namespaces" 
  • 更多内容,请查看 http://gitlabhost/help, gitlabhost为各自搭建的gitlab服务器域名
0 0