云服务器内容精选

  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 error Error object 响应错误 result ProjectRepository object 响应结果 status String 响应状态 表5 Error 参数 参数类型 描述 code String 错误码 message String 错误信息 表6 ProjectRepository 参数 参数类型 描述 projectUuid String 项目ID,获取方式请参见获取项目ID。 最小长度:32 最大长度:32 repositoryUuid String 仓库UUID 最小长度:32 最大长度:32
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 error Error object 响应错误 result RepoListInfoV2 object 响应结果 status String 响应状态 表5 Error 参数 参数类型 描述 code String 错误码 message String 错误信息 表6 RepoListInfoV2 参数 参数类型 描述 repositories Array of RepoInfoV2 objects 仓库列表 total Integer 仓库总数 表7 RepoInfoV2 参数 参数类型 描述 created_at String 创建时间 creator_name String 创建者的用户名,在用户是租户的情况下,用户名和租户名相等 domain_name String 创建者的租户名 group_name String 仓库组名(克隆地址中域名后面项目名前的一段 示例:git@repo.alpha.devcloud.inhuawei.com:Demo00228/testword.git 组名:Demo00228 ) https_url String 使用 https 克隆仓库时所使用的 url iam_user_uuid String 用户的 iam user uuid is_owner Integer 当前用户是否是仓库的创建者,1:是,0:不是 lfs_size String 仓库 LFS 容量,单位为M,大于 1024M 则单位为 G project_is_deleted String 项目是否被删除 project_uuid String 项目的uuid repository_id Integer 仓库主键id repository_name String 仓库名 repository_size String 仓库总容量 = 仓库 LFS 容量 + git 库容量,单位为M,大于 1024M 则单位为 G repository_uuid String 仓库uuid(由CreateRepository接口返回) ssh_url String 使用 ssh 方式克隆仓库时所使用的 url star Boolean 当前用户是否收藏该仓库 status Integer 仓库状态, 0:仓库正常创建成功 1:仓库创建中 2:创建失败 3:仓库冻结 4:仓库已经关闭 updated_at String 更新时间 userRole Integer 用户在仓库中的权限:20:只读成员 30:普通成员 40:管理员 visibility_level Integer 是否可见:0私有仓库,20公有仓库 web_url String web url 路径,访问它将跳转至仓库详情页
  • 响应示例 状态码: 200 OK { "result" : { "total" : 14, "repositories" : { "repository_uuid" : "d0457f74cc5b43d989ded7248f71b4e5", "repository_id" : 468480, "repository_name" : "CreatRepository_2qD5i", "ssh_url" : "git@repo.alpha.devcloud.inhuawei.com:Demo00228/CreatRepository_2qD5i.git", "https_url" : "https://repo.alpha.devcloud.inhuawei.com/Demo00228/CreatRepository_2qD5i.git", "group_name" : "Demo00228", "web_url" : "https://alpha.devcloud.inhuawei.com/repo/468480/home", "visibility_level" : 0, "created_at" : "2019-10-15 09:40:26", "updated_at" : "2019-10-15 09:40:26", "repository_size" : "0.06M", "lfs_size" : "0.00M", "creator_name" : "repo", "domain_name" : "repo", "star" : false, "status" : 0, "is_owner" : 1, "iam_user_uuid" : "a618e34bd5704be3ae3395dfede06041", "project_uuid" : "4838955a48e2492bbe44b31bc4c272f6", "project_is_deleted" : "false", "userRole" : null } }, "status" : "success"}
  • URI GET /v2/projects/{project_uuid}/repositories 表1 路径参数 参数 是否必选 参数类型 描述 project_uuid 是 String 项目的uuid 表2 Query参数 参数 是否必选 参数类型 描述 page_index 否 Integer 分页索引,从1开始计数 page_size 否 Integer 每页条目数 search 否 String 搜索关键字