文档

GetRepository - 查询代码库

查询代码库,支持按代码库ID和代码库路径(Path)查询。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求语法

GET /repository/get

请求参数

名称类型必填描述示例值
organizationIdstring

企业标识,也称企业 id,字符串形式,可在云效访问链接中获取,如 https://devops.aliyun.com/organization/【OrganizationId】

60de7a6852743a5162b5f957
accessTokenstring

个人访问令牌。 使用阿里云 AK+SK 或使用 STS 临时授权方式不需要传该字段

f0b1e61db5961df5975a93f9129d2513
identitystring

代码库 ID 或路径

2835387 或 codeup/codeup-demo

返回参数

名称类型描述示例值
object

响应结果

requestIdstring

请求 ID

37294673-00CA-5B8B-914F-A8B35511E90A
errorCodestring

错误码

SYSTEM_UNKNOWN_ERROR
errorMessagestring

错误信息

""
successboolean

调用是否成功

true
repositoryobject

代码库信息

archiveboolean

归档标识

false
avatarUrlstring

代码库头像地址

https://tcs-devops.aliyuncs.com/thumbnail/112afcb7a6a35c3f67f1bea827c4/w/100/h/100
createdAtstring

创建时间

2020-06-19T04:02:00.744Z
creatorIdlong

创建者 ID

19258
defaultBranchstring

默认分支

master
demoProjectStatusboolean

DEMO 库标识

false
descriptionstring

描述

repo desc
httpUrlToRepositorystring

HTTP 克隆地址

https://codeup.aliyun.com/xxx/test/test.git
idlong

代码库 ID

100
lastActivityAtstring

最后活跃时间

2020-06-19T04:02:00.744Z
namestring

名称

test
nameWithNamespacestring

代码库完整名称(含完整组名称)

test / test(斜杠两侧有空格)
namespaceobject

父空间

idlong

id

100
avatarstring

头像地址

https://xxx.jpg
createdAtstring

创建时间

2020-06-19T04:02:00.744Z
descriptionstring

描述

repo desc
namestring

父空间名称

xxx
ownerIdlong

归属者 ID

100
pathstring

父空间路径

test
updatedAtstring

更新时间

2020-06-19T04:02:00.744Z
visibilityLevelinteger

可见性 0 - 私有,仅代码库成员可见 10 - 企业内公开,企业成员可见

0
pathstring

路径

test
pathWithNamespacestring

代码库完整路径(含完整组路径)

test/test
sshUrlToRepositorystring

SSH 克隆地址

git@codeup.aliyun.com:xxx/test/test.git
visibilityLevelinteger

可见性 0 - 私有,仅代码库成员可见 10 - 企业内部公开,企业成员可见

0
webUrlstring

页面访问地址

https://codeup.aliyun.com/xxx/test/test

示例

正常返回示例

JSON格式

{
  "requestId": "37294673-00CA-5B8B-914F-A8B35511E90A",
  "errorCode": "SYSTEM_UNKNOWN_ERROR",
  "errorMessage": "\"\"",
  "success": true,
  "repository": {
    "archive": false,
    "avatarUrl": "https://tcs-devops.aliyuncs.com/thumbnail/112afcb7a6a35c3f67f1bea827c4/w/100/h/100",
    "createdAt": "2020-06-19T04:02:00.744Z",
    "creatorId": 19258,
    "defaultBranch": "master",
    "demoProjectStatus": false,
    "description": "repo desc",
    "httpUrlToRepository": "https://codeup.aliyun.com/xxx/test/test.git",
    "id": 100,
    "lastActivityAt": "2020-06-19T04:02:00.744Z",
    "name": "test",
    "nameWithNamespace": "test / test(斜杠两侧有空格)",
    "namespace": {
      "id": 100,
      "avatar": "https://xxx.jpg",
      "createdAt": "2020-06-19T04:02:00.744Z",
      "description": "repo desc",
      "name": "xxx",
      "ownerId": 100,
      "path": "test",
      "updatedAt": "2020-06-19T04:02:00.744Z",
      "visibilityLevel": 0
    },
    "path": "test",
    "pathWithNamespace": "test/test",
    "sshUrlToRepository": "git@codeup.aliyun.com:xxx/test/test.git",
    "visibilityLevel": 0,
    "webUrl": "https://codeup.aliyun.com/xxx/test/test"
  }
}

错误码

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
暂无变更历史
  • 本页导读 (0)
文档反馈