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.

HTTP
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.

Shell
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

model_id

integer

Yes

knowledge base ID.

Request body

Field

Type

Required

Description

name

string

Yes

Current knowledge base name. The value is immutable and must be consistent with the created name. Cannot be empty.

description

string

No

Updated knowledge base description.

tables

array of object or null

No

Compatible legacy table source definitions.

tables[].db_name

string

When the object is provided

Database name. Cannot be empty.

tables[].table_names

array of string

When the object is provided

List of table names. At least 1 items.

files

object or null

No

Compatible legacy file source definitions.

files.file_ids

array of string or null

No

Catalog file ID list.

files.volume_ids

array of string or null

No

List of volume IDs.

files.volumes

array of object or null

No

Volume configuration list.

files.volumes[].volume_id

integer

No

Volume ID.

files.volumes[].parents

array of string or null

No

parent relationship.

files.volumes[].path

array of string or null

No

path.

files.volume

object or null

No

Volume configuration.

files.volume.volume_id

integer

No

Volume ID.

files.volume.parents

array of string or null

No

parent relationship.

files.volume.path

array of string or null

No

path.

files.vector_table

string

No

vector table.

files.embedding_model

string

No

Vector model.

files.image_vector_table

string

No

Image vector table.

files.image_embedding_model

string

No

Image vector model.

files.image_embedding_backend_id

string

No

Image vector backend ID.

files.image_embedding_dimension

integer

No

Image vector dimensions.

files.image_preprocess_version

string

No

Image preprocessing version.

files.image_distance_metric

string

No

Image distance metric.

files.image_index_configs

array of object or null

No

Image index configuration.

files.image_index_configs[].id

string

No

logo.

files.image_index_configs[].image_vector_table

string

No

Image vector table.

files.image_index_configs[].image_embedding_model

string

No

Image vector model.

files.image_index_configs[].image_embedding_backend_id

string

No

Image vector backend ID.

files.image_index_configs[].image_embedding_dimension

integer

No

Image vector dimensions.

files.image_index_configs[].image_preprocess_version

string

No

Image preprocessing version.

files.image_index_configs[].image_distance_metric

string

No

Image distance metric.

files.image_index_configs[].image_scope

string

No

Image range.

files.image_index_configs[].status

string

No

status.

files.active_image_index_config_id

string

No

Image indexing configuration ID is currently enabled.

volume_id

integer

No

Volume ID.

parents

array of string or null

No

parent relationship.

path

array of string or null

No

path.

id

string

No

logo.

image_vector_table

string

No

Image vector table.

image_embedding_model

string

No

Image vector model.

image_embedding_backend_id

string

No

Image vector backend ID.

image_embedding_dimension

integer

No

Image vector dimensions.

image_preprocess_version

string

No

Image preprocessing version.

image_distance_metric

string

No

Image distance metric.

image_scope

string

No

Image range.

status

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

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

Field

Type

Description

data.updated

boolean

true indicates that the update request has been accepted and completed by the server.

Error response

JSON
{
  "code": "ErrNotFound",
  "msg": "resource not found",
  "data": null
}

Field

Type

Description

code

string

error code.

msg

string

Error description.

data

null

null on error.

Last updated on