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 .
Product | Resource | Required permission |
AI Coding Assistant | Knowledge base | Read and write |
Request syntax
POST https://{domain}/oapi/v1/lingma/organizations/{organizationId}/knowledgeBases/{kbId}/updateStateRequest headers
Parameter | Type | Required | Description | Example |
| string | Yes | The access token. | pt-0fh3****0fbG_35af****0484 |
Request parameters
Parameter | Type | Position | Required | Description | Example |
| string | path | Yes | The organization ID. | 99d1****71d4 |
| string | path | Yes | The ID of the knowledge base. | |
| string | query | Yes | The status of the knowledge base. Valid values:
| 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 | ||
| boolean | Indicates whether the knowledge base status is updated. |
Response example
{
"success": "false"
}Error codes
For more information, see Error codes.