Create a data-side empty knowledge base¶
Create a knowledge base without data sources in the resource center. After successful creation, you can add files or data tables.
POST $CLOUDSIGMA_API_BASE/semantic-models/create-empty
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. Prepare a personal access token and target workspace ID with permission to create the target workspace knowledge base.
Request body¶
Replace $CLOUDSIGMA_API_KEY, $WORKSPACE_ID in the example with actual values.
curl -X POST "$CLOUDSIGMA_API_BASE/semantic-models/create-empty" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"name": "product_docs",
"description": "产品资料",
"image_index_enabled": false
}'
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
The name of the knowledge base is 1~255 characters long and cannot contain spaces at the beginning and end. |
|
string |
No |
knowledge base description. |
|
boolean |
No |
Whether to enable image indexing. When not transmitted, it is |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"model": {
"id": 401,
"name": "product_docs",
"tables": [],
"created_at": 0,
"updated_at": 0,
"source_counts": {
"files": 0,
"tables": 0,
"total": 0
}
},
"data_domain": {
"model_id": 401,
"catalog_id": 0,
"database_id": 0,
"raw_volume_id": 0,
"processed_volume_id": 0,
"ensure_status": "ready"
}
}
}
Field |
Type |
Description |
|---|---|---|
|
object |
New knowledge base. |
|
integer |
knowledge base ID. |
|
string |
knowledge base name. |
|
string |
knowledge base description. |
|
array of object |
List of data table objects associated with knowledge base. When creating a new empty knowledge base, it will be an empty array. |
|
array of object |
List of file objects associated with the knowledge base. When creating a new empty knowledge base, it will be an empty array. |
|
integer |
Creation time. |
|
integer |
Update time. |
|
object |
Source quantity statistics. |
|
integer |
The total number of files associated with the knowledge base, initially 0. |
|
integer |
The total number of data tables associated with the knowledge base, initially 0. |
|
integer |
The sum of the total number of files and data tables associated with the knowledge base is initially 0. |
|
object |
Catalog, database and file volume information associated with this knowledge base. |
|
integer |
knowledge base ID. |
|
integer |
Catalog ID。 |
|
integer |
Database ID. |
|
integer |
Original file volume ID. |
|
integer |
Handles file volume IDs. |
|
string |
Storage readiness status. Values: |
|
string |
Recent preparation errors. Omitted if there is no error. |
|
integer |
Last checked time. |