更新时间:2025-08-20 GMT+08:00
示例1:查询用户所有仓库
前提条件
用户已经在软件开发生产线控制台开启了代码托管服务。
总体思路
通过用户token查询当前用户所有仓库的列表。
查询用户的所有仓库
- 接口信息:
URI:GET v2/projects/repositories
API Explorer在线调试请参见:查询用户的所有仓库。
- 请求示例:
GET https://repo.example.com/v2/projects/repositories
- 响应示例:
{
"result": {
"total": 40,
"repositories": [
{
"star": false,
"status": 5,
"userRole": null,
"repository_uuid": "25c88b23d4dc400fa7b3e2a152e4d53c",
"repository_id": 522140,
"repository_name": "1111111111111",
"ssh_url": "git@repo.example.com:testzxq00001/1111111111111.git",
"https_url": "https://repo.example.com/testzxq00001/1111111111111.git",
"group_name": "testzxq00001",
"web_url": "https://repo.example.com/codehub/522140/home",
"visibility_level": 0,
"created_at": "2020-07-22 10:45:56",
"updated_at": "2020-07-22 10:45:56",
"repository_size": "0.16M",
"lfs_size": "0.00M",
"creator_name": "creator_name",
"domain_name": "domain_name",
"is_owner": 1,
"iam_user_uuid": "a618e34bd5704be3ae3395dfede06041",
"project_uuid": "a689e057c2304abfa35d4ff65630a90a",
"project_is_deleted": "false"
}
]
},
"status": "success"}
父主题: 应用示例