All Products
Search
Document Center

AI Coding Assistant Lingma:Update knowledge base status

Last Updated:May 27, 2025

Call this API to update the status of a knowledge base.

Supported editions

Enterprise Dedicated Edition

Service endpoints and authorization information

  • Get the service endpoint to replace <domain> in the API request syntax with your endpoint.

  • Obtain the access token.

  • Obtain the organizationId. Go to the Lingma console and view the organization ID on the Basic Information page under Enterprise settings > Organization.

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 headers

Parameter

Type

Required

Description

Example

x-yunxiao-token

string

Yes

The access token.

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

Request parameters

Parameter

Type

Position

Required

Description

Example

organizationId

string

path

Yes

The organization ID.

99d1****71d4

kbId

string

path

Yes

The ID of the knowledge base.

state

string

query

Yes

The status of the knowledge base. Valid values:

  • enable

  • disable

enable

Request example

curl -X 'POST' \
  'https://{domain}/oapi/v1/lingma/organizations/{organizationId}/knowledgeBases/{kbId}/updateState?state={state}' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Response parameters

Parameter

Type

Description

Example

-

object

success

boolean

Indicates whether the knowledge base status is updated.

Response example

{
    "success": "false"
}

Error codes

For more information, see Error codes.