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.

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

Shell
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

name

string

Yes

The name of the knowledge base is 1~255 characters long and cannot contain spaces at the beginning and end.

description

string

No

knowledge base description.

image_index_enabled

boolean

No

Whether to enable image indexing. When not transmitted, it is false.

Successful response

JSON
{
  "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

data.model

object

New knowledge base.

data.model.id

integer

knowledge base ID.

data.model.name

string

knowledge base name.

data.model.description

string

knowledge base description.

data.model.tables

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.

data.model.files

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.

data.model.created_at

integer

Creation time.

data.model.updated_at

integer

Update time.

data.model.source_counts

object

Source quantity statistics.

data.model.source_counts.files

integer

The total number of files associated with the knowledge base, initially 0.

data.model.source_counts.tables

integer

The total number of data tables associated with the knowledge base, initially 0.

data.model.source_counts.total

integer

The sum of the total number of files and data tables associated with the knowledge base is initially 0.

data.data_domain

object

Catalog, database and file volume information associated with this knowledge base.

data.data_domain.model_id

integer

knowledge base ID.

data.data_domain.catalog_id

integer

Catalog ID。

data.data_domain.database_id

integer

Database ID.

data.data_domain.raw_volume_id

integer

Original file volume ID.

data.data_domain.processed_volume_id

integer

Handles file volume IDs.

data.data_domain.ensure_status

string

Storage readiness status. Values: ready, failed, provisioning.

data.data_domain.last_ensure_error

string

Recent preparation errors. Omitted if there is no error.

data.data_domain.last_checked_at

integer

Last checked time.

Last updated on