文档首页> 代码托管 CodeArts Repo> API参考> 历史API> Repository> 查询项目下的某个仓库(废弃)
更新时间:2022-11-21 GMT+08:00
分享

查询项目下的某个仓库(废弃)

功能介绍

不建议再使用,建议使用/{repository_uuid}/status

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

GET /v1/repositories/{repository_uuid}

表1 路径参数

参数

是否必选

参数类型

描述

repository_uuid

String

仓库的uuid,用来指定需要查看的仓库

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token。

通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。

响应参数

状态码: 200

表3 响应Body参数

参数

参数类型

描述

error

Error object

响应错误

result

RepoInfo object

响应结果

status

String

响应状态

表4 Error

参数

参数类型

描述

code

String

错误码

message

String

错误信息

表5 RepoInfo

参数

参数类型

描述

createAt

String

创建时间

groupName

String

仓库组名(克隆地址中域名后面项目名前的一段 示例:git@codehub.alpha.devcloud.inhuawei.com:Demo00228/testword.git 组名:Demo00228)

httpUrl

String

https url

id

String

仓库uuid(由CreateRepository接口返回)

最小长度:32

最大长度:32

name

String

仓库名

最小长度:2

最大长度:128

projectId

String

项目的uuid

最小长度:32

最大长度:32

projectIsDelete

String

项目是否被删除

repoId

String

仓库主键id

最小长度:1

最大长度:40

sshUrl

String

ssh url

visibilityLevel

Integer

是否可见:0私有仓库,20公有仓库

webUrl

String

web url 访问路径

请求示例

GET https://{endpoint}/v1/repositories/{repository_uuid}

响应示例

状态码: 200

OK

{
  "result" : {
    "id" : "dadb20863d7d4ef8bc0b4740db7358be",
    "repoId" : "472210",
    "name" : "testword",
    "sshUrl" : "git@codehub.alpha.devcloud.inhuawei.com:Demo00228/testword.git",
    "httpUrl" : "https://codehub.alpha.devcloud.inhuawei.com/Demo00228/testword.git",
    "groupName" : "Demo00228",
    "webUrl" : "https://alpha.devcloud.inhuawei.com/codehub/472210/home",
    "visibilityLevel" : 0,
    "createAt" : "2019-10-21 17:49:33",
    "projectId" : "4838955a48e2492bbe44b31bc4c272f6",
    "projectIsDelete" : "false"
  },
  "status" : "success"
}

状态码

状态码

描述

200

OK

错误码

请参见错误码

分享:

    相关文档

    相关产品