ListRepositories - 查询代码库列表

更新时间:
复制 MD 格式

查询代码库列表,支持分页、排序功能,支持关键字搜索,支持归档条件过滤。

调试

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

调试

授权信息

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

请求语法

GET /repository/list HTTP/1.1

请求参数

名称

类型

必填

描述

示例值

organizationId

string

是

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

60de7a6852743a5162b5f957

accessToken

string

否

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

f0b1e61db5961df5975a93f9129d2513

page

integer

否

页码 默认值为 1,从第 1 页开始。

2

perPage

integer

否

每页大小 默认值为 20,取值范围【1,100】

20

orderBy

string

否

排序字段 可选值:created_at,id,name,path,updated_at,last_activity_at”

created_at

sort

string

否

排序方式 默认值为 desc desc - 降序 asc - 升序

desc

search

string

否

搜索关键字

Demo

archived

boolean

否

是否列出归档项目 可选值:true / false

false

minAccessLevel

integer

否

最小权限过滤,枚举值:

  • 20:浏览者

  • 30:开发者

  • 40:管理员

40

返回参数

名称

类型

描述

示例值

object

requestId

string

请求 ID

4D6AF7CC-B43B-5454-86AB-023D25E44868

errorMessage

string

错误信息

""

total

integer

总数量

149

success

boolean

调用是否成功

true

errorCode

integer

错误码

SYSTEM_UNKNOWN_ERROR

result

array<object>

返回结果

object

仓库对象

lastActivityAt

string

最后活跃时间

2022-01-14T21:08:26+08:00

namespaceId

integer

上级路径的 id

745

avatarUrl

string

头像地址

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

starCount

integer

被收藏的数量

0

archive

boolean

代码库是否归档

false

createdAt

string

创建时间,采用 ISO 8601 格式并包含时区偏移。

2022-01-14T21:08:26+08:00

star

boolean

是否被收藏

false

importStatus

string

代码库导入状态 可选值:started / finished / failed / stopping / none

started

webUrl

string

页面访问时的 URL

""

description

string

代码库描述

测试Codeup托管

nameWithNamespace

string

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

codeup-test-org / test-codeup(斜杠两侧有空格)

pathWithNamespace

string

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

codeup-test-org/test-codeup

path

string

代码库路径

test-codeup

visibilityLevel

string

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

0

accessLevel

integer

权限类型 20-浏览者 30-开发者 40-管理员

40

updatedAt

string

更新时间,采用 ISO 8601 格式并包含时区偏移。

2022-01-14T21:08:26+08:00

name

string

代码库名称

codeupTest

Id

integer

代码库 Id

1

示例

正常返回示例

JSON格式

{
  "requestId": "4D6AF7CC-B43B-5454-86AB-023D25E44868",
  "errorMessage": "\"\"",
  "total": 149,
  "success": true,
  "errorCode": 0,
  "result": [
    {
      "lastActivityAt": "2022-01-14T21:08:26+08:00",
      "namespaceId": 745,
      "avatarUrl": "https://tcs-devops.aliyuncs.com/thumbnail/112afcb7a6a35c3f67f1bea827c4/w/100/h/100",
      "starCount": 0,
      "archive": false,
      "createdAt": "2022-01-14T21:08:26+08:00",
      "star": false,
      "importStatus": "started",
      "webUrl": "\"\"",
      "description": "测试Codeup托管",
      "nameWithNamespace": "codeup-test-org / test-codeup(斜杠两侧有空格)",
      "pathWithNamespace": "codeup-test-org/test-codeup",
      "path": "test-codeup",
      "visibilityLevel": "0",
      "accessLevel": 40,
      "updatedAt": "2022-01-14T21:08:26+08:00",
      "name": "codeupTest",
      "Id": 1
    }
  ]
}

错误码

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

变更历史

更多信息,参考变更详情。