文档

ListRepositoryGroups - 查询代码组列表

更新时间:

查询代码组列表,支持分页、按创建时间和更新时间排序以及关键字搜索。

调试

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

授权信息

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

请求语法

GET /repository/groups/get/all

请求参数

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

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

60de7a6852743a5162b5f957
accessTokenstring

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

f0b1e61db5961df5975a93f9129d2513
parentIdlong

父路径的 namespaceId

  • 若查询所有组,那么该值为企业所对应的 namespaceId(非 organizationId)
  • 若查询某个组下的所有组,那么该值为组所对应的 namespaceId
26842
pagelong

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

1
pageSizelong

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

10
searchstring

搜索关键字

Demo
orderBystring

排序字段,仅有更新时间和创建时间的排序,默认为按照更新时间排序

  • 更新时间:updated_at
  • 创建时间:created_at
updated_at
sortstring

排序方式,默认为 desc

  • desc:降序
  • asc:升序
desc
includePersonalboolean

是否包含个人的私有组

false

返回参数

名称类型描述示例值
object

Schema of Response

requestIdstring

请求 ID

F7B85D1B-D1C2-140F-A039-341859F130B9
errorMessagestring

错误信息

”“
errorCodestring

错误码

Openapi.RequestError
successboolean

调用是否成功

true
totallong

总记录数

100
resultobject []

返回结果列表

idlong

代码组 ID(组空间的 namespaceId)

19285
pathstring

组路径

test-codeup
namestring

组名称

test-codeup
nameWithNamespacestring

组名称(含父路径)

60de7a6852743a5162b5f957 / test-codeup(斜杠两侧有空格)
pathWithNamespacestring

组路径(含父路径)

60de7a6852743a5162b5f957/test-codeup
visibilityLevelinteger

代码组的可见性

  • 0:私有
  • 10:企业可见
0
avatarUrlstring

头像地址

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

页面访问时的 URL

""
typestring

组的类型为:Group

Group
descriptionstring

代码组的描述信息

描述信息的具体内容
parentIdlong

父路径 ID

26842
ownerIdlong

拥有者 ID

19230
accessLevelinteger

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

40
projectCountlong

组包含的代码库数量

10
groupCountlong

子组的数量(非递归统计)

10
createdAtstring

创建时间

2022-03-18 14:24:54
updatedAtstring

更新时间

2022-03-18 14:24:54

示例

正常返回示例

JSON格式

{
  "requestId": "F7B85D1B-D1C2-140F-A039-341859F130B9",
  "errorMessage": "”“",
  "errorCode": "Openapi.RequestError",
  "success": true,
  "total": 100,
  "result": [
    {
      "id": 19285,
      "path": "test-codeup",
      "name": "test-codeup",
      "nameWithNamespace": "60de7a6852743a5162b5f957 / test-codeup(斜杠两侧有空格)",
      "pathWithNamespace": "60de7a6852743a5162b5f957/test-codeup",
      "visibilityLevel": 0,
      "avatarUrl": "https://tcs-devops.aliyuncs.com/thumbnail/112afcb7a6a35c3f67f1bea827c4/w/100/h/100",
      "webUrl": "\"\"",
      "type": "Group",
      "description": "描述信息的具体内容",
      "parentId": 26842,
      "ownerId": 19230,
      "accessLevel": 40,
      "projectCount": 10,
      "groupCount": 10,
      "createdAt": "2022-03-18 14:24:54",
      "updatedAt": "2022-03-18 14:24:54"
    }
  ]
}

错误码

HTTP status code错误码错误信息描述
403Forbidden.AccessDeniedThe user is not authorized to perform the operation.用户无权限执行相关操作
403Forbidden.UserNotInCurrentOrganizationThe user is not in the organization and is not authorized to perform the operation.当前用户不在该企业中,无权进行操作。

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

变更历史

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