Query knowledge base details¶
Query the knowledge base definition and source quantity by knowledge base ID. You should use this interface to confirm the current status before updating or deleting.
GET $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 list to obtain the knowledge base ID. Prepare a personal access token and target workspace ID that can access the target workspace.
Request parameters¶
curl "$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 |
|---|---|---|---|
|
integer |
Yes |
knowledge base ID. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"id": 401,
"name": "product_docs",
"description": "产品文档",
"tables": [],
"files": [],
"source_counts": {
"files": 2,
"tables": 1,
"total": 3
},
"created_at": 1735632000,
"updated_at": 1735718400
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
object |
response data. |
|
integer |
knowledge base ID. |
|
string |
knowledge base name. |
|
string |
knowledge base description. May be omitted if not set. |
|
array of object |
Compatible legacy table source definitions. |
|
object |
Compatible legacy file source definitions. May be omitted if not set. |
|
object |
Current source quantity. |
|
integer |
Unix timestamp. |
|
integer |
Unix timestamp. |
|
string |
The name of the database where the table comes from. |
|
array of string |
The name of the table included in the knowledge base in this database. |
|
array of string |
File ID. |
|
array of string |
The parent path of the file source. |
|
array of string |
The volume ID from which the file originated. |
|
array of object |
File source volume and path. |
|
string |
Vector table name. |
|
string |
Embedding model identifier. |
|
array of string |
File source tag. |
|
string |
Volume ID. |
|
array of string |
The parent path of the volume source. |
|
array of string |
File path within the volume. |
|
integer |
Number of file sources. |
|
integer |
Table source number. |
|
integer |
Total number of sources. |
Error response¶
{
"code": "ErrNotFound",
"msg": "resource not found",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
Error description. |
|
null |
|