Update knowledge base¶
Update knowledge base description or compatible legacy source field. The knowledge base name cannot be modified after it is created. The current name must be returned when updating. Please use a separate data source interface for new access sources.
PUT $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 knowledge base details to confirm the current definition. Prepare a personal access token and target workspace ID that can access the target workspace.
Request body¶
Replace $MODEL_ID, $CLOUDSIGMA_API_KEY, $WORKSPACE_ID, $CURRENT_KNOWLEDGE_BASE_NAME, $DESCRIPTION in the example with actual values.
curl -X PUT "$CLOUDSIGMA_API_BASE/semantic-models/$MODEL_ID" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"name": "$CURRENT_KNOWLEDGE_BASE_NAME",
"description": "$DESCRIPTION"
}'
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
Yes |
knowledge base ID. |
Request body
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Current knowledge base name. The value is immutable and must be consistent with the created name. Cannot be empty. |
|
string |
No |
Updated knowledge base description. |
|
array of object or null |
No |
Compatible legacy table source definitions. |
|
string |
When the object is provided |
Database name. Cannot be empty. |
|
array of string |
When the object is provided |
List of table names. At least 1 items. |
|
object or null |
No |
Compatible legacy file source definitions. |
|
array of string or null |
No |
Catalog file ID list. |
|
array of string or null |
No |
List of volume IDs. |
|
array of object or null |
No |
Volume configuration list. |
|
integer |
No |
Volume ID. |
|
array of string or null |
No |
parent relationship. |
|
array of string or null |
No |
path. |
|
object or null |
No |
Volume configuration. |
|
integer |
No |
Volume ID. |
|
array of string or null |
No |
parent relationship. |
|
array of string or null |
No |
path. |
|
string |
No |
vector table. |
|
string |
No |
Vector model. |
|
string |
No |
Image vector table. |
|
string |
No |
Image vector model. |
|
string |
No |
Image vector backend ID. |
|
integer |
No |
Image vector dimensions. |
|
string |
No |
Image preprocessing version. |
|
string |
No |
Image distance metric. |
|
array of object or null |
No |
Image index configuration. |
|
string |
No |
logo. |
|
string |
No |
Image vector table. |
|
string |
No |
Image vector model. |
|
string |
No |
Image vector backend ID. |
|
integer |
No |
Image vector dimensions. |
|
string |
No |
Image preprocessing version. |
|
string |
No |
Image distance metric. |
|
string |
No |
Image range. |
|
string |
No |
status. |
|
string |
No |
Image indexing configuration ID is currently enabled. |
|
integer |
No |
Volume ID. |
|
array of string or null |
No |
parent relationship. |
|
array of string or null |
No |
path. |
|
string |
No |
logo. |
|
string |
No |
Image vector table. |
|
string |
No |
Image vector model. |
|
string |
No |
Image vector backend ID. |
|
integer |
No |
Image vector dimensions. |
|
string |
No |
Image preprocessing version. |
|
string |
No |
Image distance metric. |
|
string |
No |
Image range. |
|
string |
No |
status. |
name must fill in the current name. Omitting description will clear the description and resubmit if needed. tables and files handle omitted values differently from null, please fill in the following table.
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"updated": true
}
}
Field |
Type |
Description |
|---|---|---|
|
boolean |
|
Error response¶
{
"code": "ErrNotFound",
"msg": "resource not found",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
Error description. |
|
null |
|