获取知识库成员列表

通过 OpenAPI 获取知识库成员列表。

适用版本

企业专属版、企业标准版

服务接入点

获取服务接入点,替换 API 请求语法中的 {domain}

授权信息

产品

资源

所需权限

通义灵码

知识库成员

只读

请求语法

GET https://{domain}/oapi/v1/lingma/organizations/{organizationId}/knowledgeBases/{kbId}/members

请求说明

企业标准版

获取该知识库下所有成员列表

curl -X 'GET' \
  'https://openapi-rdc.aliyuncs.com/oapi/v1/lingma/organizations/6826e1d0516a9f85a08c****/knowledgeBases/b15aef8442c0fc45492b****/members' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

根据成员名称模糊查询该知识库下成员

curl -X 'GET' \
  'https://openapi-rdc.aliyuncs.com/oapi/v1/lingma/organizations/6826e1d0516a9f85a08c****/knowledgeBases/b15aef8442c0fc45492b****/members?query=t' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

获取该知识库下所有成员列表并根据知识库创建时间排序

curl -X 'GET' \
  'https://openapi-rdc.aliyuncs.com/oapi/v1/lingma/organizations/6826e1d0516a9f85a08c****/knowledgeBases/b15aef8442c0fc45492b****/members?orderBy=gmtCreated' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

企业专属版

获取该知识库下所有成员列表

curl -X 'GET' \
  'https://test-domain-***.rdc.aliyuncs.com/oapi/v1/lingma/organizations/6826e1d0516a9f85a08c****/knowledgeBases/b15aef8442c0fc45492b****/members' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

根据成员名称模糊查询该知识库下成员

curl -X 'GET' \
  'https://test-domain-***.rdc.aliyuncs.com/oapi/v1/lingma/organizations/6826e1d0516a9f85a08c****/knowledgeBases/b15aef8442c0fc45492b****/members?query=t' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

获取该知识库下所有成员列表并根据知识库创建时间排序

curl -X 'GET' \
  'https://test-domain-***.rdc.aliyuncs.com/oapi/v1/lingma/organizations/6826e1d0516a9f85a08c****/knowledgeBases/b15aef8442c0fc45492b****/members?orderBy=gmtCreated' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

请求头(Headers)

x-yunxiao-token string (必选)

个人访问令牌。您可参考个人访问令牌获取。

示例:pt-0fh3****0fbG_35af****0484。

请求参数

organizationId string (必选)

所属组织ID。您可以前往组织管理后台基本信息页面获取organizationId

kbId string (必选)

知识库 ID。请参见获取知识库列表获取知识库ID。

query string (可选)

成员名称模糊查询。

orderBy string (可选)

排序列,支持如下排序字段:gmtCreated(知识库创建时间)。

sort string (可选)

排序顺序:

  • desc:倒序。

  • asc:正序。

page integer (可选)默认值为1

当前页。

perPage integer (可选)默认值为20

每页数据条数的最大值,取值范围:[1,20]

返回参数

返回示例

[
    {
        "avatarUrl": "https://tcs-devops.aliyuncs.com/thumbnail/113iaf62a4481af4cd44ad46d8c3e9b5****/w/100/h/100",
        "creator": {
            "avatarUrl": "https://tcs-devops.aliyuncs.com/thumbnail/113iaf62a4481af4cd44ad46d8c3e9b5****/w/100/h/100",
            "displayName": "testcloud_com",
            "id": "66a6f60e368d88cff5a5****",
            "userName": "test"
        },
        "displayName": "testcloud_com",
        "gmtCreated": 1749779962538,
        "kbNo": "b15aef8442c0fc45492b****",
        "related": "USER",
        "roleList": [
            "MEMBER",
            "MANAGER"
        ],
        "userId": "66a6f60e368d88cff5a5****",
        "userName": "test"
    }
]

avatarUrl string

成员头像。

creator Object

成员添加者。

属性

avatarUrl string

添加者头像。

displayName string

添加者登录名。

id string

添加者 id。

userName string

添加者昵称。

displayName string

成员登录名。

gmtCreated integer

添加日期。

kbNo string

知识库 id。

related string

知识库成员类型:

  • USER:用户。

  • TEAM:团队。

roleList array[string]

成员角色列表:

  • MANAGER:管理员。

  • MEMBER:可见成员。

userId string

成员id。

userName string

成员昵称。

响应头

参数

描述

示例值

x-next-page

下一页

1

x-page

当前页

1

x-per-page

每页大小

20

x-prev-page

前一页

1

x-total

总数

9

x-total-pages

总分页数

1

错误码

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