Add knowledge base members

更新时间:
复制 MD 格式

This API adds members to a knowledge base.

Supported editions

Enterprise Dedicated Edition, Enterprise Standard Edition

Service endpoints

Get the service endpoint and replace {domain} in the API request syntax with your endpoint .

Authorization information

Product

Resource

Required permissions

Lingma

knowledge base member

Read and write permissions

Request syntax

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

Request details

Enterprise standard edition

Add members

curl -X 'POST' \
  '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' \
  --data '
  {
    "members": [
             {
                "creatorId": "66a6f60e368d88cff5a513fc",
                "kbNo": "b15aef8442c0fc45492bdf38",
                "userId": "672aca1cbecc937b9f5108e9",
                "userType": "USER",
                "roleList": [
                    "MEMBER"
                ]
             }
        ]
}'

Enterprise dedicated edition

Add members

curl -X 'POST' \
  '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' \
  --data '
  {
    "members": [
             {
                "creatorId": "66a6f60e368d88cff5a513fc",
                "kbNo": "b15aef8442c0fc45492bdf38",
                "userId": "672aca1cbecc937b9f5108e9",
                "userType": "USER",
                "roleList": [
                    "MEMBER"
                ]
             }
        ]
}'

Request headers

x-yunxiao-token string (required)

Your personal access token. For more information, see Personal Access Token.

Example: pt-0fh3****0fbG_35af****0484.

Request parameters

organizationId string (required)

The ID of the organization. You can find the ID on the Basic Information page of the organization management console. For more information, see Obtain an Organization ID.

kbId string (required)

The knowledge base ID. To obtain the ID, see List Knowledge Bases.

members array[object] (required)

The list of members to add.

Properties

creatorId string (required)

The ID of the user who performs this operation. For more information, see List Knowledge Base Members.

kbNo string (required)

The knowledge base ID. To obtain the ID, see List Knowledge Bases.

userId string (required)

The ID of the user or team to add as a member. For more information, see List Members.

userType string (Optional) The default value is USER.

The type of the member. Valid values:

  • USER: A user.

  • TEAM: A team.

roleList array[string] (optional) The default value is MEMBER.

The roles to assign to the new members. Valid values:

  • MANAGER: administrator.

  • MEMBER: visible member.

Response parameters

Response example

{
    "success": true
}

success boolean

Indicates whether the members were added successfully.

Error codes

For more information, see Error codes.