查询某个仓库的详细信息-九游平台
功能介绍
根据仓库uuid(由createrepository接口返回)获取仓库信息。返回 包含id,name,组名,仓库访问url。
调试
您可以在中调试该接口,支持自动认证鉴权。api explorer可以自动生成sdk代码示例,并提供sdk代码示例调试功能。
uri
get /v2/repositories/{repository_uuid}
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
repository_uuid |
是 |
string |
参数解释: 仓库的uuid 约束限制: 必传 取值范围: 32位字符串 默认取值: 不涉及 |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
x-auth-token |
是 |
string |
参数解释: 用户token。通过调用iam服务获取用户token接口获取(响应消息头中x-subject-token的值)。 约束限制: 必传。 取值范围: 字符串长度不少于1,不超过10万。 默认取值: 不涉及。 |
响应参数
状态码: 200
参数 |
参数类型 |
描述 |
---|---|---|
error |
error object |
参数解释: 响应错误: |
result |
repoinfov2 object |
参数解释: 响应结果 |
status |
string |
参数解释: 响应状态 取值范围:
|
参数 |
参数类型 |
描述 |
---|---|---|
code |
string |
参数解释: 错误码 取值范围: 请参见错误码 |
message |
string |
参数解释: 错误信息 取值范围: 字符串 |
参数 |
参数类型 |
描述 |
---|---|---|
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 |
参数解释: 当前用户是否是仓库的创建者 取值范围:
|
lfs_size |
string |
参数解释: 仓库 lfs 容量,单位为m,大于 1024m 则单位为 g 取值范围: 字符串 |
project_is_deleted |
string |
参数解释: 项目是否被删除 取值范围: 字符串 |
project_uuid |
string |
参数解释: 项目id,获取方式请参见获取项目id 取值范围: 字符串 |
repository_id |
integer |
参数解释: 仓库主键id 取值范围: 1-2,147,483,647 |
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 |
参数解释: 仓库状态 取值范围:
|
updated_at |
string |
参数解释: 更新时间 取值范围: 字符串 |
userrole |
integer |
参数解释: 用户在仓库中的权限 取值范围:
|
visibility_level |
integer |
参数解释: 可见范围 取值范围:
|
web_url |
string |
参数解释: web url 路径,访问它将跳转至仓库详情页 取值范围: 字符串 |
请求示例
get https://{endpoint}/v2/repositories/{repository_uuid}
响应示例
状态码: 200
ok
{ "result" : { "repository_uuid" : "045ceabb9aea40579d5a759e84fa7f0a", "repository_id" : 468485, "repository_name" : "creatrepository_mi9af", "ssh_url" : "git@repo.alpha.devcloud.inhuawei.com:demo00228/creatrepository_mi9af.git", "https_url" : "https://repo.alpha.devcloud.inhuawei.com/demo00228/creatrepository_mi9af.git", "group_name" : "demo00228", "web_url" : "https://alpha.devcloud.inhuawei.com/repo/468485/home", "visibility_level" : 0, "created_at" : "2019-10-15 09:40:27", "updated_at" : null, "repository_size" : null, "lfs_size" : null, "creator_name" : null, "domain_name" : null, "star" : null, "status" : null, "is_owner" : null, "iam_user_uuid" : null, "project_uuid" : "4838955a48e2492bbe44b31bc4c272f6", "project_is_deleted" : "false", "userrole" : null }, "status" : "success" }
状态码
状态码 |
描述 |
---|---|
200 |
ok |
错误码
请参见错误码。
相关文档
意见反馈
文档内容是否对您有帮助?
如您有其它疑问,您也可以通过华为云社区问答频道来与我们联系探讨