ListGroupMembers - 查询代码组成员列表

更新时间:
复制为 MD 格式

通过 OpenAPI 查询代码组成员列表,无分页。

适用版本

中心版、Region

服务接入点与授权信息

产品

资源

所需权限

代码管理

成员

只读

请求语法

中心版

GET https://{domain}/oapi/v1/codeup/organizations/{organizationId}/groups/{groupId}/members

Region

GET https://{domain}/oapi/v1/codeup/groups/{groupId}/members

请求头

参数

类型

是否必填

描述

示例值

x-yunxiao-token

string

个人访问令牌。

pt-0fh3****0fbG_35af****0484

请求参数

参数

类型

位置

是否必填

描述

示例值

organizationId

string

path

  • 是:中心版

  • 否:Region

组织 ID。

60d54f3daccf2bbd6659f3ad

groupId

string

path

代码组 ID 或者 URL-Encoder 编码的全路径。

2813489或者60de7a6852743a5162b5f957%2FDemoGroup

accessLevel

integer

query

最小访问权限:20-浏览者,30-开发者,40-管理员,默认为0,即不筛选。

30

请求示例

中心版

curl -X 'GET' \
  'https://{domain}/oapi/v1/codeup/organizations/60d54f3daccf2bbd6659f3ad/groups/2813489或者60de7a6852743a5162b5f957%2FDemoGroup/members?accessLevel=30' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Region

curl -X 'GET' \
  'https://{domain}/oapi/v1/codeup/groups/2813489或者60de7a6852743a5162b5f957%2FDemoGroup/members?accessLevel=30' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

返回参数

参数

类型

描述

示例值

-

array

-

object

accessLevel

integer

成员权限:20-浏览者,30-开发者,40-管理员。

30

avatarUrl

string

头像地址。

https://example/example/w/100/h/100

expiresAt

string

过期时间。

2024-10-05T15:30:45Z

id

integer

主键 ID(无实际业务意义)。

2813489

inheritedGroup

object

继承权限来源的代码组;成员直接加在当前代码组上且无继承场景时为 null。仅在各子 property 上维护 example;勿在本对象根写 example,否则 Nezha gen api-doc 返回示例中该对象会为空 {}。

avatarUrl

string

头像地址。

https://example/example/w/100/h/100

fullPath

string

空间完整路径。

60de7a6852743a5162b5f957/parent-group

id

integer

ID。

1

kind

string

类型,一般为 group。

group

name

string

名称。

ParentGroup

nameWithNamespace

string

完整名称。

60de7a6852743a5162b5f957 / ParentGroup

parentId

integer

上级路径的 ID。

2

path

string

路径。

parent-group

pathWithNamespace

string

完整路径。

60de7a6852743a5162b5f957/parent-group

visibility

string

可见性;继承场景下可能为空,可能的值:[private internal public]。

private

webUrl

string

页面访问时的 URL。

https://example.com/60de7a6852743a5162b5f957/parent-group

memberType

string

成员类型:USERS 为用户;TEAMS 为部门(此时请使用 teamId)。

USERS

name

string

成员名称。

codeup-demo

state

string

状态:active-已激活, blocked-阻塞,暂无法使用。

active

teamId

string

部门成员时的部门 id(与入参 teamId 一致);非部门成员时为 null。

70d8ddd4-xxxx-xxxx-xxxx-46100efe985e

userId

string

云效用户 ID(在 Codeup 提交的 OpenAPI 中涉及到用户 ID 之处,均应该使用该用户 ID)。

62c795xxxb468af8

username

string

用户名称。

codeup-username

webUrl

string

页面访问 URL。

xxx

返回示例

[
    {
        "accessLevel": 30,
        "avatarUrl": "https://example/example/w/100/h/100",
        "expiresAt": "2024-10-05T15:30:45Z",
        "id": 2813489,
        "inheritedGroup": {
            "avatarUrl": "https://example/example/w/100/h/100",
            "fullPath": "60de7a6852743a5162b5f957/parent-group",
            "id": 1,
            "kind": "group",
            "name": "ParentGroup",
            "nameWithNamespace": "60de7a6852743a5162b5f957 / ParentGroup",
            "parentId": 2,
            "path": "parent-group",
            "pathWithNamespace": "60de7a6852743a5162b5f957/parent-group",
            "visibility": "private",
            "webUrl": "https://example.com/60de7a6852743a5162b5f957/parent-group"
        },
        "memberType": "USERS",
        "name": "codeup-demo",
        "state": "active",
        "teamId": "70d8ddd4-xxxx-xxxx-xxxx-46100efe985e",
        "userId": "62c795xxxb468af8",
        "username": "codeup-username",
        "webUrl": "xxx"
    }
]

错误码

访问错误码中心查看 API 相关错误码。