Delete knowledge base

Delete the knowledge base and its definition. The Catalog tables and files where the source resides will not be deleted. Before deleting, please confirm that the agent, workflow or application no longer references the knowledge base.

HTTP
DELETE $CLOUDSIGMA_API_BASE/semantic-models/{model_id}

Before you call

Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. First query the knowledge base details and confirm the knowledge base to be deleted. Prepare a personal access token and target workspace ID that can access the target workspace.

Request parameters

Shell
curl -X DELETE "$CLOUDSIGMA_API_BASE/semantic-models/$MODEL_ID" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Path parameters

Field

Type

Required

Description

model_id

integer

Yes

The knowledge base ID to be deleted.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "deleted": true
  }
}

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data

object

The return data of this operation.

data.deleted

boolean

true indicates that the deletion request has been completed. It is also true when the target does not exist originally.

Error response

When the knowledge base ID is not a positive integer, HTTP 400 and ErrParamInvalid are returned.

JSON
{
  "code": "ErrParamInvalid",
  "msg": "无效的模型ID",
  "data": null
}

Field

Type

Description

code

string

error code.

msg

string

Error description.

data

null

null on error.

Last updated on