Update knowledge base state

Updated at:

Updates the state of a knowledge base.

Important

The new Qoder CN documentation site is now available. Content on this site may not reflect the latest product features and changes. Visit docs.qoder.cn for the latest product documentation.

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

Product

Resource

Required permission

AI Coding Assistant

knowledge base

read and write

Request syntax

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

Request

Enterprise Standard Edition

Request example

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

Enterprise Dedicated Edition

Request example

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

Request headers

x-yunxiao-token string (Required)

The access token for authentication. To learn how to obtain a token, see access token.

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

Request parameters

organizationId string (Required)

The organization ID. You can go to the Organization Management console's Basic Information page to obtain the organizationId.

kbId string (Required)

The ID of the knowledge base. To obtain this ID, see List knowledge bases.

state string (Required)

The state of the knowledge base. Valid values:

  • enable: Enables the knowledge base.

  • disable: Disables the knowledge base.

Response parameters

Response example

{
    "success": true
}

success boolean

Indicates whether the request was successful.

Error codes

For more information, see Error code center.